Skip to content

[Fix] Thinking headings run together in task transcripts - #1403

Merged
mrubens merged 3 commits into
developfrom
fix/reasoning-heading-newlines-1qds7md4c6b1s
Aug 16, 2026
Merged

[Fix] Thinking headings run together in task transcripts#1403
mrubens merged 3 commits into
developfrom
fix/reasoning-heading-newlines-1qds7md4c6b1s

Conversation

@roomote-community

@roomote-community roomote-community Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @mrubens. Follow up by mentioning @roomote, in the web UI, or in Discord.

What changed

  • restore blank lines when a reasoning line consists entirely of bold headings that providers concatenated as adjacent Markdown
  • retain the raw live reasoning stream separately so every chunk is normalized from the complete source text, including after client state is rebound
  • apply the same normalization to persisted OpenCode thoughts
  • cover complete payloads, three-heading chunk continuations, separators split across chunks, and ordinary adjacent bold emphasis with regression tests

Why this change was made

OpenCode reasoning can contain adjacent bold headings without whitespace, causing task thinking to render as a single run-on block. The malformed separator was preserved through persistence and playback.

Impact

Thinking headings remain readable while tasks are running and after transcripts are reloaded. Inline adjacent bold spans such as **read****write** remain unchanged because only lines made entirely of adjacent bold headings are normalized.

@roomote-community

roomote-community Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

No code issues found. See task

  • packages/types/src/acp.ts:58 The heading normalizer inserts paragraph breaks between ordinary adjacent bold spans.
  • apps/web/src/app/(sandbox)/task/[taskId]/hooks/services/acp-protocol-service.ts:1292 Live chunk normalization loses separation when a later heading arrives after an earlier normalization.

Reviewed 37bc98e

Comment thread packages/types/src/acp.ts Outdated
@mrubens
mrubens marked this pull request as ready for review August 16, 2026 20:04
@mrubens
mrubens merged commit b0ddb4b into develop Aug 16, 2026
17 checks passed
@mrubens
mrubens deleted the fix/reasoning-heading-newlines-1qds7md4c6b1s branch August 16, 2026 20:04
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