GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — fix(server): key assistant text blocks by message id instead of stream position by Kiri110K · Pull Request #7143 · pingdotgg/t3code Conversation
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This changes production Claude streaming and snapshot reconciliation, including message grouping, suffix repair, and completion behavior across several stateful edge cases. The scope is focused and well tested, but the runtime semantics are substantial enough to warrant human review. Notes:
You can add or adjust custom eligibility rules. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I traced a production incident against T3 0.0.33 and it appears to be a direct real-world instance of the snapshot-only regression covered by this PR. The turn had many previously completed assistant messages. Its final message did: The complete text is present in T3's raw provider event log, but the completed turn has no assistant message linked in the local Following the current 0.0.33 adapter logic, snapshot text position 0 can resolve against the turn-wide The regression case described here as a snapshot-only second message — specifically avoiding claiming an already-completed id-less block — matches this incident very closely. The message-scoped matching in #7143 would prevent the completed earlier block from claiming this snapshot and should either find the actual pending block or synthesize the snapshot-only message. I found a second highly similar incident as well (79-char final snapshot after a long tool-heavy turn), although I did not re-verify every block-index/canonical-event detail of that one as exhaustively as the first. This may be useful as confirmation that the snapshot-only regression is occurring in real T3 0.0.33 sessions, not only in the synthetic regression test. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…m position The adapter tracked assistant text blocks in one turn-long list and matched snapshot text to blocks by list position. Any turn with more than one assistant message could mismatch: a claude/assistant snapshot describes one message, not the whole turn. Read message_start (previously ignored) and key each text block by its message id plus the block index within that message. Snapshot backfill now only touches its own message's blocks, and a block whose stream was cut mid-message is completed from the snapshot when the snapshot text extends the streamed prefix. This fixes four defects with one root cause: - a stalled stream truncating the message to its first delta (pingdotgg#7137) - snapshots landing on the wrong block in multi-text-block messages - two consecutive messages merging when block indexes restart at zero - a subagent content_block_stop closing the parent's open block Fixes pingdotgg#7137 Co-Authored-By: Claude Fable 5 <[email protected]>
…t-only message Macroscope on the PR found that the id-less fallback in backfillAssistantTextBlocksFromSnapshot could resolve to a COMPLETED block at the same content index; completionEmitted then skips the message entirely, so an assistant message that never streamed loses its text. Exclude completed blocks from the id-less fallback unless their delivered text matches the snapshot — the bare exclusion Macroscope suggested would instead re-synthesize the ordinary stream -> stop -> snapshot flow as a duplicate whenever message ids are absent. Co-Authored-By: Claude Fable 5 <[email protected]>
d14de2d to
b3ead4b
Compare
|
Rebased onto current main (b3ead4b). Conflict was only in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b3ead4b. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…ess block got its own snapshot Without message_start, the backfill fallback claimed any still-open block at the snapshot's content index. A block whose stream stalled and whose own snapshot had already been applied would then claim a later snapshot-only message at the same index; its text did not continue the stalled block, so it was logged as snapshot-diverged and dropped. A message delivers exactly one snapshot: once a block has its own, a second, different snapshot at that index is a new message and is now synthesized instead. Late stream deltas can still continue the block. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Independent corroboration of the design direction: a minimal local backport for the snapshot-only stall converged on the same predicate shape — prefer a claimable positional block, else reverse-search for a claimable one, else synthesize — deliberately without the wider message-id identity fields. We also keep an offline regression harness that reproduces the swallow on legacy bytes (snapshot position resolving into an unrelated already-completed block) and passes on the canonical predicate. Happy to share those cases if they help review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Rechecked this against current main (d2c9281b). I would keep this PR as the canonical review path for #11353 rather than open a competing positional fix. The architecture still looks right: assistant block identity belongs to the provider message + block index, and subagent traffic must not mutate the parent message's open block.
The immediate blocker is freshness: this head (27530a12) is now non-mergeable and its merge base is 5b8445b7; current main has advanced ~1,392 commits from that base. On rebase I would preserve current-main Claude task/usage/lifecycle work rather than resolving toward the old adapter wholesale.
Post-rebase merge gate I would use:
text → tool_use → text: both text blocks remain visible/in order;0 stay distinct;content_block_stop cannot close the parent's block;ClaudeAdapter.test.ts + server typecheck on current main.The existing regressions already cover most of this, so this should be a rebase-and-reprove job, not a redesign.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for working on this. We merged the orchestrator V2 rewrite in #2829, and we are closing this PR as part of that transition. This change touches ClaudeAdapter.ts, which the V2 merge removed. Claude execution now runs through ClaudeAdapterV2. Sorry for the extra work this creates. If the change is still needed on V2, please rebuild it on current main, verify it there, and open a new PR linking back here. We're closing the current implementation without assuming the underlying request is resolved. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[Bug]: Assistant text emitted before a tool call disappears once later text in the same turn arrives [Bug]: A stalled text stream silently truncates the assistant message to its first delta
There was an error while loading. Please reload this page.