Repository navigation
Closed
Labels
area:apiarea:corebugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already existshas reproHas detailed reproduction stepsHas detailed reproduction stepsmemoryplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS
Description
Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report (please file separate reports for different bugs)
- I am using the latest version of Claude Code
What's Wrong?
Auto compacting conversation breaks and loses ability to continue. Must /clear and move on losing all previous context.
⎿ Context low · Run /compact to compact & continue
/compact
⎿ Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"clear_thinking_20251015strategy requiresthinkingto be
enabled"},"request_id":"req_011CV5GKqn5UXHegb6p6X3qh"}
What Should Happen?
Should compact conversation and continue with previous context.
Error Messages/Logs
> /compact
⎿ Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"`clear_thinking_20251015` strategy requires `thinking` to be
enabled"},"request_id":"req_011CV5G9fEoAybGwoHK6PhxF"}
> /compact
⎿ Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"`clear_thinking_20251015` strategy requires `thinking` to be
enabled"},"request_id":"req_011CV5GFKounnQkbjFncUVp3"}
> /compact
⎿ Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"`clear_thinking_20251015` strategy requires `thinking` to be
enabled"},"request_id":"req_011CV5GFW73FdfX2fqFC3qei"}
> /compact
⎿ Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"`clear_thinking_20251015` strategy requires `thinking` to be
enabled"},"request_id":"req_011CV5GFgV7kfHEhjNH1uAcw"}
> /compact
⎿ Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"`clear_thinking_20251015` strategy requires `thinking` to be
enabled"},"request_id":"req_011CV5GG4m4p6kML4Msvh4oa"}Steps to Reproduce
Use ClaudCode latest version long enough to auto compact conversation.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.31
Claude Code Version
2.0.36
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response
Reacted by Suzanne Byington
Metadata
Metadata
Assignees
Labels
area:apiarea:corebugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already existshas reproHas detailed reproduction stepsHas detailed reproduction stepsmemoryplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS
Activity
homains-ou commentedon Nov 13, 2025
for now write the word "ultrathink" before your command , that fixes the issue
puravidapos-admin commentedon Nov 13, 2025
before every command, or just at the time it fails?
mbinde commentedon Nov 15, 2025
Writing "ultrathink" did not fix it for me, I had to just use /clear. Updating: and that instance of Claude fails to autocompact again when the context hits 0% again. So rather than using /clear, it's better to just start a new Claude.
hsellik commentedon Nov 15, 2025
Had the same error, worked with ultrathink, but seemed weird, updated
claude-codevia Homebrew and now it works properly.ngregorich commentedon Nov 15, 2025
I ran into a similar issue
/cleardid not work for meultrathink/quitthenclaudedid work for mePhysics-of-Data commentedon Nov 16, 2025
❌️ /clear
❌️ /quit
❌️ reinstall claude
❌️ deleted $HOME/.claude
❌️ deleted all custom commands
/ultrathinkseems to work but wouldn't be wasting precious tokens?Claude is of the opinion that the problem is in the app and the API server.
8erya commentedon Nov 16, 2025
I encountered this exact error on
2.0.36. The root cause is a conflict with theclear_thinking_20251015strategy in older versions.Solution
Update to the latest version (currently
2.0.42):After updating,
/compactworks as expected.WSL Users
If
claude --versionstill shows2.0.36after updating, you may have multiple installations. Check with:If it points to
/mnt/c/Users/[username]/AppData/Roaming/npm/claude, you have a stale Windows installation taking precedence. Remove it:rm /mnt/c/Users/[username]/AppData/Roaming/npm/claude* rm -rf /mnt/c/Users/[username]/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-codeThen reinstall on the Linux side:
Can confirm this resolves both the
/compacterror and theclear_thinkingstrategy issue.puravidapos-admin commentedon Nov 16, 2025
No longer an issue for me either after upgrading.
devbeno commentedon Nov 17, 2025
only this solution work
szwang commentedon Nov 17, 2025
Closing as this is fixed as of
2.0.37— so sorry for the friction here, and thank you for reporting!grzegorzdrozda-lab commentedon Nov 18, 2025
I just click tab to turn on thinking and now it works
Theshedman commentedon Nov 19, 2025
I am having this issue now. Claude version 2.0.46
ericdfields commentedon Nov 19, 2025
Same issue and version as @Theshedman
pankajvkulkarni commentedon Nov 20, 2025
⎿ API Error: 400 {"message":"context_management.edits.0: Input tag 'clear_thinking_20251015' found using 'type' does not match any of the expected tags:
'clear_tool_uses_20250919'"}
claude --version
2.0.47 (Claude Code)
zeenix commentedon Nov 20, 2025
Same here as @pankajvkulkarni wrote. It's getting very annoying.
juliankrispel commentedon Nov 27, 2025
Same here, super annoying:
clear_thinking_20251015strategy requiresthinkingto be enabled`Physics-of-Data commentedon Nov 27, 2025
Where is 2.0.37?
The issue with 'clear_thinking_20251015' still is here. I cannot get the latest with
npm install -g @anthropic-ai/claude-code@latest.cozwoodiov commentedon Nov 29, 2025
Confirming this on v2.0.55, Linux (Ubuntu/Debian).
Impact on workflow:
This bug is causing serious workflow disruption. When compaction fails, Claude Code enters a death spiral of repeated errors until the session becomes completely unusable and
loses all context.
Current workaround:
I have to proactively monitor for compaction errors and
/clearthe session before total failure, timing it after documenting work-in-progress. This means:Configuration:
alwaysThinkingEnabled: truein~/.claude/settings.jsonNote on issue #11533:
This was marked as "fixed in v2.0.37" and closed on Nov 17, but the bug is clearly still present in v2.0.55 (latest version). This appears to be a regression that needs immediate
attention.
This needs to be prioritized - the current state makes Claude Code unreliable for long work sessions.
cozwoodiov commentedon Nov 29, 2025
Update: Bug Isolated to Opus 4.5 (2025-11-29)
Finding: Successfully completed conversation compaction using Sonnet 4.5 without encountering hallucination issues. This confirms the bug is specific to Opus 4.5, not
Sonnet 4.5.
Workaround for Users:
If you encounter conversation compaction hallucinations, switch to Sonnet 4.5:
claude --model sonnet Test Results: - ✅ Sonnet 4.5: Conversation context preserved correctly, no fabricated content - ❌ Opus 4.5: Hallucinations during compaction (original bug reports) This suggests the issue is model-specific and can be avoided by using Sonnet until Opus compaction is fixed.github-actions commentedon Dec 7, 2025
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.