You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resumed over-limit session is permanently stuck: prompts fail with "Prompt is too long", auto-compaction never triggers, and "/compact" is a silent no-op #1024
@zed-industries/claude-code-acp0.16.2 (spawned via npx -y @zed-industries/claude-code-acp@0.16.2)
Claude Code CLI 2.1.237, logged in via claude /login
Node v26.0.0, macOS (arm64)
Protocol: ACP v1 over stdio, plain JSON-RPC (no editor involved — reproduced with a raw stdio driver)
Summary
A session whose history is already near/over the model context limit (created in terminal Claude Code; ~21 MB jsonl, ~4200 updates replayed on session/load) becomes permanently unusable through the adapter:
session/load succeeds and replays history normally.
Any session/prompt fails with -32603 Internal error: Prompt is too long. The rejection is near-instant (~200 ms), so it looks like an SDK-side pre-check rather than an API round-trip.
Sending /compact" as a prompt (it is advertised in available_commands) returns stop_reason: end_turnin **~40 ms** with **zero**session/updatenotifications — nocompactingstatus, nocompact_boundary, no summary — and the session remains stuck: the next session/prompt` fails with the same error.
In terminal Claude Code the same situation is recoverable (claude --resume <id> + /compact), so the capability exists in the CLI; it is just unreachable through the adapter exactly when it is needed most.
Repro (raw JSON-RPC over stdio)
→ initialize {protocolVersion: 1}
→ session/load {sessionId: <big-session>, cwd: <its cwd>, mcpServers: []}
← ok (history replayed as session/update stream)
→ session/prompt {sessionId, prompt: [{type: "text", text: "hi"}]}
← error -32603 "Internal error: Prompt is too long" (~200 ms)
→ session/prompt {sessionId, prompt: [{type: "text", text: "/compact"}]}
← result {stopReason: "end_turn"} (~40 ms, no notifications at all)
→ session/prompt {sessionId, prompt: [{type: "text", text: "hi"}]}
← error -32603 "Internal error: Prompt is too long"
Environment
@zed-industries/claude-code-acp0.16.2 (spawned vianpx -y @zed-industries/claude-code-acp@0.16.2)claude /loginSummary
A session whose history is already near/over the model context limit (created in terminal Claude Code; ~21 MB jsonl, ~4200 updates replayed on
session/load) becomes permanently unusable through the adapter:session/loadsucceeds and replays history normally.session/promptfails with-32603 Internal error: Prompt is too long. The rejection is near-instant (~200 ms), so it looks like an SDK-side pre-check rather than an API round-trip./compact" as a prompt (it is advertised inavailable_commands) returnsstop_reason: end_turnin **~40 ms** with **zero**session/updatenotifications — nocompactingstatus, nocompact_boundary, no summary — and the session remains stuck: the nextsession/prompt` fails with the same error.In terminal Claude Code the same situation is recoverable (
claude --resume <id>+/compact), so the capability exists in the CLI; it is just unreachable through the adapter exactly when it is needed most.Repro (raw JSON-RPC over stdio)
Expected (any of these would unblock hosts)
/compact" oversession/prompt` actually executes compaction (today it silently no-ops in this state — possibly related to Surface the /compact conversation summary over ACP instead of dropping it #873, but here nothing runs at all, rather than the summary being dropped); or-32603) so hosts can detect the condition and guide users to recover in the terminal.Happy to provide the full driver script or additional traces if useful.
Related: #887, #296, #26, #873