[Bug] Windows Auto-Compact triggers prematurely with "Conversation too long" error
Resolved 💬 3 comments Opened Jan 7, 2026 by phoenixf Closed Feb 20, 2026
Bug Description
my claude code in windows is always crashing asking to run compact, mas when i run it says: "Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few messages and try again" but the conversation isnt even that long, in linux / wsl i never had this kind of problem
Environment Info
- Platform: win32
- Terminal: null
- Version: 2.0.76
- Feedback ID: b9faa7ed-3da6-4f72-9602-351f5a07cdd9
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 200690 tokens > 200000 maximum\"},\"request_id\":\"req_011CWq3cavi6C7te7oZek57X\"}\n at generate (B:/~BUN/root/claude.exe:451:11098)\n at makeRequest (B:/~BUN/root/claude.exe:798:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-05T22:47:47.664Z"},{"error":"Error: File has been unexpectedly modified. Read it again before attempting to write it.\n at call (B:/~BUN/root/claude.exe:1805:769)\n at async Vo1 (B:/~BUN/root/claude.exe:2139:17437)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-05T23:46:51.180Z"},{"error":"Error: File has been unexpectedly modified. Read it again before attempting to write it.\n at call (B:/~BUN/root/claude.exe:1805:769)\n at async Vo1 (B:/~BUN/root/claude.exe:2139:17437)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-05T23:46:52.524Z"},{"error":"Error: File has been unexpectedly modified. Read it again before attempting to write it.\n at call (B:/~BUN/root/claude.exe:1805:769)\n at async Vo1 (B:/~BUN/root/claude.exe:2139:17437)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-05T23:47:18.747Z"},{"error":"Error: File has been unexpectedly modified. Read it again before attempting to write it.\n at call (B:/~BUN/root/claude.exe:1805:769)\n at async Vo1 (B:/~BUN/root/claude.exe:2139:17437)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-05T23:47:20.067Z"},{"error":"Error: File has been unexpectedly modified. Read it again before attempting to write it.\n at call (B:/~BUN/root/claude.exe:1805:769)\n at async Vo1 (B:/~BUN/root/claude.exe:2139:17437)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-05T23:47:36.564Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 204914 tokens > 200000 maximum\"},\"request_id\":\"req_011CWqBdPSrdepvkxF6iWNaC\"}\n at generate (B:/~BUN/root/claude.exe:451:11098)\n at makeRequest (B:/~BUN/root/claude.exe:798:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-06T00:32:53.285Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 205035 tokens > 200000 maximum\"},\"request_id\":\"req_011CWqBt4nsBBzAwmEaDmzbq\"}\n at generate (B:/~BUN/root/claude.exe:451:11098)\n at makeRequest (B:/~BUN/root/claude.exe:798:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-06T00:36:12.388Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 205235 tokens > 200000 maximum\"},\"request_id\":\"req_011CWrHTnDFWShZmdcbX65Ej\"}\n at generate (B:/~BUN/root/claude.exe:451:11098)\n at makeRequest (B:/~BUN/root/claude.exe:798:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-06T14:30:00.418Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at readFileSync (unknown)\n at <anonymous> (B:/~BUN/root/claude.exe:12:500)\n at tX (B:/~BUN/root/claude.exe:11:8463)\n at readFileSync (B:/~BUN/root/claude.exe:12:465)\n at dqD (B:/~BUN/root/claude.exe:4694:22550)\n at call (B:/~BUN/root/claude.exe:963:945)\n at call (B:/~BUN/root/claude.exe:959:6251)\n at Vo1 (B:/~BUN/root/claude.exe:2139:17437)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-06T21:41:53.070Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at readFileSync (unknown)\n at <anonymous> (B:/~BUN/root/claude.exe:12:500)\n at tX (B:/~BUN/root/claude.exe:11:8463)\n at readFileSync (B:/~BUN/root/claude.exe:12:465)\n at dqD (B:/~BUN/root/claude.exe:4694:22550)\n at call (B:/~BUN/root/claude.exe:963:945)\n at call (B:/~BUN/root/claude.exe:959:6251)\n at <anonymous> (B:/~BUN/root/claude.exe:3437:1507)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-01-06T22:25:40.133Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗