Repository navigation
fix(ai): prevent stale replay after context rewrites - #120786
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
August 9, 2026 00:15
Contributor
Author
|
Land-ready proof for exact head The provider-owned repair removes only exact Exact commands run on the rebased head: Results:
Known proof gaps:
|
Contributor
Author
|
Merged via squash.
|
vincentkoc
added a commit
that referenced
this pull request
Aug 9, 2026
Punchcard-Session: amber-workshop-workshop-36 * origin/main: (28 commits) perf(doctor): keep bundled doctor contract closures dependency-light (#120698) fix(elevenlabs): preserve repeated committed speech segments (#120792) fix(ai): fence Responses replay metadata (#120777) fix(ai): invalidate stale compaction replay (#120786) fix(telegram): clean up every failed webhook startup phase (#120788) fix(codex): preserve configured MCP tools in scheduled turns (#120366) fix(ui): show dev checkout commit lag in Updates (#120769) fix(agents): repair XML-polluted tool names (#113814) fix(discord): remove only the bot own reactions (#120785) fix(macos): complete ChatGPT subscription setup (#120782) fix(plugins): surface safe administrator install warnings (#120783) fix(release): keep upgrade survivor sessions fresh (#120778) fix(providers): preserve realtime tool-result delivery ownership (#120776) fix(plugins): retain incognito scope for embedded session ownership (#120215) fix(elevenlabs): surface realtime provider error events (#120772) fix(agents): preserve exact steering delivery ownership (#120770) fix(telegram): prevent session-count routing slowdown (#120774) fix(agents): preserve authoritative background process outcomes (#120754) test(process): make Linux adapter wiring portable (#120741) fix(diagnostics-prometheus): send Content-Length on metrics HEAD responses (#120212) ...
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 9, 2026
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.
What Problem This Solves
Fixes an issue where users whose session transcripts were compacted, reset, truncated, or branch-rewritten could retain an OpenAI Responses compaction checkpoint tied to the old transcript prefix. Replaying that stale checkpoint after the prefix changed could send provider state that no longer matched the active conversation.
Why This Change Was Made
Compaction checkpoints are prefix-owned state, while route-scoped suppression tombstones are independent replay policy. This change puts invalidation at the provider-owned replay boundary: a pure helper removes only the exact
openai-responses-compactioncheckpoint and preserves suppression tombstones and unrelated replay state.Transcript branch rewrites apply that invalidation to every message re-appended at or after the first changed entry. Local/Pi compaction and reset apply it only to retained pre-boundary messages, preserving post-boundary checkpoints. There are no schema, protocol, storage, config, docs, or changelog changes.
User Impact
Session repair and context rewriting no longer carry stale OpenAI Responses compaction checkpoints into a changed conversation. Valid route suppression state and checkpoints created after the rewrite boundary continue to work unchanged.
Release-note context: fixes stale OpenAI Responses compaction replay after transcript truncation, compaction, reset, or branch rewriting.
Evidence
origin/main: 4 files, 111 tests passed across 2 Vitest shards.node scripts/run-vitest.mjs packages/agent-core/src/harness/session/session-context.test.ts packages/ai/src/transports/openai-responses-compaction-replay.test.ts src/agents/embedded-agent-runner/tool-result-truncation.test.ts src/agents/embedded-agent-runner/transcript-rewrite.test.tscore/coreTestschecks.--mode uncommittedexited clean with no accepted/actionable findings.git diff --checkpassed before commit and again after rebase.