Opus 4.7 returns no thinking blocks even with --thinking adaptive --thinking-display summarized
Summary
On Claude Code CLI 2.1.128, Claude Opus 4.7 returns no thinking blocks at all in the response stream, even when invoked with --thinking adaptive --thinking-display summarized --effort high. Sonnet, Sonnet 4.6, and Opus 4.6 all stream thinking content correctly with the same flags.
This contradicts the documented behavior in the official Opus 4.7 release notes, which states that setting display: "summarized" should restore visible thinking output:
Starting with Claude Opus 4.7, thinking content is omitted from the response by default. Thinking blocks still appear in the response stream, but theirthinkingfield will be empty unless the caller explicitly opts in. … If reasoning outputs are needed, you can setdisplayto"summarized"and opt back in with a one-line change.
The adaptive-thinking docs reinforce that display: "summarized" is the right opt-in, with a streaming example that expects thinking_delta events.
Empirically, on Claude Code 2.1.128 the --thinking-display summarized flag is silently dropped (or otherwise no-op'd) when the model is claude-opus-4-7, and the assistant message contains zero thinking content blocks.
Reproduction
CLI: 2.1.128 (verified claude --version).
Authenticated via OAuth (Max plan), apiKeySource: "none" in the init message.
prompt='Prove that the square root of 2 is irrational. Walk me through your reasoning, then give the final proof.'
# Claude Opus 4.7 — no thinking content
claude --print --output-format stream-json --verbose \
--model claude-opus-4-7 \
--thinking adaptive --thinking-display summarized --effort high \
--include-partial-messages \
"$prompt"
# Claude Sonnet 4.6 — thinking content streams correctly with the same flags
claude --print --output-format stream-json --verbose \
--model sonnet \
--thinking adaptive --thinking-display summarized --effort high \
--include-partial-messages \
"$prompt"
Observed output
Aggregated across the assistant message and stream_event content-block deltas:
| Model | flags | thinking blocks | thinking chars | thinking_delta chars | text chars |
|---|---|---|---|---|---|
| claude-opus-4-7 | --thinking adaptive --thinking-display summarized --effort high | 0 | 0 | 0 | 1663 |
| claude-opus-4-7 | (same flags, second run) | 0 | 0 | 0 | 1578 |
| claude-opus-4-7 | --thinking adaptive --thinking-display omitted | 0 | 0 | 0 | 196 |
| claude-opus-4-7 | --thinking adaptive (no display flag) | 0 | 0 | 0 | 169 |
| claude-opus-4-7 | --thinking adaptive --thinking-display summarized --effort xhigh | 0 | 0 | 0 | 214 |
| sonnet | --thinking adaptive --thinking-display summarized --effort high | 1 | 146 | 146 | 1110 |
| claude-opus-4-6 | --thinking adaptive --thinking-display summarized | 1 | 126 | 126 | 533 |
The Opus 4.7 results are stable across multiple runs. Increasing effort to xhigh, omitting the display flag, and setting it explicitly to omitted all produce the same outcome: zero thinking content surfaces in the response.
The output text in the Opus 4.7 cases shows the model clearly reasoned through the proof (multi-step proof by contradiction with the standard parity argument), so reasoning is happening — it's just not surfacing in the response stream.
Expected
Per the docs, --thinking adaptive --thinking-display summarized on Opus 4.7 should produce a thinking content block with summarized reasoning text, identical to how Sonnet/Opus 4.6 behave. The thinking should also be observable as thinking_delta events on the partial-message stream.
Hypothesis
Best guess based on the empirical pattern: the Claude Code CLI is not forwarding thinking.display to the Anthropic API for Opus 4.7 specifically (or is forwarding it but the OAuth/Max-plan path is overriding to omitted). The flag works for other models, so it's an Opus-4.7-specific code path. Either:
- The CLI's Opus 4.7 integration drops
--thinking-display, or - The Opus 4.7 server-side default of
omittedis sticking and not being overridden by the explicitsummarized.
Impact
Any Claude Code-based application that relies on streaming thinking content to a UI (status indicators, "Claude is reasoning…" UX, audit logging of reasoning traces) loses that feature entirely when switching to Opus 4.7. Sonnet and Opus 4.6 remain working. Concretely affects @anthropic-ai/claude-agent-sdk, the official Python SDK, and downstream third-party SDKs that all rely on the same CLI path.
Workaround
Use claude-sonnet-4-6 (or sonnet, or claude-opus-4-6) instead of claude-opus-4-7 for sessions that need visible thinking output.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗