[FEATURE] Expose exact remaining-context token count to Dispatch/Cowork sessions

Open 💬 0 comments Opened Jul 7, 2026 by serge-zol

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Dispatch/Cowork sessions (the desktop-app agent) can only estimate remaining context — there is no exact gauge. When driving Cowork/Dispatch from mobile or in the field, there is no native status line, so I cannot tell when the context window is near full. This leads to unexpected auto-compaction and degraded output quality mid-task, with no warning.

Claude Code CLI already solves this for its own sessions via totalTokensReminder: "countdown", which injects <total_tokens>N tokens left</total_tokens> into the model context. Dispatch/Cowork has no equivalent.

Proposed Solution

Provide a server-side / account-level equivalent of totalTokensReminder for Dispatch/Cowork sessions: inject <total_tokens>N tokens left</total_tokens> into their context so the agent can surface exact remaining context, and/or show remaining context directly in the Cowork/Dispatch UI.

Ideal UX: the agent renders an accurate context gauge (e.g. 31% · 314K / 1M) in each reply, so the user knows exactly when to start a fresh session before quality degrades.

Alternative Solutions

  • Currently the agent only estimates usage (approximate token line) — imprecise and easy to overshoot.
  • On the Claude Code CLI side, totalTokensReminder: "countdown" in ~/.claude/settings.json works (verified, v2.1.202) and injects live <total_tokens>. But this local setting is not read by the server-side Cowork/Dispatch harness, so it cannot be enabled for those sessions from the user side.

Priority

Low - Nice to have

Feature Category

Other

Use Case Example

  1. I'm away from my desk, driving a Cowork/Dispatch session from my phone.
  2. I work through several tasks; context gradually fills.
  3. With no accurate remaining-context indicator on mobile, I don't notice the window is nearly full.
  4. Auto-compaction kicks in mid-task, the agent loses fidelity, and output quality drops with no warning.

With an exact gauge, I'd see e.g. "85% used" and start a fresh session before quality degrades.

Additional Context

  • Verified: Claude Code CLI 2.1.202 with totalTokensReminder: "countdown" injects live <total_tokens> after each action.
  • Verified: a Dispatch/Cowork session has no <total_tokens> in its context at all (full context reviewed) — the local ~/.claude/settings.json is not read server-side.
  • Cowork/Dispatch appears to share the Claude Code runtime but not its local config.
  • Companion to the visible-output detector discussion in #70422.

View original on GitHub ↗