You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ACP: populate PromptResponse.usage and send UsageUpdate with cost #24280
When running Gemini CLI as an ACP server (gemini --acp), token usage and cost data are reported differently from other ACP implementations (Claude Agent ACP, Codex ACP), making it harder for ACP clients to track usage consistently.
Current behavior
Token usage is returned in PromptResponse._meta.quota.token_count:
ACP clients (Zed, OpenHands, etc.) use PromptResponse.usage and UsageUpdate.cost to track token consumption and spending. Without these standard fields, each client needs Gemini-specific fallback logic to parse _meta.quota.
Claude Agent ACP and Codex ACP both populate these standard fields. Aligning Gemini CLI would make it a drop-in replacement in any ACP client.
This issue asks for the standard ACP protocol fields that Claude Agent ACP and Codex ACP already populate: PromptResponse.usage and UsageUpdate with cost. Any ACP client that works with Claude/Codex would automatically work with Gemini CLI too, with no Gemini-specific code needed.
Both could coexist (the extNotification as a bonus for clients that want real-time updates), but populating PromptResponse.usage is the baseline that ensures interoperability across all ACP clients.
Thank you for bringing this to our attention. Right now, our engineering team is focusing all resources on critical system maintenance and core stability. Because of this, we don't have immediate plans to address this specific issue, but we truly appreciate you flagging it for us.
Activity
gemini-cli commentedon Mar 30, 2026
Found possible duplicate issues:
If you believe this is not a duplicate, please remove the
status/possible-duplicatelabel.simonrosenberg commentedon Mar 30, 2026
This is related to #19249 but proposes a different (and more standard) approach:
extNotificationfor token usage — this would work for Zed but requires every ACP client to handle a Gemini-specific notification type.PromptResponse.usageandUsageUpdatewithcost. Any ACP client that works with Claude/Codex would automatically work with Gemini CLI too, with no Gemini-specific code needed.Both could coexist (the
extNotificationas a bonus for clients that want real-time updates), but populatingPromptResponse.usageis the baseline that ensures interoperability across all ACP clients.fix(acp): remove debug logging, add usage-unavailable warning
Adib234 commentedon May 8, 2026
Thank you for bringing this to our attention. Right now, our engineering team is focusing all resources on critical system maintenance and core stability. Because of this, we don't have immediate plans to address this specific issue, but we truly appreciate you flagging it for us.
feat(gemini-acp): parse _meta.quota.token_count from PromptResponse
feat(gemini-acp): parse _meta.quota.token_count from PromptResponse
fix(usage): read gemini's tokens from its own _meta.quota (#1)
docs(quirks): record gemini's usage under _meta.quota (#2)