[codex] Persist multi-agent version metadata#25153
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d617fd14cb
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Arc::clone(&self.auth_manager), | ||
| agent_control, | ||
| session_source, | ||
| /*parent_multi_agent_version*/ None, |
There was a problem hiding this comment.
Preserve stored multi-agent version on resume
When resuming an agent from a thread store whose selector lives in StoredThread.multi_agent_version rather than in a SessionMeta rollout item, passing None here makes Codex::spawn resolve v1/v2 from the current feature flags instead. This already applies to the in-memory/pathless store shape, where creation metadata can carry the selector while the replay history does not, so a resumed thread can switch multi-agent systems despite the stored metadata that resume_single_agent_from_rollout just read.
Useful? React with 👍 / 👎.
| RolloutItem::SessionMeta(meta_line) | ||
| if meta_line.meta.id == resumed.conversation_id => | ||
| { | ||
| Some(meta_line.meta.multi_agent_version) |
There was a problem hiding this comment.
Skip unpinned metadata entries when resolving version
When a legacy rollout is first pinned, it appends a later SessionMeta with multi_agent_version, but existing compatibility updates such as memory-mode or git updates append another SessionMeta cloned from the original head record, where this field is still omitted. Because this reverse scan stops at that newest SessionMeta even when its value is None, the next resume/fork treats the thread as unpinned and can switch back to whatever the current feature flags say; keep searching for an actual version or ensure metadata-only SessionMeta updates preserve the pinned selector.
Useful? React with 👍 / 👎.
d617fd1 to
88f1739
Compare
Why
The runtime pinning change needs a durable place to store the selected multi-agent system before any behavior changes are introduced.
What changed
MultiAgentVersionenum withv1andv2.This PR is structural only. It does not resolve flags or change runtime gates.
Verification
Ran
just fmt. Validation is running in online CI.Stack
Supersedes #25032.