Claude Code anti-regression settings — force max-effort thinking when the agent "gets dumber"
Problem solved: Mid-2026 Claude Code regression dropped read/edit ratio from 6.6 → 2.0 and doubled loop rate; settings + env vars restore quality at 2–4× token cost until upstream patches.
What
Forces Claude Code into its highest-effort thinking mode and disables adaptive thinking — the dynamic behavior that throttles thinking budget on "easy" steps and is implicated in the regression. Adds an explicit MAX_THINKING_TOKENS ceiling and (optionally) shrinks the working window to force earlier compaction. Combined effect: the agent stops short-circuiting and resumes the read-heavy, edit-careful behavior operators expected.
Why it matters
Anthropic engineering acknowledged the regression on HN. Operator-reported symptoms: more failed edits, more re-reads, more "I'll just try this" loops. The settings below are a workaround, not a fix — but they cost only token spend, and they materially restore quality on long sessions until the upstream patch ships.
End-to-end
- Edit
~/.claude/settings.jsonand seteffortLevel: "high"(or"max"per session if needed). - Add the env vars below to the same file's
envblock:CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1andMAX_THINKING_TOKENS=128000. - Optional: set
CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000to force earlier compaction, keeping the working context smaller. - Restart Claude Code.
- One-shot alternative:
npm install -g claude-code-anti-regression && cc-anti-regression install. Usecc-anti-regression checkto diagnose first;cc-anti-regression uninstallto roll back. - When upstream patches, roll back — these settings double or quadruple token spend.
Prompts
{
"effortLevel": "high",
"env": {
"CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING": "1",
"MAX_THINKING_TOKENS": "128000"
}
}
npm install -g claude-code-anti-regression
cc-anti-regression check # diagnostic
cc-anti-regression install # apply
cc-anti-regression uninstall # rollback
Gotchas
This is a workaround, not a fix. Token spend goes up 2–4× while it's on. Set a calendar reminder to roll back after the upstream patch (track the GitHub issue linked in the Anthropic HN thread). If your plan caps usage, you'll hit it faster — consider this only when you have token headroom or when quality genuinely matters more than spend.
Tools
- Claude Code CLI
- npm (only for the one-shot CLI wrapper)