bramble: fix excessive line breaks in Codex thinking output#41
Merged
Conversation
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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
- 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>
There was a problem hiding this comment.
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>
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.
Summary
OutputLineinstead of creating one per delta, which caused each word to appear on its own line (💭 show,💭 the,💭 command, ...)AppendStreamingDelta(overlap-aware concat) to thesessionpackage so both the live Manager and codexlogview replay parser share one implementationappendOrAddText/appendOrAddThinkinginto a single parameterizedappendOrAddOutputin the Manager, reducing duplicationTest plan
scripts/lint.shpassesbazel build //...succeedsbazel test //bramble/...— all 3 test suites pass🤖 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
AppendStreamingDeltaintosessionand updatingcodexlogviewreplay parsing to call it, while the liveManagernow uses a generalizedappendOrAddOutputhelper for both text and thinking.Updates TUI rendering for
OutputTypeThinkingto 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.