[DOCS] Missing method parity for `set_max_thinking_tokens` in Python Agent SDK `ClaudeSDKClient`

Resolved 💬 3 comments Opened Jan 18, 2026 by coygeek Closed Feb 28, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

Section/Topic

The ClaudeSDKClient class methods section within the Python Agent SDK reference.

Current Documentation

The Python documentation for ClaudeSDKClient currently lists the following methods for dynamic session control:

  • connect(self, prompt)
  • query(self, prompt, session_id)
  • interrupt(self)
  • set_permission_mode(self, mode)
  • set_model(self, model)

It does not mention any method for dynamically updating thinking tokens during a session.

What's Wrong or Missing?

There is a lack of feature parity between the TypeScript and Python SDK documentation. The TypeScript SDK documentation for the Query object (the underlying interface for query) explicitly includes:

setMaxThinkingTokens(maxThinkingTokens: number | null): Promise<void>;Changes the maximum thinking tokens (only available in streaming input mode)

The Python SDK's ClaudeSDKClient (the equivalent stateful interface) is missing this method in its documentation. This is a critical omission for developers needing to adjust reasoning depth mid-session based on evolving task complexity.

Suggested Improvement

The Python SDK documentation should be updated to include set_max_thinking_tokens.

Suggested addition to the Methods table:

| Method | Description |
| :--- | :--- |
| set_max_thinking_tokens(tokens) | Changes the maximum tokens allowed for the thinking process during a session (only available in streaming mode). |

Suggested code example addition:

async with ClaudeSDKClient(options=options) as client:
    # Start with standard reasoning
    await client.query("Check the status of the server.")
    
    # Increase reasoning depth for a complex follow-up task
    await client.set_max_thinking_tokens(16000)
    await client.query("Perform a deep security audit of the logs.")

Impact

High - Prevents users from using a feature

Additional Context

  • Related Documentation: The TypeScript SDK lists this method under its Query interface here: https://platform.claude.com/docs/en/agent-sdk/typescript#query-1
  • Implementation Note: A review of the Python SDK source indicates that while set_model and set_permission_mode are implemented to support the control protocol, the equivalent for setMaxThinkingTokens is currently absent from the client interface, leading to a discrepancy in the documented "Advanced Features" of the SDK.

View original on GitHub ↗

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