Skip to content

Thinking blocks missing when using Opus 4.6 with --max-thinking-tokens #553

@dolphin-wood

Description

@dolphin-wood

Description

After switching from claude-opus-4-5-20251101 to claude-opus-4-6, thinking blocks are no longer returned in the response stream. The agent previously produced ThinkingBlock content with Opus 4.5, but with Opus 4.6 it goes straight to text/tool_use without any thinking.

Environment

  • claude-agent-sdk: 0.1.31
  • Bundled CLI: 2.1.33
  • Model: claude-opus-4-6
  • Platform: macOS arm64 / Linux x86_64

Configuration

options = ClaudeAgentOptions(
    max_thinking_tokens=10000,
    # ... other options
)

The model is set at runtime via client.set_model("claude-opus-4-6").

Root Cause (Suspected)

Opus 4.6 deprecated thinking: {type: "enabled", budget_tokens: N} in favor of adaptive thinking (thinking: {type: "adaptive"}). The --max-thinking-tokens CLI flag likely maps to the deprecated budget_tokens parameter, which may cause Opus 4.6 to skip thinking entirely.

From the Opus 4.6 docs:

Adaptive thinking (thinking: {type: "adaptive"}) is the recommended thinking mode for Opus 4.6. thinking: {type: "enabled"} and budget_tokens are deprecated on Opus 4.6.

Expected Behavior

Thinking blocks should still be returned when using Opus 4.6, either via the deprecated budget_tokens path or (preferably) via adaptive thinking.

Feature Request

Please add support for adaptive thinking in the SDK:

  1. A new parameter (e.g., thinking_mode="adaptive") in ClaudeAgentOptions
  2. A new CLI flag (e.g., --thinking-mode adaptive) mapping to thinking: {type: "adaptive"}
  3. An optional effort parameter (low / medium / high / max) to control thinking depth

This would allow SDK users to migrate from the deprecated budget_tokens to adaptive thinking as recommended by the Opus 4.6 docs.

Workaround

Currently reverting to claude-opus-4-5-20251101 to retain thinking blocks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions