GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(claude): separate reasoning summary parts in streamed thinking by devmello · Pull Request #944 · lidge-jun/opencodex

Conversation

@devmello

@devmello devmello commented Aug 3, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

On the native ChatGPT backend the upstream Responses stream is translated straight into Anthropic SSE. Reasoning summaries arrive there in parts, each its own paragraph with a bold headline. The streaming translator folded every part into one thinking block with no separator, so thinking text rendered as run-on lines like "wants X.Planning the fix". The non-streaming translator in the same file already joins parts with a blank line. The stream now tracks part identity on the delta frames and emits the same blank-line separator at part boundaries. Frames without part indices keep a constant key and behave as before, and a new reasoning item still opens its own block.

Verification

  • Two new tests in tests/claude-outbound.test.ts: multi-part summaries match the JSON path's joined text, and same-part or index-free deltas never get a separator.
  • Repro harness: streamed, collected, and JSON-path thinking text are now identical for the same upstream frames.
  • bun run test, typecheck, lint:gui, privacy:scan.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Bug Fixes

    • Improved streamed reasoning display by clearly separating distinct summary sections.
    • Preserved continuous text when updates belong to the same section or lack section indicators.
    • Aligned streaming and non-streaming reasoning output for consistent results.
  • Tests

    • Added coverage for multiple reasoning sections and streaming behavior.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@devmello
fix(claude): separate reasoning summary parts in streamed thinking
b23cc1f
The streaming translator folded every summary part into one thinking
block with no separator, so multi-part summaries rendered as run-on
text. The JSON path already joins parts with a blank line; the stream
now emits the same separator at part boundaries.
@devmello
devmello requested review from Ingwannu, Wibias and lidge-jun as code owners August 3, 2026 11:00
@github-actions github-actions Bot added the bug Something isn't working label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@DevMello, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 14 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8e5fb602-eb44-4b49-a1da-0386ae97e924

📥 Commits

Reviewing files that changed from the base of the PR and between b23cc1f and 216a4e0.

📒 Files selected for processing (1)
  • tests/claude-outbound.test.ts
📝 Walkthrough

Walkthrough

Changes

Reasoning stream handling

Layer / File(s) Summary
Track and separate reasoning parts
src/claude/outbound.ts:190-191, src/claude/outbound.ts:358-372
OpenBlock tracks the current reasoning item and part. Streaming deltas insert \n\n when the key changes, while repeated or index-free parts remain continuous.
Validate reasoning aggregation
tests/claude-outbound.test.ts:210-260
Tests cover distinct summary parts, separate reasoning items, repeated indexed parts, index-free deltas, and streaming/non-streaming parity.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: lidge-jun, snowyukitty, ingwannu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: separating reasoning summary parts in streamed Claude thinking.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

coderabbitai[bot]
coderabbitai Bot reviewed Aug 3, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/claude-outbound.test.ts`:
- Around line 242-260: Add coverage in the “same-part deltas and index-free
reasoning frames never get a separator” test for indexed reasoning content by
emitting deltas with content_index 0 and 1. Collect the converted message and
assert its thinking content contains the two parts separated by "\n\n",
exercising the content_index branch while preserving the existing same-part and
index-free assertions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8b37aca0-694d-480d-a5f3-7c2226c9e0ff

📥 Commits

Reviewing files that changed from the base of the PR and between 6a7351b and b23cc1f.

📒 Files selected for processing (2)
  • src/claude/outbound.ts
  • tests/claude-outbound.test.ts

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/claude-outbound.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Aug 3, 2026
stack 3/7: carry six contributor bug fixes with authorship intact #953
Merged
stack 1/6: triage the open issue surface and lock the bug plan #951
Merged
stack 2/7: price long-context requests at the published long rate (#908) #952
Merged
@lidge-jun

lidge-jun commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Carried onto the review stack as #953 (stack 3/3), unmodified.

Your commits were taken with git cherry-pick -x, so they keep your authorship — git log --format='%an' on the stack branch shows you, not me. No content was changed; the diff on the stack is byte-identical to what you wrote here, and it applied to dev with no conflict resolution.

Verified on the stack: bun x tsc --noEmit exit 0, and the full suite at 7691 pass / 8 skip / 0 fail across 507 files.

This PR stays open until #953 lands. If a maintainer prefers to take yours directly instead, that path is unaffected — the stack commits get dropped and this one merges. Once #953 merges I'll close this as carried, with the credit already in the commit history rather than in a comment.

Stack: #951 (plan, base dev) → #952 (#908 long-context pricing) → #953 (this carry). Review bottom-up.

Thanks for the fix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Aug 3, 2026
stack 4/7: keep an explicit thinking disable through translation (#545) #954
Merged
stack 5/7: probe reset-derived cooldowns without waiting to be selected (#915) #955
Merged
@Wibias
Wibias marked this pull request as draft August 3, 2026 20:51
@devmello
test(claude): cover indexed reasoning content parts
216a4e0
@devmello
devmello marked this pull request as ready for review August 3, 2026 22:19
@Wibias

Wibias commented Aug 3, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Leave it as draft. Thanks. It doesnt need any more changes as you can see in juns comment on which you didn't respond to.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Wibias
Wibias marked this pull request as draft August 3, 2026 22:34
@lidge-jun

lidge-jun commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Closing this as carried into #953, not as rejected. Your fix is shipping — this is bookkeeping so the same change isn't sitting in the review queue twice.

Your commit(s) are on the stack branch as 528cfc12d, cherry-picked with git cherry-pick -x. Authorship is preserved, so git log --format='%an' shows you rather than me, and I verified the carried diff is byte-identical to yours rather than assuming it:

$ git show <yours> | git patch-id --stable
$ git show <carried> | git patch-id --stable
IDENTICAL

No content was changed and no conflict resolution was needed.

One thing I want to be straight about: my earlier comment said I'd close this after #953 merged, and I'm closing it before. #953 is open and reviewable now, so closing early is my call as maintainer to keep the queue honest — not a signal that the review finished. If the stack doesn't land, reopening this is one click, and the branch is untouched.

Verified on the stack: bun x tsc --noEmit exit 0, full suite 7729 pass / 8 skip / 0 fail across 508 files.

Stack: #951 (plan, base dev) → #952 → #953 (this carry) → #954 → #955. Review bottom-up.

Thanks @devmello — this was a clean fix and it's in.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun lidge-jun closed this Aug 4, 2026
@lidge-jun lidge-jun mentioned this pull request Aug 4, 2026
stack 6/7: triage the overnight PRs and fix the #955 defects they found #973
Merged
@coderabbitai coderabbitai Bot mentioned this pull request Aug 9, 2026
fix(claude): bound streamed reasoning identity #1377
Merged
7 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@lidge-jun lidge-jun Awaiting requested review from lidge-jun lidge-jun is a code owner
@Ingwannu Ingwannu Awaiting requested review from Ingwannu Ingwannu is a code owner
@Wibias Wibias Awaiting requested review from Wibias

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@devmello @lidge-jun @Wibias
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.