Skip to content

fix: Empty thinking text in thought chunks on current Claude models#766

Open
pavelpenev wants to merge 1 commit into
agentclientprotocol:mainfrom
pavelpenev:thinking-chunk-fix
Open

fix: Empty thinking text in thought chunks on current Claude models#766
pavelpenev wants to merge 1 commit into
agentclientprotocol:mainfrom
pavelpenev:thinking-chunk-fix

Conversation

@pavelpenev

Copy link
Copy Markdown

Recent Claude models default the API's thinking.display field to "omitted". Thinking blocks still stream, but signature-only: the block opens, a single signature_delta arrives, and no thinking_delta ever carries text. The agent then emits agent_thought_chunk notifications whose text is always empty, so ACP clients render blank thought sections — regardless of effort level or MAX_THINKING_TOKENS.

Request display: "summarized" explicitly so thought chunks carry visible summary text again:

  • unset MAX_THINKING_TOKENS → {type: "adaptive", display: "summarized"} (adaptive matches the SDK default on current models, but is now sent explicitly where previously no thinking config was sent at all)
  • positive budget → display added to the enabled config
  • 0 (disabled) unchanged

A thinking config provided via _meta.claudeCode.options still overrides this default wholesale, so embedders retain full control.

Verified over ACP traffic with an Emacs agent-shell client on claude-fable-5, claude-opus-4-8, and claude-sonnet-4-6: before, every agent_thought_chunk had empty text; after, summarized reasoning streams and renders.

Related: #297

Recent Claude models default the API's `thinking.display` field to
"omitted". Thinking blocks still stream, but signature-only: the block
opens, a single signature_delta arrives, and no thinking_delta ever
carries text. The agent then emits agent_thought_chunk notifications
whose text is always empty, so ACP clients render blank thought
sections — regardless of effort level or MAX_THINKING_TOKENS.

Request `display: "summarized"` explicitly so thought chunks carry
visible summary text again:

- unset MAX_THINKING_TOKENS → {type: "adaptive", display: "summarized"}
  (adaptive matches the SDK default on current models, but is now sent
  explicitly where previously no thinking config was sent at all)
- positive budget → display added to the enabled config
- 0 (disabled) unchanged

A thinking config provided via _meta.claudeCode.options still overrides
this default wholesale, so embedders retain full control.

Verified over ACP traffic with an Emacs agent-shell client on
claude-fable-5, claude-opus-4-8, and claude-sonnet-4-6: before, every
agent_thought_chunk had empty text; after, summarized reasoning
streams and renders.

Related: agentclientprotocol#297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant