Skip to content

"Infinite Auto-Compact Loop Causing Performance Degradation" #2222

Closed as not planned

Description

@sean-rowe

Bug Description
I'm seeing this Context left until auto-compact: NaN% and it keeps compacting, using up all of my time.

Environment Info

  • Platform: linux
  • Terminal: wsl-Ubuntu
  • Version: 1.0.27
  • Feedback ID: bae01ce8-23f0-4fde-bf51-3d568651441c

Errors

[{"error":"Error: Request was aborted.\n    at no._createMessage (file:///home/srowe/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1306:6810)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-17T22:11:18.851Z"},{"error":"Error: Request was aborted.\n    at Tw.makeRequest (file:///home/srowe/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1315:3597)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-17T22:11:18.872Z"},{"error":"Error: Request was aborted.\n    at Tw.makeRequest (file:///home/srowe/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1315:3784)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-17T22:11:36.841Z"},{"error":"Error: Request was aborted.\n    at Tw.makeRequest (file:///home/srowe/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1315:3597)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-17T22:11:36.864Z"}]

Activity

  1. Andre-Profitt commented on Jun 20, 2025

    @Andre-Profitt

    I second this. i used /clear, and it is stuck on auto-compact loop

  2. LarsArtmann commented on Jun 21, 2025

    @LarsArtmann

    This seems to be related to my Issue: #2283 and #2387

  3. LarsArtmann commented on Jun 21, 2025

    @LarsArtmann

    Tip

    WORK AROUND: Disable auto-compact via claude config set -g autoCompactEnabled false and /compact manually.

    It's not great but at least it works (for me).

  4. LarsArtmann commented on Jun 21, 2025

    @LarsArtmann

    Another person managed to get it working after a restart. See: #2391 (comment)

  5. nlev8 commented on Jun 27, 2025

    @nlev8

    It was resolving on its own a few times but now persists. Restarting VS Code and my computer doesn't help either.
    getting this constantly:
    API Error (Request timed out.) · Retrying in 1 seconds… (attempt 1/10)
    ⎿ API Error (Request timed out.) · Retrying in 1 seconds… (attempt 2/10)
    ⎿ API Error (Request timed out.) · Retrying in 2 seconds… (attempt 3/10)

  6. jleechan2015 commented on Jun 28, 2025

    @jleechan2015

    Seeing this too. Everything seems slow. Even if I disable auto compact performing worse than before this issue

  7. Oxytra commented on Jul 1, 2025

    @Oxytra

    yes. it seems now its high time switching claude code completely with some other coding agent or degrading max subscription with 20 USD subscription.

  8. LarsArtmann commented on Jul 16, 2025

    @LarsArtmann

    Tip

    My recommendations so far: #2391 (comment)

  9. Codewow commented on Aug 25, 2025

    @Codewow

    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....

  10. github-actions commented on Dec 7, 2025

    @github-actions

    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.

  11. racerx2 commented on Dec 15, 2025

    @racerx2

    come on man fix this crap! Paying users out here bro damn!

  12. github-actions commented on Jan 15, 2026

    @github-actions

    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.

  13. github-actions commented on Jan 23, 2026

    @github-actions

    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.

  14. locked as resolved and limited conversation to collaborators on Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions