[BUG] `--thinking disabled` is not sent for claude-haiku-5-5: the request has no `thinking` field, so Haiku 5.5 runs adaptive thinking

Status Open
Reported on v2.1.295
Maintainer reply None cached
Activity 0 comments · opened Oct 9, 2026

Environment

  • Claude Code 2.1.295 (native, Windows 11), -p mode, OAuth login
  • Model: claude-haiku-5-5
  • Also reached through the Claude Agent SDK: query({ options: { thinking: { type: 'disabled' } } }), which the SDK turns into --thinking=disabled

What happens

With --thinking disabled, Claude Code sends the Messages request with no thinking field at all. For Claude Haiku 4.5 an omitted thinking field meant no thinking. Claude Haiku 5.5 runs adaptive thinking when the field is omitted, so the flag has the opposite effect: every response starts with a thinking block and spends output tokens on it.

The Messages API accepts thinking: {type: "disabled"} on Claude Haiku 5.5 at effort low, medium and high, and Claude Code sends effort medium here, so a disabled request would be valid.

Captured through a loopback proxy (ANTHROPIC_BASE_URL=http://127.0.0.1:<port>), request body fields only:

| CLI flags / env | thinking in request | output_config | max_tokens |
|---|---|---|---|
| --thinking disabled | (absent) | {"effort":"medium"} | 128000 |
| --thinking disabled --effort low | (absent) | {"effort":"low"} | 128000 |
| --effort low (no thinking flag) | {"type":"adaptive","display":"omitted"} | {"effort":"low"} | 128000 |
| --thinking disabled + CLAUDE_CODE_DISABLE_THINKING=1 | (absent) | {"effort":"medium"} | 128000 |
| --thinking disabled + MAX_THINKING_TOKENS=0 | (absent) | {"effort":"medium"} | 128000 |
| --thinking disabled + CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1 | (absent) | {"effort":"medium"} | 128000 |

None of the documented switches produce thinking: {"type": "disabled"} for this model.

Reproduction

claude -p --model claude-haiku-5-5 --output-format stream-json --verbose --max-turns 1 \
  --setting-sources "" --tools "" --no-session-persistence --thinking disabled \
  <<< "Condense the following 30 KB payload to under 12800 characters: ..."

On a real 33 KB input the stream contains a thinking block and the result reports about 21,000 output tokens for about 23,000 characters of visible text. With --effort low the same input drops to about 12,000 output tokens, still with a thinking block. On a one-line prompt adaptive thinking sometimes skips thinking, so the bug is easiest to see on longer inputs.

Expected

--thinking disabled (and the Agent SDK's thinking: {type: 'disabled'}) sends thinking: {"type": "disabled"} on models that accept it at the effective effort level, including Claude Haiku 5.5 at effort ≤ high. Where the model cannot disable thinking (Opus 5.5, Sonnet 5.5, Fable), the CLI should say so rather than silently leave thinking on.

Impact

Tools that run Haiku as a cheap background worker through the CLI or Agent SDK, for example claude-mem's observer, which passes thinking: {type: 'disabled'} for one-shot condensation calls, lose control over thinking when they move from Haiku 4.5 to 5.5. In claude-mem this raised condense output tokens several-fold and pushed many replies over the length limit the caller enforces, so those replies were discarded.

View original on GitHub ↗