feat: persist and inherit per-thread multi-agent runtime#25708
Closed
jif-oai wants to merge 5 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8aa631734
ℹ️ 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".
This was referenced Jun 2, 2026
jif-oai
added a commit
that referenced
this pull request
Jun 2, 2026
Stack split from #25708. Original PR intentionally left open. This first PR adds the multi-agent runtime metadata types and catalog plumbing used by the rest of the stack.
jif-oai
added a commit
that referenced
this pull request
Jun 2, 2026
Stack split from #25708. Original PR intentionally left open. This second PR persists multi-agent runtime metadata through thread creation, rollout recording, and thread storage.
jif-oai
added a commit
that referenced
this pull request
Jun 2, 2026
Stack split from #25708. Original PR intentionally left open. This third PR resolves the effective per-thread multi-agent runtime from persisted metadata, inherited runtime, and current model selection.
jif-oai
added a commit
that referenced
this pull request
Jun 2, 2026
Stack split from #25708. Original PR intentionally left open. This fourth PR adds coverage that remote model multi-agent runtime selectors override local feature flag defaults.
jif-oai
added a commit
that referenced
this pull request
Jun 2, 2026
Stack split from #25708. Original PR intentionally left open. This fifth PR adds coverage that a remotely selected multi-agent runtime is applied when the model is selected before the first turn.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This first PR adds the multi-agent runtime metadata types and catalog plumbing used by the rest of the stack.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This second PR persists multi-agent runtime metadata through thread creation, rollout recording, and thread storage.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This third PR resolves the effective per-thread multi-agent runtime from persisted metadata, inherited runtime, and current model selection.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fourth PR adds coverage that remote model multi-agent runtime selectors override local feature flag defaults.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fifth PR adds coverage that a remotely selected multi-agent runtime is applied when the model is selected before the first turn.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This first PR adds the multi-agent runtime metadata types and catalog plumbing used by the rest of the stack.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This second PR persists multi-agent runtime metadata through thread creation, rollout recording, and thread storage.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This third PR resolves the effective per-thread multi-agent runtime from persisted metadata, inherited runtime, and current model selection.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fourth PR adds coverage that remote model multi-agent runtime selectors override local feature flag defaults.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fifth PR adds coverage that a remotely selected multi-agent runtime is applied when the model is selected before the first turn.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This first PR adds the multi-agent runtime metadata types and catalog plumbing used by the rest of the stack.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This second PR persists multi-agent runtime metadata through thread creation, rollout recording, and thread storage.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This third PR resolves the effective per-thread multi-agent runtime from persisted metadata, inherited runtime, and current model selection.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fourth PR adds coverage that remote model multi-agent runtime selectors override local feature flag defaults.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fifth PR adds coverage that a remotely selected multi-agent runtime is applied when the model is selected before the first turn.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This first PR adds the multi-agent runtime metadata types and catalog plumbing used by the rest of the stack.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This second PR persists multi-agent runtime metadata through thread creation, rollout recording, and thread storage.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This third PR resolves the effective per-thread multi-agent runtime from persisted metadata, inherited runtime, and current model selection.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fourth PR adds coverage that remote model multi-agent runtime selectors override local feature flag defaults.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fifth PR adds coverage that a remotely selected multi-agent runtime is applied when the model is selected before the first turn.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This first PR adds the multi-agent runtime metadata types and catalog plumbing used by the rest of the stack.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This second PR persists multi-agent runtime metadata through thread creation, rollout recording, and thread storage.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This third PR resolves the effective per-thread multi-agent runtime from persisted metadata, inherited runtime, and current model selection.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fourth PR adds coverage that remote model multi-agent runtime selectors override local feature flag defaults.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fifth PR adds coverage that a remotely selected multi-agent runtime is applied when the model is selected before the first turn.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This first PR adds the multi-agent runtime metadata types and catalog plumbing used by the rest of the stack.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This second PR persists multi-agent runtime metadata through thread creation, rollout recording, and thread storage.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This third PR resolves the effective per-thread multi-agent runtime from persisted metadata, inherited runtime, and current model selection.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fourth PR adds coverage that remote model multi-agent runtime selectors override local feature flag defaults.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fifth PR adds coverage that a remotely selected multi-agent runtime is applied when the model is selected before the first turn.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This first PR adds the multi-agent runtime metadata types and catalog plumbing used by the rest of the stack.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This second PR persists multi-agent runtime metadata through thread creation, rollout recording, and thread storage.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This third PR resolves the effective per-thread multi-agent runtime from persisted metadata, inherited runtime, and current model selection.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fourth PR adds coverage that remote model multi-agent runtime selectors override local feature flag defaults.
dkropachev
pushed a commit
to dkropachev/codex
that referenced
this pull request
Jun 9, 2026
Stack split from openai#25708. Original PR intentionally left open. This fifth PR adds coverage that a remotely selected multi-agent runtime is applied when the model is selected before the first turn.
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.
Why
multi_agent_versionwas effectively a live feature-flag decision. That meant a thread could switch runtimes when it was resumed, forked, or spawned under different config than the one that created it, and it made model-catalog runtime selectors unreliable if the user changed models before the first real turn. The result was drift in tool surfacing, interrupt history markers, usage-hint filtering, and thread concurrency limits.What changed
MultiAgentVersionto rolloutSessionMetaand model-catalogModelInfo, plus helpers to recover it from stored history.V1.ThreadStore::set_multi_agent_version_if_unsetso older rollouts can be backfilled without rewriting thread history wholesale.Testing
core/tests/suite/model_runtime_selectors.rs,app-server/tests/suite/v2/thread_resume.rs,app-server/tests/suite/v2/thread_fork.rs,core/src/session/tests.rs, andthread-store/src/local/mod.rs.