Skip to content

Stream Harness reasoning as reasoning Items - #824

Merged
SaladDay merged 2 commits into
mainfrom
stream-harness-reasoning
Oct 23, 2026
Merged

SaladDay merged 2 commits into
mainfrom
stream-harness-reasoning

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

The pinned Agents API exposes model reasoning as reasoning Items and the reasoning_summary_* stream events, controlled by the Agent's reasoning.summary. Core dropped root-Turn reasoning, so neither appeared.

  • With reasoning.summary set, each Harness reports what it shows of its native reasoning: the native summary when it produces one, otherwise its native reasoning text (Codex raw reasoning, Claude Code thinking text). Each native part is one summary_text part, framed like assistant text; reasoning_summary_part.done carries its nullable status, incomplete when the Turn was cut off. Reasoning without text is not reported.
  • With it null (the official default) no reasoning Items or events appear, root or child: Codex runs with model_reasoning_summary = "none", Claude Code and MiniMax Code report no thinking.
  • Claude Code admits only auto, the one value with a native meaning.
  • The Core–Runtime frame thinking is replaced by reasoning (id, status, index, delta) with one validator in internal/agentdaemon/proto; docs in English and Chinese.

Checks: go test for items, sessions, execution, proto, contracts v1, harnessconfig, codex, claudesdk, mcode, dispatch, transport, wireconformance, runtimegateway; pnpm test in packages/claude-sdk-adapter (182/182); make check-openapi check-harness-catalog; translation hashes. Independent review: findings fixed in the second commit.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

When the Agent sets reasoning.summary, each Harness reports its native reasoning as `reasoning` Items: the native summary when the Harness produces one, otherwise its native reasoning text. The Runtime sends one `reasoning` frame per native reasoning item (id, status, delta), and Core projects it into a `reasoning` Item with a single summary_text part and the official event sequence (item.added, reasoning_summary_part.added, reasoning_summary_text.delta, reasoning_summary_text.done, reasoning_summary_part.done, item.done). An unfinished Item ends incomplete with the Turn.

With reasoning.summary null, the default, no reasoning Items or events appear for root or child Turns. Codex maps null to model_reasoning_summary "none", Claude Code declares only the auto summary, and MiniMax Code no longer emits thinking frames.
Each native reasoning part becomes its own summary_text part, reasoning_summary_part.done always carries its nullable status, native reasoning without text is not reported, MiniMax Code child Turns report none, and one validator defines a reasoning frame.
@SaladDay
SaladDay merged commit c02a275 into main Oct 23, 2026
25 checks passed
@SaladDay
SaladDay deleted the stream-harness-reasoning branch October 23, 2026 09:26
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