[Bug] Compaction fails with "Conversation too long" error when context limit reached
Resolved 💬 3 comments Opened Jan 30, 2026 by anthony-ferraro Closed Feb 3, 2026
Bug Description
When an agent is performing a long-running task, it often reaches the Context limit reached · /compact or /clear to continue.
however if I type /compact to continue the large task I get this message:
Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few
messages and try again.
this is extremely frustrating and I have to copy the execution plan to a new session to continue. the context limit should be reached with enough context to compact
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.25
- Feedback ID: 021d3ea4-a797-495d-a489-c1ae67caf78b
Errors
[{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n at readdirSync (unknown)\n at <anonymous> (/$bunfs/root/claude:12:2063)\n at iW (/$bunfs/root/claude:11:35715)\n at readdirSync (/$bunfs/root/claude:12:2024)\n at wQR (/$bunfs/root/claude:1783:380)\n at wQR (/$bunfs/root/claude:1783:1350)\n at <anonymous> (/$bunfs/root/claude:1783:4670)\n at <anonymous> (/$bunfs/root/claude:1783:5401)\n at A (/$bunfs/root/claude:11:7259)\n at Ay8 (/$bunfs/root/claude:4793:4342)","timestamp":"2026-01-30T13:47:26.073Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/aferraro/.local/share/claude/versions/2.1.25 (expected in multi-process scenarios)\n at kzR (/$bunfs/root/claude:3940:2098)\n at JxA (/$bunfs/root/claude:3940:1209)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-30T13:47:26.090Z"},{"error":"AbortError: The operation was aborted.\n at unknown\n at abortChildProcess (node:child_process:935:42)\n at onAbortListener2 (node:child_process:35:24)\n at abort (unknown)\n at <anonymous> (/$bunfs/root/claude:5149:2153)","timestamp":"2026-01-30T13:59:51.691Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n at readdirSync (unknown)\n at <anonymous> (/$bunfs/root/claude:12:2063)\n at iW (/$bunfs/root/claude:11:35715)\n at readdirSync (/$bunfs/root/claude:12:2024)\n at wQR (/$bunfs/root/claude:1783:380)\n at wQR (/$bunfs/root/claude:1783:1350)\n at <anonymous> (/$bunfs/root/claude:1783:4670)\n at <anonymous> (/$bunfs/root/claude:1783:5401)\n at A (/$bunfs/root/claude:11:7259)\n at Ay8 (/$bunfs/root/claude:4793:4342)","timestamp":"2026-01-30T14:01:04.420Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 212427 tokens > 200000 maximum\"},\"request_id\":\"req_011CXdiEfgZMQYCFc81EaAHa\"}\n at generate (/$bunfs/root/claude:145:37655)\n at makeRequest (/$bunfs/root/claude:162:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-30T14:21:53.919Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 213458 tokens > 200000 maximum\"},\"request_id\":\"req_011CXdiF3ZCqkmxFeat45gJc\"}\n at generate (/$bunfs/root/claude:145:37655)\n at makeRequest (/$bunfs/root/claude:162:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-30T14:21:57.893Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 214789 tokens > 200000 maximum\"},\"request_id\":\"req_011CXdiFAGmXEsFQ8HxjPU9b\"}\n at generate (/$bunfs/root/claude:145:37655)\n at makeRequest (/$bunfs/root/claude:162:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-30T14:21:59.392Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 216259 tokens > 200000 maximum\"},\"request_id\":\"req_011CXdiFEv59AwS7cnxNNoGB\"}\n at generate (/$bunfs/root/claude:145:37655)\n at makeRequest (/$bunfs/root/claude:162:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-30T14:22:00.738Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 217673 tokens > 200000 maximum\"},\"request_id\":\"req_011CXdiFb33VV1KJ28P9EZGh\"}\n at generate (/$bunfs/root/claude:145:37655)\n at makeRequest (/$bunfs/root/claude:162:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-30T14:22:05.529Z"},{"error":"Error: Conversation too long. Press esc twice to go up a few messages and try again.\n at bhT (…
Note: Content was truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗