Skip to content

bramble: fix excessive line breaks in Codex thinking output#41

Merged
mzhaom merged 3 commits intomainfrom
fix/bramble-line-breaks
Feb 13, 2026
Merged

bramble: fix excessive line breaks in Codex thinking output#41
mzhaom merged 3 commits intomainfrom
fix/bramble-line-breaks

Conversation

@mzhaom
Copy link
Member

@mzhaom mzhaom commented Feb 13, 2026

Summary

  • Fix: Accumulate streaming thinking deltas into a single OutputLine instead of creating one per delta, which caused each word to appear on its own line (💭 show, 💭 the, 💭 command, ...)
  • Consolidate: Move AppendStreamingDelta (overlap-aware concat) to the session package so both the live Manager and codexlogview replay parser share one implementation
  • Unify: Merge appendOrAddText / appendOrAddThinking into a single parameterized appendOrAddOutput in the Manager, reducing duplication

Test plan

  • scripts/lint.sh passes
  • bazel build //... succeeds
  • bazel test //bramble/... — all 3 test suites pass
  • Manual: run a Codex session and verify thinking output accumulates into coherent lines

🤖 Generated with Claude Code


Note

Low Risk
Mostly affects output aggregation/rendering and log replay concatenation, with minimal impact on core session execution or persistence. Main risk is minor formatting/regression in how thinking/text streaming is displayed or replayed.

Overview
Fixes Codex thinking output spam by accumulating streaming thinking deltas into a single OutputLine (mirroring text streaming), instead of emitting one line per chunk.

Unifies and reuses overlap-aware streaming concatenation by moving AppendStreamingDelta into session and updating codexlogview replay parsing to call it, while the live Manager now uses a generalized appendOrAddOutput helper for both text and thinking.

Updates TUI rendering for OutputTypeThinking to format multi-line thinking with a single leading 💭 and indented continuation lines, and avoids truncating these multi-line thinking blocks.

Written by Cursor Bugbot for commit af5678e. This will update automatically on new commits. Configure here.

Each streaming thinking delta from Codex was creating a separate
OutputLine, causing each word to appear on its own line with a 💭
prefix. Accumulate thinking deltas into a single line, matching the
existing text accumulation pattern.

Also consolidate AppendStreamingDelta into the session package so
both the live Manager and codexlogview replay parser share one
implementation with overlap-aware deduplication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

- Exclude OutputTypeThinking from the post-switch single-line
  truncation guard in both output.go and view.go, since thinking
  content is now multi-line after accumulation.
- Update view.go's formatOutputLine to use the shared
  formatThinkingContent helper instead of single-line truncate.
- Show 💭 prefix only on the first line of thinking content;
  continuation lines are indented with spaces.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

AppendStreamingDelta's overlap detection can produce false positives
for live streaming where deltas are non-overlapping token chunks
(e.g. "..." followed by "..." would be deduped). Revert the Manager
to plain += concatenation; keep AppendStreamingDelta only for the
codexlogview replay parser where protocol log deltas may overlap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mzhaom mzhaom merged commit d40879e into main Feb 13, 2026
3 checks passed
@mzhaom mzhaom deleted the fix/bramble-line-breaks branch February 13, 2026 06:38
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

Comments