fix: bind provider resumes to persisted sessions - #3166
Merged
Conversation
numnx
marked this pull request as ready for review
July 17, 2026 03:48
This was referenced Jul 17, 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 changed
codex exec --jsonthread.startedevent authoritative for the persisted native session id.rollout-*-<native-thread-id>.jsonlin the paired runtime volume instead of the newest rollout file.--conversationids; use workspace-local--continuewhen no native id was captured.Root cause and provider audit
The high-concurrency telemetry optimization switched Codex rollout collection to an incremental "latest file" reader. In a reused runtime home, an unrelated rollout could win identity precedence over the current invocation own
thread.startedevent. Task QA also resolved the native coding invocation by logical session while resolving the runtime volume independently by durable workspace identity. Together, those paths could pass a native thread id to a runtime home that did not contain its rollout even though provider state persistence remained enabled.The newest-file identity regression is Codex-specific. Claude Code reads an exact generated session file, OpenCode derives the exact session from the current event stream, Gemini and Qwen use project-scoped latest-session continuation inside the isolated paired runtime home, Antigravity derives its conversation id from its own per-invocation log, and Jules uses its hosted API session id. The QA workspace-binding repair is provider-agnostic. The audit also found and fixed the separate Antigravity logical-id fallback hazard described above.
Validation
pnpm run cifor the Codex root fixpnpm run lintafter the provider auditpnpm run test:backendafter the provider audit: 6,167 passed, 12 skippedpnpm run buildafter the provider auditRisk and rollback
Risk is limited to provider session identity/discovery and Task QA continuation selection. Legacy newest-rollout readers remain available only for callers without a Codex native id, and the bounded QA fallback remains available for already-corrupt records. Antigravity still uses an exact native conversation id whenever one is available. Roll back by reverting this PR; no database migration or persisted data rewrite is involved.