[BUG] `/context` command has displays the context delayed and only temporarily

Status Fixed / completed
Reported on v2.1.7
Maintainer reply ✓ Yes — ashwin-ant
Activity 12 comments · opened Jan 17, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Running /context shows a delayed visualization of token usage that disappears from the screen

What Should Happen?

The context display should remain on the screen and show up immediately.

Steps to Reproduce

  1. Start claude session
  2. Run /context

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.7

Claude Code Version

2.1.11

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

IntelliJ IDEA terminal

Additional Information

Here you can see that the context display disappears after a few seconds.

https://github.com/user-attachments/assets/9a0191ce-bfca-4a75-ad32-a6204f110588

View original on GitHub ↗

12 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/18562
  2. https://github.com/anthropics/claude-code/issues/18521
  3. https://github.com/anthropics/claude-code/issues/18488

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

Kari-Basavaraj · 7 months ago

Additional Reproduction Details

Confirming this issue on v2.1.11.

My observations:

  • /context shows token usage briefly then vanishes after ~5 seconds
  • Happens even without window resize
  • Tested with all plugins disabled - still occurs

Environment:

  • Claude Code: 2.1.11
  • macOS: Darwin 25.0.0 (arm64)
  • Terminal: Ghostty 1.2.3, Terminal.app (both affected)
  • Shell: zsh

Troubleshooting attempted (none resolved):

  • Disabled custom statusLine config
  • Disabled claude-hud plugin
  • Removed all hooks from settings.json
  • Set Ghostty shell-integration-features = no-cursor

This appears related to other TUI rendering issues I'm experiencing:

  • #17816 (slash command highlight offset)
  • #18493 (resize content loss)
  • #18797 (cursor blinks below status bar)

These issues may share a common root cause in the TUI rendering layer, possibly a regression in v2.1.x.

SerkanSipahi · 7 months ago

Same here!

CybotTM · 7 months ago

This may be related to #18298 and #18370 (MCP Tool Search not auto-enabling).

Hypothesis: Both issues involve processing MCP tool metadata:

  1. /context needs to calculate MCP tool token usage → crashes/flashes
  2. Auto-enable check needs to calculate "are MCP tools > 10%?" → fails silently

If the MCP tool counting/processing code is broken, both would fail. Setting ENABLE_TOOL_SEARCH=true env var bypasses the auto-detection and makes MCP tool search work, but /context still crashes.

Environment:

  • 7-8 MCP servers configured
  • MCP tools consuming ~50k tokens (25% of context) when loaded upfront
  • ENABLE_TOOL_SEARCH=true makes tool search work, but /context still flashes briefly then resets
brian-poillucci · 7 months ago

I did all the same troubleshooting and issue remains in 2.1.12

bw2 · 7 months ago

Same here

JohnGaros · 7 months ago

Same here

erick-siordia · 7 months ago

Same here

LudovicPelleDMS · 7 months ago

Same here

ias-z · 7 months ago

same here

ashwin-ant collaborator · 4 months ago

This was fixed in v2.1.14 — The /context overlay now stays open instead of appearing briefly and closing while message processing finishes. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.

github-actions[bot] · 4 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.