Repository navigation
Replies: 1 comment
|
I implemented this in #29631 and would like a maintainer to sign off on the direction and scope. A few things I found that differ from the proposal above:
Limits stay out of scope, since #26381 covers them. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Devin runs in T3 Code as a first-class agent through the ACP Registry (
acpRegistry_devin), and Devin subscription limits are already being wired up in #26381. But Devin session history never appears on the Usage page — the readers only cover Codex, Claude Code, Grok Build, OpenCode, Antigravity, Pi, Muse Code, and Cursor. Every token spent through a Devin thread is invisible next to the other providers.The Devin CLI already writes everything a usage reader needs to disk, so this seems like a natural
devinUsageReaderalongside the existing per-provider readers.The data already exists locally
The same binary T3 launches via
devin acppersists per-session transcripts and a session index on every machine it runs on:~/.local/share/devin/cli/transcripts/<session_id>.json— one ATIF transcript per session:{ "schema_version": "ATIF-v1.7", "session_id": "zinc-order", "agent": { "name": "devin", "version": "3000.11.92", "model_name": "SWE-2 High" }, "steps": [ { "step_id": 0, "timestamp": "...", "metrics": { "prompt_tokens": 34409, "completion_tokens": 357, "cached_tokens": 832 } } ], "final_metrics": { "total_prompt_tokens": 12427771, "total_completion_tokens": 39023, "total_cached_tokens": 12026929, "total_steps": 121 } }~/.local/share/devin/cli/sessions.db— SQLite index correlating transcripts with working directory and timestamps:This covers both T3-spawned sessions and standalone
devinCLI sessions — same store, same format — matching how the Claude/Codex/Pi readers count provider history regardless of who launched it.Suggested shape
Following the existing driver pattern:
apps/server/src/provider/Drivers/devinUsageReader.ts, modeled onclaudeUsageReader.ts/codexUsageReader.ts.apps/server/src/usage/UsageService.tsand the provider lists inapps/web/src/components/usage/usageProviders.tsandapps/mobile/src/features/usage/usageProviders.ts.~/.local/share/devin/cli(XDG-respecting); an env override would followOPENCODE_DATA_DIR/ANTIGRAVITY_DATA_DIR/PI_CODING_AGENT_SESSION_DIRprecedent.transcripts/*.json, joinsessions.dbforworking_directory/ timestamps so per-project breakdown (feat(usage): break usage down by project, thread, account and environment #15902) works when it lands.Caveats worth noting
schema_version: ATIF-v1.7. Parsing should tolerate unknown fields and degrade gracefully across ATIF versions — the CLI updates frequently.prompt_tokens/completion_tokens/cached_tokensper step.cached_tokensmaps to cache-read; there is no separate cache-write figure.final_metricshas per-session totals if step-level aggregation is preferred.(session_id, step_id)is the natural key.Map tooverrides already cover this.XDG_DATA_HOME; the reader should mirror its per-platform base-dir resolution (Devin ships Linux/macOS/Windows).branch-marmot,zinc-order, ...), good enough for row labels.Related work
fix(usage): show Devin in subscription Limits(complementary, not overlapping)feat(usage): track Mistral Vibe session usage(precedent: third-party agent usage reader)feat(usage): GitHub Copilot sessions show in usage historyfeat(provider-kiro): Usage shows Kiro creditsfeat(usage): add command-based usage limit sourcesReproduction
Any machine with the Devin CLI used through T3 or standalone already has the data:
Verified on Devin CLI
3000.11.92–3000.11.234, Linux.All reactions