[BUG] /context command display corruption and crash with many MCP tools/skills registered
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?
When running the /context command with many MCP tools and skills registered (45+ items from plugins), the display becomes corrupted with overlapping text that runs off screen, and the session crashes/exits unexpectedly.
The debug log shows:
- A flood of ~30+ parallel API client/OAuth token check calls within 30ms
- 2. Massive write ratio: "blit=0, write=6401 (100.0% writes), screen=85x252"
- 3. Session terminates shortly after
The UI cannot handle rendering token counts for many registered tools/skills simultaneously.
What Should Happen?
The /context command should display all MCP tools and skills with their token counts in a readable, scrollable format without display corruption or crashing, regardless of how many items are registered.
Error Messages/Logs
2026-01-17T16:54:00.608Z [DEBUG] High write ratio: blit=0, write=1598 (100.0% writes), screen=18x252
2026-01-17T16:54:00.612Z [DEBUG] [API:request] Creating client...
2026-01-17T16:54:00.612Z [DEBUG] [API:auth] OAuth token check starting
[... ~30 more parallel API calls within 30ms ...]
2026-01-17T16:54:01.171Z [DEBUG] High write ratio: blit=252, write=2486 (90.8% writes), screen=78x252
2026-01-17T16:54:02.210Z [DEBUG] High write ratio: blit=0, write=6401 (100.0% writes), screen=85x252
2026-01-17T16:54:10.196Z [DEBUG] Full reset (shrink->below): prevHeight=85, nextHeight=13, viewport=57
Steps to Reproduce
- Install multiple plugins that register many MCP tools and skills (e.g., beads plugin with 16 MCP tools + 27 skills)
- 2. Start a new Claude Code session
- 3. Type /context and press Enter
- 4. Observe display corruption with overlapping text running off screen
- 5. Session may crash/exit
Configuration that triggers this:
- beads@beads-marketplace (16 MCP tools, 27+ skills)
- - ralph-wiggum@claude-code-plugins (3 skills)
- - - swift-lsp@claude-plugins-official
- - - - grlf-base-plugin@grlf-marketplace
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.12 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Debug log file attached showing the flood of parallel API calls when /context renders.
The issue appears to be that /context triggers parallel token-counting API calls for every registered MCP tool and skill simultaneously, overwhelming both the API request handler and the terminal rendering.
Relevant log lines:
- Line 193: "Skills and commands included in Skill tool: beads:blocked, beads:close, beads:comments..." (30 items)
- - Lines 202-292: ~30 parallel "[API:request] Creating client" calls
- - - Line 305: "write=6401" - massive terminal write operation
Workaround: Avoid /context when many plugins are enabled, or temporarily disable plugins.
Related issues:
- https://github.com/anthropics/claude-code/issues/14800
- - https://github.com/anthropics/claude-code/issues/7328
- - - https://github.com/anthropics/claude-code/issues/7500
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗