You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keeping provider-private history usable when the serving provider changes mid-thread
#8676
Switching the serving provider mid-thread breaks replay. The history carries provider-private
state (encrypted reasoning/compaction, agent-task blobs) that the new provider cannot read.
Existing reports:
opencodex#3661 - routed V2 subagent dispatch intermittently fails with unreadable_encrypted_agent_task
opencodex#92 - a V2 cross-provider sub-agent loses its NEW_TASK body
Most current fixes recover after the error, by dropping the incompatible items (e.g. #3920).
We have been running a boundary model that avoids the error instead. Before opening a PR we want
to check whether it fits the direction here.
Rules it follows
Same-provider continuation is lossless; private state is kept and cache still hits.
Only a provider boundary drops anything, and only the non-portable parts.
Visible state survives every switch: messages, tool calls and outputs, turn metadata.
Ordering is fail-closed: a rewritten, reordered or delayed request is refused, not silently merged.
Switching back starts a new epoch; old foreign private state is never restored.
The client is not trusted: ordering is re-checked from content fingerprints on each request.
Only hashes/marks are stored, never conversation content.
The rollout is never rewritten; projection happens per request.
Implementation
A local OpenCodex layer: an epoch/boundary state machine, about 790 lines across the request
pipeline. Covered by 81 unit tests and a live acceptance matrix (same-provider, switch,
child-followup, fork, compaction, partial-failure retry). We can share the design and open a PR
if the direction fits.
Questions
Should recovery stay reactive, or is a proactive boundary model in scope?
Any constraint on storing per-thread epoch metadata under the config dir?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Switching the serving provider mid-thread breaks replay. The history carries provider-private
state (encrypted reasoning/compaction, agent-task blobs) that the new provider cannot read.
Existing reports:
Most current fixes recover after the error, by dropping the incompatible items (e.g. #3920).
We have been running a boundary model that avoids the error instead. Before opening a PR we want
to check whether it fits the direction here.
Rules it follows
Implementation
A local OpenCodex layer: an epoch/boundary state machine, about 790 lines across the request
pipeline. Covered by 81 unit tests and a live acceptance matrix (same-provider, switch,
child-followup, fork, compaction, partial-failure retry). We can share the design and open a PR
if the direction fits.
Questions
All reactions