Skip to content

ACP: token usage stats unavailable for Devin (acpRegistry_devin) sessions #40719

Closed as not planned

Description

@TOX9C

Summary

Threads running through the acpRegistry_devin provider never report token usage — every turn is recorded with usageStatus: "unavailable", so the usage stats in the UI stay empty for Devin sessions.

Details

In apps/server (runtimeLayer), the ACP adapter only reads per-turn usage when the agent flavor sets reportsPerTurnPromptUsage: true. That flag is currently enabled only for a hardcoded list (e.g. glm-acp-agent, Antigravity) and not for registryAgentId === "devin".

Devin CLI's ACP session/prompt response does include a usage object (totalTokens, inputTokens, outputTokens, thoughtTokens, cachedReadTokens, cachedWriteTokens — visible in the devin binary's ACP schema structs), so the data appears to be available; T3 just doesn't consume it for this agent.

Verified locally in statev2.sqlite: all sampled acpRegistry provider turns have turnTokenUsage.usageStatus = "unavailable" and no cost records.

Requested change

Enable reportsPerTurnPromptUsage for the devin registry agent (or make the flag configurable per provider instance), so Devin sessions populate the same per-turn token stats as other ACP agents.

Environment

  • T3 Code (Beta), macOS
  • Provider: acpRegistry_devin, model swe-2-flash-medium (Devin CLI 3000.14.30821)

Note: as a workaround I patched the local app.asar to enable the flag for devin — happy to share the diff if useful for verifying whether Devin's prompt-response usage is shaped as expected.

Activity

  1. juliusmarminge commented on Nov 22, 2026

    @juliusmarminge
    Member

    Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.

  2. TOX9C commented on Nov 22, 2026

    @TOX9C
    Author

    Follow-up findings after testing a local patch:

    The reportsPerTurnPromptUsage patch works. After enabling the flag for registryAgentId === "devin" in app.asar, Devin turns now record real per-turn usage. Verified in statev2.sqlite for a live acpRegistry_devin / swe-2-flash-medium thread:

    "turnTokenUsage": {
      "usageScope": "main_agent",
      "usageStatus": "complete",
      "inputTokens": 38723,
      "outputTokens": 58,
      "cachedInputTokens": 7552,
      "hasSubagents": false
    }

    and contextUsage is populated too (usedTokens: 38781 / maxTokens: 262144).

    However, the bottom-left Usage dashboard still shows nothing for Devin — because it's a separate pipeline. UsageProviderKind only allows ["claude", "codex", "grok", "cursor", "opencode", "antigravity", "pi", "muse"], and the dashboard is populated by scanning local transcript directories (~/.claude/projects, ~/.codex/sessions, ~/.grok/sessions, ~/.pi/agent/sessions — see usage-scan-cache-v17.json). Devin CLI stores sessions in ~/.local/share/devin/cli/sessions.db (SQLite), which has no scanner, and acpRegistry/devin isn't a UsageProviderKind at all.

    Also note: turnTokenUsage doesn't appear to be rendered by any client component — it only exists in the API schema (network-*.js) and feeds server-side run reporting via providerTurnProperties.

    So the complete fix likely needs two parts:

    1. Enable reportsPerTurnPromptUsage for devin (done locally via patch — verified working).
    2. Add a usage source for Devin sessions — either a scanner for Devin's sessions.db, or feed turnTokenUsage from acpRegistry provider turns into the usage records/buckets pipeline, plus "devin" (or "acpRegistry") in UsageProviderKind.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions