[BUG] /context command modal renders incorrectly and auto-dismisses without user interaction (v2.1.12, iTerm2, macOS)

Resolved 💬 5 comments Opened Jan 22, 2026 by Walid-Azur Closed Jan 25, 2026

Description

The /context command output renders with visual artifacts ("exploded" layout) and automatically dismisses after a few seconds without pressing Esc or any user interaction. The user cannot review the context information as it disappears too quickly.

Environment

  • Claude Code Version: 2.1.12
  • OS: macOS Darwin 25.2.0 (Apple Silicon)
  • Terminal: iTerm2
  • TERM: xterm-256color
  • Terminal Size: 24 lines × 80 columns

Steps to Reproduce

  1. Open Claude Code in iTerm2
  2. Run the /context command
  3. Observe the output appearing with rendering artifacts
  4. Watch as it auto-dismisses after ~3-4 seconds without any user input

Expected Behavior

  • The /context modal should render cleanly without visual artifacts
  • The modal should remain visible until the user presses Esc or explicitly dismisses it
  • Context information should be readable and persistent

Actual Behavior

  • Modal renders with "exploded" layout - content appears spread out with rendering artifacts
  • Modal automatically closes after a few seconds
  • User cannot review context details as the display vanishes
  • No user interaction (Esc key) is performed when it closes

Screenshots

Screenshot 1 - Exploded rendering with artifacts

!Screenshot showing /context output with rendering issues

The context modal shows:

  • Token counts for various components (context-init, security-reviewer, code-reviewer, etc.)
  • Plugin section with agent-orchestration, context-management, feature-dev entries
  • Memory files section
  • Visual glitches/artifacts visible in the layout

Screenshot 2 - Context Usage view before auto-dismiss

!Screenshot showing Context Usage before it disappears

Shows:

  • Model: claude-opus-4-5-20251101 with 36k/200k tokens (18%)
  • System prompt: 2.9k tokens (1.4%)
  • System tools: 18.0k tokens (9.0%)
  • MCP tools: 10.5k tokens (5.2%)
  • Custom agents: 692 tokens (0.3%)
  • Memory files: 2.6k tokens (1.3%)
  • Skills: 1.1k tokens (0.5%)
  • Messages: 208 tokens (0.1%)
  • Free space: 119k (59.5%)
  • Autocompact buffer: 45.0k tokens (22.5%)

Configuration

~/.claude/settings.json (relevant sections)

{
  "model": "opus",
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline-command.sh"
  },
  "hooks": {
    "SessionStart": [...],
    "UserPromptSubmit": [...],
    "PreToolUse": [...],
    "PostToolUse": [...]
  },
  "enabledPlugins": {
    "typescript-lsp@claude-plugins-official": true,
    "mind@memvid": true,
    "context-management@claude-code-workflows": true,
    ...
  }
}

Shell Environment (potentially relevant)

# From .zshrc - these are being unset, not set
unset CLAUDE_CODE_NO_ANIMATIONS 2>/dev/null
unset CLAUDE_CODE_SESSION 2>/dev/null

# Pager settings
export GIT_PAGER=cat
export PAGER=cat

Related Issues

This appears related to:

  • #18562 - /context command output appears temporarily then vanishes
  • #18521 - /context command window flickers then closes immediately
  • #18716 - /context displays delayed and only temporarily
  • #19072 - /context command UI renders in statusline area

Additional Context

  • The issue occurs consistently on every /context invocation
  • Custom statusline command is in use but produces valid output
  • Multiple hooks are configured but all complete within their timeouts
  • The session starts correctly and all other functionality works as expected

Workaround Attempted

None found. Tried:

  • Different terminal sizes
  • With and without custom statusline
  • Fresh session after restart

The issue persists regardless of configuration changes, suggesting it's a core rendering/timing bug in the /context command implementation.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗