Skip to content

Low Context Management in Claude Code CLI #5220

Closed as not planned
Closed as not planned

Description

@edhijlu

Bug Description
⎿  Context low · Run /compact to compact & continue

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.69
  • Feedback ID: b2a66285-ec93-4247-8217-6bcc8c4c7328

Errors

[{"error":"Error: Failed to create shell snapshot: zsh:5: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:10: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:11: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:14: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:24: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:25: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:27: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:34: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:40: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:41: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:42: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:43: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\nzsh:46: permission denied: /Users/user/.claude/shell-snapshots/snapshot-zsh-1754462654116-x6nzu6.sh\n\n    at file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:911:737\n    at ChildProcess.exithandler (node:child_process:427:5)\n    at ChildProcess.emit (node:events:518:28)\n    at ChildProcess.emit (node:domain:489:12)\n    at maybeClose (node:internal/child_process:1104:16)\n    at Socket.<anonymous> (node:internal/child_process:456:11)\n    at Socket.emit (node:events:518:28)\n    at Socket.emit (node:domain:489:12)\n    at Pipe.<anonymous> (node:net:343:12)","timestamp":"2025-08-06T06:44:14.209Z"},{"error":"MCPContentTooLargeError: MCP tool \"browser_wait_for\" response (25096 tokens) exceeds maximum allowed tokens (25000). Please use pagination, filtering, or limit parameters to reduce the response size.\n    at zN0 (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1295:7872)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async UTB (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1330:12222)\n    at async Object.call (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1330:6731)\n    at async Wj8 (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2786:10455)\n    at async Yu1 (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2786:6732)\n    at async rjB (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1917:1384)\n    at async Ij8 (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2786:5843)\n    at async Gj8 (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2786:5328)\n    at async pS (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2786:3792)","timestamp":"2025-08-06T06:45:24.551Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"too many total text bytes: 10911039 > 9000000\"}}\n    at B6.generate (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1262:2303)\n    at BS.makeStatusError (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1279:2101)\n    at BS.makeRequest (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1279:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async CN0 (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1295:6936)\n    at async zN0 (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1295:7767)\n    at async UTB (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1330:12222)\n    at async Object.call (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1330:6731)\n    at async Wj8 (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2786:10455)\n    at async Yu1 (file:///Users/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2786:6732)","timestamp":"2025-08-06T06:45:42.676Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 200132 tokens > 200000 m

Note: Error logs were truncated.

Activity

  1. github-actions commented on Aug 6, 2025

    @github-actions

    Found 3 possible duplicate issues:

    1. Temporary Shell Snapshot File Handling Failure in Long-Running Sessions #2725
    2. Anthropic API Request Exceeds Context Limit Maximum Token Threshold #4951
    3. [BUG] API Error: 400 Input is too long for requested model. #760

    If your issue is a duplicate, please close it and 👍 the existing issue instead.

    This issue will be automatically closed as a duplicate in 3 days if there are no additional comments. To prevent auto-closure, please 👎 this comment.

    🤖 Generated with Claude Code

  2. PaoloC68 commented on Aug 13, 2025

    @PaoloC68

    This is NOT a duplicate - it's a critical, unresolved issue affecting daily productivity

    👎 Preventing auto-closure. This issue represents a fundamental architectural flaw that has persisted since June 2024 (#2139) without any official resolution.

    Why this is unique and critical:

    1. Context calculation is completely broken: Shows 0%, NaN%, or 102% - these are not UI glitches but symptoms of corrupted state management that persists even after reinstallation.

    2. The compaction loop makes the tool unusable: When /compact triggers "Conversation too long" errors (175,272 + 32,000 > 200,000 limit), it creates an infinite recursion where compaction itself needs compaction. This isn't a simple "input too long" error - it's a systemic failure.

    3. Shell snapshot failures cascade into context corruption: The permission errors (permission denied: /Users/user/.claude/shell-snapshots/) aren't isolated - they trigger context management failures that compound into complete tool breakdown.

    Community workarounds shouldn't be necessary for a $200/month tool:

    Temporary fix that works (but shouldn't be needed):

    # Downgrade to v1.0.51
    claude update --version 1.0.51
    claude config set -g autoUpdates disabled

    The fact that we need to:

    • Downgrade to a 6-month-old version
    • Disable auto-updates
    • Use parallel git worktrees
    • Strategic /clear patterns
    • Microcompact features that only partially work

    ...just to have a functional development environment is unacceptable.

    The pattern of silence is concerning:

    • June 2024: Issue [BUG] Claude stops with snapshot error #2139 opened about shell snapshots
    • Multiple "fixes": v1.0.52 claimed to fix it, made it worse
    • Marked as closed: Despite ongoing reports
    • Now January 2025: Same core issues, new symptoms, zero communication

    What we need from Anthropic:

    1. Stop auto-closing these as duplicates - they're symptoms of the same unresolved core issue
    2. Acknowledge that context management is fundamentally broken
    3. Provide a timeline or at least communicate that you're aware
    4. Explain why issues are marked "closed" when they're clearly not fixed

    Professional developers are losing hours daily to context management instead of coding. The microcompact in v1.0.68+ helps but doesn't solve the core issue. We're essentially paying $200/month to beta test a broken tool while being forced to use 6-month-old versions.

    This is not a duplicate. This is THE ongoing issue that's been ignored for 7+ months.

  3. github-actions commented on Dec 3, 2025

    @github-actions

    This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

  4. Canopus20 commented on Dec 31, 2025

    @Canopus20

    Still no update, and this issue persists even with 10-15% context usage.

  5. github-actions commented on Jan 30, 2026

    @github-actions

    This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

  6. github-actions commented on Feb 7, 2026

    @github-actions

    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.

  7. locked as resolved and limited conversation to collaborators on Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions