Skip to content

Reasoning steps read as separate blocks again instead of one glued paragraph - #80736

Merged
OutThisLife merged 3 commits into
mainfrom
bb/reasoning-summary-blocks
Aug 7, 2026
Merged

Reasoning steps read as separate blocks again instead of one glued paragraph#80736
OutThisLife merged 3 commits into
mainfrom
bb/reasoning-summary-blocks

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

GPT-5.x reasoning rendered as one unbroken, unspaced, half-bold paragraph in the transcript — every "step" of the model's thinking run together with no separator.

Reasoning-summary models don't stream a chain of thought token by token. They emit one reasoning_content delta per completed summary part, each a self-contained bold heading. On the Responses API those parts are delimited by summary_index; the OpenAI chat wire carries no such field, so concatenating the deltas produces **Investigating culprit PRs****Inspecting message schema** — a **** run that markdown reads as neither a bold close nor a bold open.

The AI SDK hit exactly this and fixed it by starting a new reasoning part per summary_index (vercel/ai#6742). That route needs the index, so this takes it where it exists and re-derives it where it doesn't:

  • Native Responses stream (codex_runtime) — summary_index is right there in the event. Break on a change of index; streams that send no index are untouched.
  • Chat wire (chat_completion_helpers) — verified live against Nous Portal's openai/gpt-5.6-sol that its reasoning chunks contain nothing but delta.reasoning_content, so the boundary can't be recovered from metadata. Re-derive it from the one signal that is there: a delta opening a closed bold heading against a mid-line tail.
  • Desktop renderer — repairs what's already in the transcript: reasoning persisted before this fix, and any provider still gluing its parts.

This also brings the chat-completions path in line with Hermes' own Responses adapter, which already joins summary parts with a blank line.

Both glue shapes are covered: heading-onto-heading (the **** run) and prose-onto-heading (interaction!**Next**), the latter being the shape the upstream issue reports and a ****-only rule would miss.

Verification

  • Live probe against openai/gpt-5.6-sol confirming the wire carries no summary_index, and reproducing the glued output.
  • Replayed the renderer fix over 46 real glued messages from an affected session — all repair cleanly, and re-running the repair is a no-op.
  • 44 codex Responses tests, 7 new backend tests, 925 desktop tests green.

…chat wire

Reasoning-summary models emit one reasoning_content delta per completed
summary part, each a self-contained bold heading. The Responses API delimits
those parts with summary_index; the OpenAI chat wire carries no such field —
verified live against Nous Portal, whose reasoning chunks contain nothing but
delta.reasoning_content — so concatenating them glued every part into one
unspaced, half-bold paragraph.

Re-derive the boundary from the signal the wire does carry: a delta opening a
closed bold heading against a mid-line tail. This matches Hermes own Responses
adapter, which already joins its summary parts with a blank line.
The native Responses stream does carry summary_index, so the part boundary is
structured data here rather than something to infer. Break on a change of
index, and leave streams that send no index (plain reasoning_text) untouched.
Repairs what is already in the transcript: reasoning persisted before the
backend fix, and any provider still gluing its parts. Handles both shapes —
heading-onto-heading (the **** run) and prose-onto-heading (vercel/ai#6742).
Verified against 46 real glued messages from a gpt-5.6-sol session; all repair
cleanly and idempotently.
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on a5cddcd

⚠️ Warnings

OSV vulnerability scan · View job

50 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 6m7s vs 6m47s (-9.8%). 15 job(s) slower, 16 faster, 3 unchanged.

  • JS & TS checks / apps/desktop / check:test:ui: -40.0s
  • Python tests / Run tests slice 2/12: -37.0s
  • Python tests / Run tests slice 12/12: +26.0s
  • Python tests / Run tests slice 9/12: +19.0s
  • JS & TS checks / apps/desktop / check:test:desktop:all: +19.0s

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/desktop Electron desktop app (apps/desktop/*) provider/openai OpenAI / Codex Responses API labels Aug 7, 2026
@OutThisLife
OutThisLife merged commit 623d5c9 into main Aug 7, 2026
57 checks passed
@OutThisLife
OutThisLife deleted the bb/reasoning-summary-blocks branch August 7, 2026 04:02
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…summary-blocks

Reasoning steps read as separate blocks again instead of one glued paragraph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists provider/openai OpenAI / Codex Responses API type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants