Skip to content

🤖 fix: continuous compaction summary honors a thinking-replay receipt in the retained tail - #6008

Merged
ThomasK33 merged 1 commit into
mainfrom
fix/continuous-summary-tail-receipt
Oct 10, 2026
Merged

ThomasK33 merged 1 commit into
mainfrom
fix/continuous-summary-tail-receipt

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

The continuous compaction summary now honors the Anthropic thinking-repair receipt (MuxMetadata.anthropicThinkingReplay: "off") when the receipt sits in the retained tail or exists only on the running turn. Before this change, the summarizer looked for the receipt only in the cut head, so it could send signed thinking that the receipt says must stay out. The headless summary path has no reasoning-rejection retry, so that request fails on the signature 400.

Fixes #5996

Background

After a thinking-signature repair (#5994) or a server tool between thinking blocks (#6004), Xum writes the receipt, and later requests in the context segment send no Anthropic thinking. summarizeContinuousCompaction passed replayReceiptMessages built from the head only. When the receipt was on a tail row, or only in the running turn's in-memory metadata (its partial not yet written), the summary request still carried the head's signed thinking.

Implementation

  • ContinuousCompactor: deps.summarize gets a 4th argument, receiptRows. It is the raw segment snapshot (rows, the same rows the cut is taken from, model-hidden rows included), so an empty receipt-only row counts too. readSnapshot copies the live turn's receipt onto the live row next to stepStartPartIndices.
  • summarizeContinuousCompaction takes a required receiptRows and passes it as replayReceiptMessages. It is required so that a caller cannot silently fall back to the head alone. continuous.ts forwards it.
  • StreamManager.getStreamInfo and the session host type expose initialMetadata.anthropicThinkingReplay. This is one more field on the snapshot object that getStreamInfo already builds.

The journal prefix rebuild (rebuildContinuousPrefix) is unchanged. It already reads prefixSourceRows, which include the tail, and #5994's parity test covers it.

Validation

Each test failed before the fix:

  • Compactor: a receipt on a tail row reaches summarize's receiptRows, while the head is only the older rows.
  • Compactor: a receipt held only by the live stream snapshot reaches receiptRows.
  • Summary path, with an Anthropic pinned model: with only the head as receipt rows, the head's signed thinking is sent (control). With the head plus a tail receipt row, no thinking is sent and the answer text stays.
  • StreamManager: during a real turn, getStreamInfo reports no receipt before the server-tool reasoning and "off" after it.

Mutation checks: removing each piece on its own fails exactly its test. Dropping the forwarding in continuous.ts fails tsc.

The summary-path test uses the file's existing MockLanguageModelV3 seam, so it asserts on the SDK-level prompt, not on an Anthropic HTTP body.

Risks

Low. The receipt check reads the whole segment, which is already in memory, instead of the head. If a receipt is found wrongly, the summarizer sends no thinking. That costs prompt-cache reuse, not correctness.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $96.87

…n the retained tail (#5996)

The summarizer searched only the cut head for the Anthropic thinking-repair
receipt. A receipt in the retained tail, or one held only by the running turn,
left the head's signed thinking in the summary request.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T03:03:43.642905Z e86d7d0 PR opened
🔒 Security Review ✅ Completed 2026-10-10T03:02:28.470372Z e86d7d0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit 8a963ef Oct 10, 2026
43 checks passed
@ThomasK33
ThomasK33 deleted the fix/continuous-summary-tail-receipt branch October 10, 2026 03:45
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.

🤖 fix: continuous compaction summary misses a replay receipt in the retained tail

1 participant