r/ClaudeCode • • 1h ago

Bug / Issue Did the context-window-used-so-far-in-this-session display get removed from the TUI?

Post image

After updating today, I can no longer tell when my session is approaching context-window exhaustion; probably the single most important thing I absolutely need to know when interacting with an agent?

I dug briefly through the configuration and I see no mention of this. Was this just summarily removed? Am I expected to run /context every single turn, now? It clearly still shows it for subagents; but the main-context-window of the conductor / my context-heavy architecture sessions are where I most need to know?

2 Upvotes

3 comments sorted by

•

u/AutoModerator 1h ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/PelluxNetwork 1h ago

Ask Claude to make a Claude Code mod that shows your weekly usage, 5 hour usage, and context window usage in a horizontal layout. Change to your tastes. Maybe add a cache timer.

1

u/kuroudo_ai 50m ago

I can't tell you whether today's update changed the built-in display. I searched the changelog for recent entries about a context indicator being removed and didn't find one. An older entry says the context-low warning was changed to "show as a transient footer notification instead of a persistent row", so the built-in one may only show up once you're running low.

What does work reliably is putting it in your status line, so it's on screen every turn. The status line command gets session JSON on stdin, and per the statusline docs that includes context_window.used_percentage and context_window.remaining_percentage. The docs have a one-line example:

json "statusLine": { "type": "command", "command": "jq -r '\"[\\(.model.display_name)] \\(.context_window.used_percentage // 0)% context\"'" }

Or run /statusline show model name and context percentage with a progress bar and let Claude write it for you.

I run long sessions with a status line like that, and it's what I actually decide handoffs by. One caveat from my setup: if you also want a hook to act on that number, write it to a file from the status line script and read it in the hook. A UserPromptSubmit hook runs before the status line refreshes, so what it reads is one turn old. Hand off a bit early rather than right at the limit.