Repository navigation
Show Claude's context breakdown (what /context shows) from the context meter #15984
spiky02plateau
started this conversation in
Ideas
Replies: 1 comment
|
+1. I think this and #12074 are one feature. Fetch the breakdown from On your second question: popover plus the |
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.
What I'm missing
In a Claude thread, typing
/contextdoes nothing useful, because it's a Claude Code CLI built-in and T3 talks to Claude through the Agent SDK. The context meter gives me one number. On long sessions the number alone doesn't tell me what to do about it. Whether I compact, turn off an MCP server, trim memory files or start a fresh thread depends on what is filling the window.What already exists
The Agent SDK version in the lockfile (0.3.170) exposes
query.getContextUsage(). It returns the same data/contextrenders:totalTokens,maxTokens,percentage, per-category token counts (system prompt, tools, MCP tools, memory files, messages and so on), plusmemoryFiles,mcpTools,agentsandskillswith their own token counts. T3 doesn't call it anywhere on main today.Proposal
When the context meter popover opens on a Claude thread with a live session, the server asks that session for
getContextUsage()and the popover lists the categories with their token counts under the existing total. It's on demand only: no polling and nothing persisted. With no live session, the popover stays exactly as it is now. Claude only, behind the existing context meter setting.Optionally, typing
/contextin a Claude thread opens the same popover, so the habit from the CLI keeps working.Questions
/contextshortcut?If the direction works for you, I'm happy to send the PR.
All reactions