🚨 BUG: Persistent Unnecessarily Auto-Compact Triggered in an INFINITE LOOP - MAKING CLAUDE CODE USELESS!
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 11 comments · opened Jun 19, 2025 · closed Jan 4, 2026
Bug Description
"Context left until auto-compact: 169%" CLAUDE IS COMPACTING AGAIN and AGAIN and AGAIN GETTING DONE ABSOLUTELY NOTHING!!!!!!!!!!!!!
:angry:! It makes ZERO sense! This project had a empty CLAUDE.md, and I deleted it. BOTH no difference! RESTARTING DOESN'T WORK EITHER!!!
EVEN A fucking /init triggers auto-compact right away!!!
Environment Info
- Platform: darwin
- Terminal: intellij
- Version: 1.0.29
- Feedback ID: 7b078624-922c-4a2e-817b-a133a96795dc
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at EZ (file:///Users/larsartmann/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:659:3921)\n at file:///Users/larsartmann/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:582:9014\n at Q (file:///Users/larsartmann/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:526:17199)\n at QX (file:///Users/larsartmann/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:582:8160)\n at qS (file:///Users/larsartmann/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:582:7241)\n at L9 (file:///Users/larsartmann/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:582:11408)","timestamp":"2025-06-19T03:30:30.454Z"},{"error":"Error: Request was aborted.\n at so._createMessage (file:///Users/larsartmann/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:1306:6810)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-06-19T03:37:26.804Z"},{"error":"Error: Request was aborted.\n at Ow.makeRequest (file:///Users/larsartmann/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:1315:3597)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-06-19T03:37:26.836Z"}]
_Note: I did not edit my feedback from what /bug created._
11 Comments
Hi, could you try running
/statusto see what additional memory files might be getting included in the context?~/.claude/CLAUDE.mdis included. It's 202 lines, 6867 characters, and 6.867 bytes.This is very unlikely the root cause.
vis: @levpopov
I managed to get Claude Code working again by disabling auto-compact (which is not nice, but at least it works).
Currently I get stuff like this:
Context low (214% remaining)or directly after a manual compact:Context low (100% remaining)I just updated to the latest version of Claude Code, and restarted a conversation. It seemed to not respect the global config. Try:
Another person managed to get it working after a restart. See: https://github.com/anthropics/claude-code/issues/2391#issuecomment-2993237142
Found a workaround. Not sure how detrimental it is to context awareness, but deleting/renaming the settings.local file in the .claude folder fixed the context issues for me. I am guessing the file just got too large for Claude to be able to effectively read because of all the bash commands it stored away that weren't reusable in most cases.
if you want to YOLO it, you can use "claude --dangerously-skip-permissions" to bypass permission prompts (the ones that when saved to the project, fill up the setting.local.json file and ultimately cause the context issue)
But that is absolute last resort and very dangerous to do. Hence the flag name....
I'm in the exact same loop and my settings.local is only 38 lines. I don't think that's the root cause.
I don't think it's the root cause either, but it's worth trying the workaround to see if it gets you out of it.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.