CLI: emit ACP usage_update so clients like Zed can show a context window indicator

Feature request for product/service

Cursor CLI

Describe the request

agent acp should emit the standardized usage_update session notification so ACP clients can display context window usage, the same way the Cursor editor shows its context indicator.

Background

The Agent Client Protocol standardized session usage reporting in June (Session Context Size and Cost RFD, Completed 2026-06-05). Agents report {used, size} token counts via a session/update notification with sessionUpdate: "usage_update".

Current state

  • Zed (1.10 stable) already renders this as a context ring with percentage and token counts — for any ACP agent that sends it (opencode and hermes-agent already do).
  • Cursor CLI (2026.07.09-a3815c0) never sends usage_update, even though the ACP schema bundled inside the CLI already includes the variant — emission is the only missing piece.
  • The data exists internally: the interactive TUI shows context usage and turn-level token accounting; it just isn’t surfaced over ACP.

Suggested behavior (per the RFD)

  • Emit usage_update after session/new and session/load (restored threads show usage immediately)
  • After each session/prompt completes (or periodically during streaming)
  • Whenever the effective context window changes (e.g. 300k vs 1M context, or after auto-compaction)

Why it matters

When driving Cursor through Zed or other ACP clients there’s no way to know how full the context is — you find out when quality degrades or compaction kicks in. Editor users get a context indicator; ACP users deserve parity. It also helps decide when to /summarize or start a fresh thread.

Environment: cursor-agent 2026.07.09-a3815c0 (darwin-arm64), Zed 1.10.0 stable, ACP over stdio.

Hey, thanks for the detailed request. The RFD link, versions, and the exact emission points (session/new, session/load, after session/prompt, when the context window changes) make this a lot easier.

The request makes sense. Right now, agent acp really doesn’t send usage_update, so ACP clients like Zed don’t show the context window indicator, even though usage is visible in the interactive TUI. I logged this as a separate feature request for CLI/ACP.

To be honest, I can’t share a specific timeline for this. If there’s an update, I’ll reply in the thread.

Also, if per turn usage in the response matters to you too (PromptResponse.usage in ACP mode), that’s a related issue we’re tracking as well: Cursor ACP doesn’t seem to return token usage in PromptResponse.usage