[BUG] Claude code SDK adds thinking budget

Resolved 💬 5 comments Opened Oct 9, 2025 by animeshdas2000 Closed Jan 8, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [ ] I am using the latest version of Claude Code

What's Wrong?

When working with Claude code typescript SDK the thinking gets added automatically even when the thinking budget is set to 0 or even when commented out.

options:{
 maxThinkingTokens: 0,
}

What Should Happen?

Thinking shouldn't be enabled

Error Messages/Logs

SSE logs

event: message
data: {"type":"message","message":{"type":"result","subtype":"success","is_error":true,"duration_ms":2946,"duration_api_ms":0,"num_turns":20,"result":"API Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"`max_tokens` must be greater than `thinking.budget_tokens`. Please consult our documentation at https://docs.claude.com/en/docs/build-with-claude/extended-thinking#max-tokens-and-context-window-size\"},\"request_id\":\"req_011CTwTQZFaQqakNFiwv7toj\"}","session_id":"9b3db228-973d-49ed-9308-3a76ecb766be","total_cost_usd":0,"usage":{"input_tokens":0,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0}},"modelUsage":{},"permission_denials":[],"uuid":"c08c5409-9269-4422-bdb9-6cb4d9754f85"},"id":"4"}
id: 4

event: error
data: {"type":"error","error":"Claude Code process exited with code 1"}

Steps to Reproduce

This occurs in claude code SDK. We are also using "think" keyword in our prompts.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

1.0.107

Claude Code Version

1.0.113

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗