Context Window Exhaustion with Minimal Token Usage

Resolved 💬 5 comments Opened Jul 29, 2025 by RaiAnsar Closed Jan 8, 2026

Claude Code reports context window exhaustion ("prompt is too long: 200426 tokens > 200000 maximum") despite user perception of minimal context usage (approximately 2% of expected capacity).
Environment

Platform: macOS (darwin)
Terminal: VS Code
Version: 1.0.62
Feedback ID: 6ebbed0c-9631-47e2-b652-e83e6d47d2a2

Primary Errors

  1. Token Limit Exceeded

invalid_request_error: prompt is too long: 200426 tokens > 200000 maximum

  1. Keychain Access Issues

security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain
Expected vs Actual Behavior

Expected: Context should remain well below limits with normal usage
Actual: Hitting 200K+ token limit unexpectedly
Impact: Unable to continue working, frequent interruptions

Possible Causes

Inefficient context management
Conversation history accumulation
Large files unnecessarily included in context
Token counting accuracy issues

Reproduction

Issue occurs during normal development workflow without explicit large file operations.

View original on GitHub ↗

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