"Prompt too long" causes complete hardlock requiring session restart
Resolved 💬 6 comments Opened Jan 30, 2026 by cryongmbh Closed Mar 3, 2026
Description
During long coding sessions, Claude Code hits a "Prompt too long" error and then becomes completely unresponsive — no further input is accepted, requiring a full session restart. This happened 6 times in a single working day.
Environment
- Model: Claude Opus 4.5 (
claude-opus-4-5-20251101) - Platform: Linux (openSUSE, kernel 6.18.7-1-default)
- Claude Code: VSCode extension
- Session type: Long coding sessions with a large Laravel codebase
Reproduction pattern
- Start a session involving multiple file reads across a large codebase
- Launch parallel agents (e.g., 5 concurrent security audit agents)
- Continue working with file edits, searches, and conversation
- Eventually "Prompt too long" appears
- After this error, Claude Code is completely hardlocked — no response to any input
- Only recovery is to restart the session entirely, losing all accumulated context
Impact
- Context loss: Mid-task state (e.g., "halfway through fixing 12 security audit findings") is lost on every restart
- Workflow disruption: Having to re-explain project context, standards, and current task state after each restart
- Frequency: 6 occurrences in one day makes this a blocking issue for sustained development work
- The auto-summarization on session continue helps, but cannot fully capture in-progress task state
Expected behavior
Either:
- Graceful context trimming that keeps the session responsive, or
- A clear recovery path that doesn't require a full restart (e.g., automatic summarization and continuation)
Additional context
The sessions involve heavy tool use: parallel agent launches, many file reads (Blade templates, PHP controllers, models), grep/glob searches, and bash commands. The combination of large file contents + parallel agent outputs seems to accelerate hitting the limit.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗