Summary
In agent-conversations/**/*.jsonl produced by the Claude Agent SDK for Python (claude-agent-sdk v0.1.35+), I often do not see assistant content blocks with type: "thinking" even when thinking is configured as enabled/adaptive with high effort or high budget_tokens.
Instead, intermediate reasoning appears in content[type="text"], and in some runs the missing thinking correlates with incorrect multi-step derived values.
Environment
- SDK:
claude-agent-sdk v0.1.35+ (Python), including v0.1.52 (latest at time of reporting)
- Models tested:
claude-sonnet-4-5-20250929
claude-sonnet-4-6
- Thinking configs attempted:
thinking: { "type": "enabled", "budget_tokens": <high> }
thinking: { "type": "adaptive", "effort": "high" }
Expected
When thinking is enabled (or adaptive decides to think), agent-conversations/**/*.jsonl should consistently include assistant blocks like:
content: [{ "type": "thinking", "thinking": "...", "signature": "..." }, ...]
Actual
type: "thinking" is missing in some agent conversation logs (especially subagent logs), while type: "text" increases or contains reasoning-like narration.
Version comparison
In my tests, behavior changes across claude-agent-sdk versions:
- With a newer
claude-agent-sdk (>= 0.1.35), the produced agent conversation JSONL often omits assistant content blocks where type == "thinking".
- With an older
claude-agent-sdk, assistant content blocks with type == "thinking" are present.
- Reproduced on v0.1.52 as well.
“Text replacing thinking” observation
When type: "thinking" blocks are missing, the number of assistant content blocks with type: "text" increases. These text blocks frequently contain visible, reasoning-like narration that appears to take the role that thinking blocks would normally serve, but this does not reliably translate into better agent performance (and in some runs correlates with less consistent/incorrect intermediate results).
Possible behavioral impact
In multiple cases, runs where thinking blocks were missing produced less consistent intermediate results compared to runs where thinking blocks were present.
Speed vs quality tradeoff observed
I also observed that runs without thinking blocks often complete faster, but that speedup appears to come with weaker agent performance/quality in intermediate reasoning outcomes.
Questions
- Is it intentional that the Python SDK “agent conversation JSONL” omits
type: "thinking" blocks from some runs/subagents even when thinking is enabled?
- If intentional, can we get documentation and/or an option to include thinking blocks in transcripts for debugging (e.g.
include_thinking_in_transcripts=true)?
- If unintentional, can you point me to the code path that strips/omits
thinking during transcript serialization/compaction?
Minimal reproduction (high level)
- Use
claude-agent-sdk v0.1.35+ with ClaudeAgentOptions(thinking=...) and tools/subagents.
- Run an agent that produces
agent-conversations/**/*.jsonl.
- Inspect assistant message content blocks in the JSONL and check for
content[].type == "thinking".
Summary
In
agent-conversations/**/*.jsonlproduced by the Claude Agent SDK for Python (claude-agent-sdkv0.1.35+), I often do not see assistantcontentblocks withtype: "thinking"even when thinking is configured as enabled/adaptive with high effort or highbudget_tokens.Instead, intermediate reasoning appears in
content[type="text"], and in some runs the missing thinking correlates with incorrect multi-step derived values.Environment
claude-agent-sdkv0.1.35+ (Python), including v0.1.52 (latest at time of reporting)claude-sonnet-4-5-20250929claude-sonnet-4-6thinking: { "type": "enabled", "budget_tokens": <high> }thinking: { "type": "adaptive", "effort": "high" }Expected
When thinking is enabled (or adaptive decides to think),
agent-conversations/**/*.jsonlshould consistently include assistant blocks like:content: [{ "type": "thinking", "thinking": "...", "signature": "..." }, ...]Actual
type: "thinking"is missing in some agent conversation logs (especially subagent logs), whiletype: "text"increases or contains reasoning-like narration.Version comparison
In my tests, behavior changes across
claude-agent-sdkversions:claude-agent-sdk(>=0.1.35), the produced agent conversation JSONL often omits assistantcontentblocks wheretype == "thinking".claude-agent-sdk, assistantcontentblocks withtype == "thinking"are present.“Text replacing thinking” observation
When
type: "thinking"blocks are missing, the number of assistantcontentblocks withtype: "text"increases. Thesetextblocks frequently contain visible, reasoning-like narration that appears to take the role thatthinkingblocks would normally serve, but this does not reliably translate into better agent performance (and in some runs correlates with less consistent/incorrect intermediate results).Possible behavioral impact
In multiple cases, runs where
thinkingblocks were missing produced less consistent intermediate results compared to runs wherethinkingblocks were present.Speed vs quality tradeoff observed
I also observed that runs without
thinkingblocks often complete faster, but that speedup appears to come with weaker agent performance/quality in intermediate reasoning outcomes.Questions
type: "thinking"blocks from some runs/subagents even when thinking is enabled?include_thinking_in_transcripts=true)?thinkingduring transcript serialization/compaction?Minimal reproduction (high level)
claude-agent-sdkv0.1.35+ withClaudeAgentOptions(thinking=...)and tools/subagents.agent-conversations/**/*.jsonl.content[].type == "thinking".