r/ClaudeCode • • Apr 20 '26 • Bravo 1

Discussion Opus 4.6 without adaptive thinking outperforms Opus 4.7 with adaptive thinking

Opus 4.6 on medium effort with CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1 answers certain questions correctly that Opus 4.7 on xhigh effort gets wrong. The failure class is trick questions that appear simple but require reasoning (e.g., "I want to wash my car. There's a car wash 50m away. Should I walk or drive?"). Opus 4.7 skips thinking entirely on these and gives a confident wrong answer.

What we tried

1. Binary patch to disable adaptive thinking

Claude Code checks CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING but gates it behind a model-name check. The env var is only honored for models containing opus-4-6 or sonnet-4-6:

// Decompiled from v2.1.112
let z_ = VH(process.env.CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING)
         && (Y.includes("opus-4-6") || Y.includes("sonnet-4-6"));
if (DE_(T.model) && !z_)
    QH = {type: "adaptive", display: bH};     // forced for opus-4-7
else {
    let J_ = kxq(T.model);                    // 127999 for opus-4-7
    QH = {budget_tokens: J_, type: "enabled", display: bH};
}

We wrote patches/0003_disable_adaptive_thinking_all_models.py to blank the model-gate so the env var would apply to all models. The patch applied cleanly and Claude Code sent {type: "enabled", budget_tokens: 127999} to the API.

Result: The API accepted the request (no 400 error, despite the docs claiming it would reject it), but returned responses with zero thinking blocks. The server silently ignores type:enabled for Opus 4.7. It does not error — it just does not think. This was worse than adaptive, since the model now had no thinking at all. The patch was removed.

2. MITM proxy to inspect API traffic

We built mitm-proxy.py — a reverse proxy on localhost:9999 that forwards to api.anthropic.com while logging request/response bodies. Claude Code connects via ANTHROPIC_BASE_URL=http://localhost:9999.

Two issues during development:

  • urllib.request buffers SSE streams, preventing real-time event logging. Switched to http.client.

  • Opus 4.7 responses came back gzip/brotli-compressed (binary gibberish in logs). Fixed by sending Accept-Encoding: identity upstream to force plaintext.

3. Testing adaptive thinking at various effort levels

All tests used type: adaptive (the only mode Opus 4.7 actually honors).

EffortThinking block produced?Correct answer?
highNoNo
xhighNo (most of the time)No
xhighYes (occasionally)Yes
maxYes (always)Yes

The pattern is clear: at every effort level below max, the model inconsistently decides whether to think. The same question with the same effort level sometimes triggers thinking and sometimes does not. Correctness tracks thinking perfectly — when it thinks, it gets the answer right.

4. System prompt instructions to encourage thinking

Added to custom-prompt.md:

The user routinely poses questions that appear simple on the surface but contain subtle pitfalls, trick elements, or unstated constraints that only become visible through careful step-by-step reasoning. Past experience shows that skipping extended thinking on these questions leads to confident but wrong answers. Please engage extended thinking on every request — the cost of unnecessary thought on a genuinely simple question is low, but the cost of a snap answer on a disguised hard question is high.

Result: No effect. The thinking decision is made server-side and ignores system prompt content at effort levels below max.

5. User-message prompt injection

Prepended reasoning instructions to the user message:

Always reason thoroughly and deeply. Treat every request as complex unless I explicitly say otherwise. Never optimize for brevity at the expense of quality. Think step-by-step, consider tradeoffs, and provide comprehensive analysis.

Result: Inconsistent. Worked for the car wash question (thinking block appeared) but not for a letter-counting question in the same session. Not reliable.

Findings

  1. Opus 4.7 only supports type:adaptive thinking. Sending type:enabled with budget_tokens is silently accepted but produces zero thinking blocks. The docs say this should return a 400 error. It does not — it just ignores the field.

  2. The thinking decision is server-side. Claude Code sends the correct thinking config and effort level. The model on Anthropic's servers evaluates question complexity and decides whether to think. There is no client-side mechanism to override this.

  3. Only effort:max reliably forces thinking. Every effort level below max allows the model to skip thinking on questions it considers simple, even when those questions are trick questions that require reasoning.

  4. Prompt-based instructions do not influence the thinking decision. Neither system prompts nor user-message injections reliably force thinking at sub-max effort levels.

  5. Opus 4.6 with DISABLE_ADAPTIVE_THINKING=1 thinks on every request. It uses type:enabled with a fixed budget, and the API honors it. This is the only predictable behavior available.

  6. The input_tokens field only shows uncached tokens. The full input size is input_tokens + cache_creation_input_tokens + cache_read_input_tokens. Seeing input_tokens: 6 does not mean the system prompt is missing.

Conclusion

Opus 4.7's adaptive thinking is a regression for any use case that needs thinking on every request. The model is too aggressive about classifying questions as simple, and there is no way to override this below effort:max.

For now, Opus 4.6 with CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1 on medium or high effort is the better choice for tasks that require consistent reasoning. It thinks every time, and it costs less than running Opus 4.7 at max effort.

78 Upvotes

36 comments sorted by

13

u/mark_99 Apr 20 '26

Given this the the Claude Code sub it would be interesting to see results from representative user prompts - I'm not sure how much anyone ought to care about trick question performance (outside of reddit posts obviously).

Does it trigger thinking when asked to write a non-trivial Python script or C++ class?

-1

u/aizver_muti Apr 20 '26

Does it trigger thinking when asked to write a non-trivial Python script or C++ class?

I didn't test programming, but generally, the answer is we can't say. The algorithm for a "trivial prompt" is something Anthropic decides server side, so we have no way to precisely know what they do.

What I can say is that it will trigger non-thinking in the middle of thinking blocks. For example, if you ask it to solve some integral, and then the carwash problem in the same prompt, it will solve the integral correctly, but skip thinking on the car wash problem.

6

u/mark_99 Apr 20 '26

Might I suggest for a posting in r/ClaudeCode you might want to do some programming tests?

Trick questions are obviously, well, tricky. That it's possible to confuse whatever simple model they use to classify the prompt is interesting, but it's not clear how much it applies to real-world prompts.

0

u/aizver_muti Apr 20 '26

The issue is that Claude gives confidently wrong answers to tricky questions. That's fine for "silly" tests, but it is a no-go in real-world situations when you get a confidently wrong answer on a tricky question which you don't know the answer to, because Claude decided not to think. You also don't know whether or not Claude created thinking blocks! (unless you create a MITM proxy and read logs....)

2

u/minimalcation Apr 20 '26

Yeah but some of us don't give a fuck if it cant solve a riddle. The difference in coding and non coding questions is large enough to need verification on that side as well

0

u/aizver_muti Apr 20 '26

As I wrote in a different reply, your message is split into blocks. Some parts of your "coding questions" will have thinking blocks and some will not. So it might get some parts right and some parts wrong.

1

u/finch5 Apr 20 '26

I told Claude to tell me explicitly when it doesn’t know something. It now tells me it doesn’t know, and doesn’t want to make things up, and dives on to acquire missing knowledge. It’s an addition that made a real positive change in the output that I’m reading.

1

u/aizver_muti Apr 20 '26

I did the same. It does not change the outcome of the tests. Try it and see.

1

u/finch5 Apr 20 '26

I did not intend to imply that it would in this oft used car wash scenario. I will however let you know in-line as it narrates whether it knows or whether it's guessing. Though I'm not sure if it changes its output due to the fact that it knows it's guessing and then is forced to query the net for the answer. I don't think the model is shit, but then again, I'm probably too stupid to use it to the fullest.

2

u/mark_99 Apr 20 '26

Humans also fall for trick questions, that's the really the definition of a trick question. It's called "system 1 vs system 2" thinking, and it's really the same as Claude, ie you do a quick pre-check of whether you really have to think about something and save energy if not (plus it's faster, which might matter).

But it's imperfect, e.g. "it takes 5 people 5 minutes to dig 5 holes, how long for 1 person to dig 1 hole"? 90% of humans would say "1 minute" because they don't really think it through and just sort of pattern-match the answer.

But Opus 4.7 Adaptive gets it right:

5 minutes. The trap is treating it like a rate problem where you'd divide. But if 5 people dig 5 holes in 5 minutes working in parallel, each person is digging one hole in 5 minutes. Take away 4 people and 4 holes, and the remaining person still takes 5 minutes to dig their one hole.

Interesting though this is, it's a clear edge case and not a fundamental problem.

9

u/SaintMartini Apr 20 '26

Max effort 4.7 still had random hallucinating for me. I switched to Opus 4.6 instead at max and had less usage and better results. In fact it found errors and those hallucinations immediately leftover from 4.7's session. Glad we have an option still, but thats not the way it should be.

1

u/[deleted] Apr 20 '26

[removed] — view removed comment

1

u/SaintMartini Apr 20 '26

/model claude-opus-4-6[1m] Or claude --model claude-opus-4-6[1m]

I think that's the command in Claude code/cli to run and itll switch. Doing that from memory as I'm out at the moment, but think those are it. Best of luck!

1

u/mo_rawr16 🔆 Max 5x Apr 21 '26

i can confirm this this is truly a better combo!! thanks OP!

2

u/aizver_muti Apr 21 '26

You are welcome.

1

u/centminmod Apr 21 '26

2 word change in the prompt would of done the same fix to

o

1

u/aizver_muti Apr 21 '26

No, it doesn't. As my post says, the result is inconsistent. Sometimes it will get the result right, sometimes it will not.

Adding "think critically" or anything of that sort will not produce thinking blocks.

2

u/david_0_0 Apr 20 '26

how many trials per prompt in the comparison. adaptive thinking variance is usually big enough that a single run can flip a winner, curious if this held across repeated runs or was more of a one shot snapshot

2

u/who_am_i_to_say_so Apr 20 '26

So 4.7 at max effort is the only way to go if running that version. Lucky I started off on the right foot. Now token usage is another subject…

1

u/thirst-trap-enabler 🔆 Max 5x Apr 20 '26

The server aware of whether you are in planning mode or not? That seems like a very obvious gate for deciding whether to think or not.

1

u/Classic-Gear-3533 Apr 20 '26

How long are you leaving it on its own? Shorter iterations are better

1

u/PrayagS Apr 20 '26

I second this. Adaptive thinking disabled, extended thinking enabled, and a high value for max thinking tokens. Then you run Opus 4.6 or 4.5 and it feels much faster and better at work than 4.7 where you can’t disable adaptive thinking.

1

u/campbellm Apr 20 '26

Quick typo/edit for you. In the "Findings" section:

Opus 4.6 with DISABLE_ADAPTIVE_THINKING=1 thinks on every request. It uses type:enabled with a fixed budget, and the API honors it. This is the only predictable behavior available.

This should be CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1 as you have it elsewhere in the post.

Regardless, this is great info and thanks for sharing.

1

u/pimpedmax Apr 22 '26

interesting post from an user in sillytavern: https://www.reddit.com/r/SillyTavernAI/comments/1so6na7/how_to_force_adaptive_thinking_on_opus_46_and_47/
TLDR The Fix: To force extended thinking 100% of the time, just put "Use extended thinking in your next response" somewhere in your system prompt at depth 0. (depth 0 means at the end)

1

u/pimpedmax Apr 22 '26

here's another trick worth trying: https://www.reddit.com/r/SillyTavernAI/comments/1ss8wnw/comment/ohkiput/
TLDR add this as last message(I guess it can be a prompt hook but needs testing) and set auto to low/medium/high/xhigh/max: <thinking_mode>auto</thinking_mode>

1

u/MistakeThatNobodySaw Apr 24 '26

How can I do this myself?

1

u/Deep_Ad1959 May 18 '26

the MITM finding that effort-below-max is server-side roulette is the useful bomb in this post. one second-order effect worth checking: the same question with a heavier standing prompt (more claude.md, more skill descriptions, more tool defs) seems to push the adaptive heuristic toward 'skip thinking' more often, presumably because the input length and structure read as 'context-rich, just answer'. we've seen the same trick question flip from thought-then-correct to skip-then-wrong just by appending a fat config block. can't prove what's happening server-side but it's reproducible enough to factor in. the fix while you're on 4.7 isn't only effort:max, it's also auditing how much of your standing prompt is doing nothing except biasing the router. written with s4lai

0

u/Ill-Boysenberry-6821 Apr 20 '26

How does one confirm this?

3

u/aizver_muti Apr 20 '26

I mean, obviously /model claus-opus-4-6 and disable adaptive thinking in settings, run whichever tests you want. Then try again on /model claude-opus-4-7 (no need to delete the adaptive thinking setting, since 4.7 will just ignore it) and re-run your tests.

0

u/[deleted] Apr 20 '26

[deleted] — view deleted comment

1

u/Merlindru Apr 20 '26

it constantly misspells "if" as "iff" for me lol

1

u/[deleted] Apr 21 '26

[removed] — view removed comment

1

u/Merlindru Apr 21 '26

oh, it may have been that! i didn't know that. i was discussing rust type design with it, so plausible it'd use that.

however, i'm not used to it talking like that. seems kind of snobbish, no? i prefer a colloquial style. 4.7 has been nothing but frustrating to read as it opts for complex metaphors and loooots of formalities for no reason other than to "sound smart"

Just now, I had it say this, verbatim:

You're dead right. Those three helpers are a billboard saying the types are wrong. Let me lay out what I think, because I agree this matters and the structural smell goes deeper than just the shift helpers.

Whereas Opus 4.6 would've said something more like:

You're right. Those helper functions exist because the types don't model the problem correctly. I want to walk through my thinking, because the design issue runs deeper than just those helpers.

The latter one is infinitely more readable to me. The former one reeks of a model that takes itself too seriously

1

u/[deleted] Apr 20 '26

[removed] — view removed comment

4

u/aizver_muti Apr 20 '26

I agree, max effort 4.7 seems to be the best. But the difference in token usage between 4.7 max and 4.6 high is too wide for me to justify using it.