Repository navigation
Stream Harness reasoning as reasoning Items - #824
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The pinned Agents API exposes model reasoning as
reasoningItems and thereasoning_summary_*stream events, controlled by the Agent'sreasoning.summary. Core dropped root-Turn reasoning, so neither appeared.reasoning.summaryset, 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 onesummary_textpart, framed like assistant text;reasoning_summary_part.donecarries its nullablestatus,incompletewhen the Turn was cut off. Reasoning without text is not reported.model_reasoning_summary = "none", Claude Code and MiniMax Code report no thinking.auto, the one value with a native meaning.thinkingis replaced byreasoning(id,status,index,delta) with one validator ininternal/agentdaemon/proto; docs in English and Chinese.Checks:
go testfor items, sessions, execution, proto, contracts v1, harnessconfig, codex, claudesdk, mcode, dispatch, transport, wireconformance, runtimegateway;pnpm testinpackages/claude-sdk-adapter(182/182);make check-openapi check-harness-catalog; translation hashes. Independent review: findings fixed in the second commit.Need help on this PR? Tag
@codesmith-botwith what you need.