Repository navigation
Make forked agent spawns keep parent model config - #17247
Merged
Merged
Conversation
friel-openai
force-pushed
the
dev/friel/fork-config-inheritance
branch
from
April 10, 2026 15:20
ab97c22 to
d9a1aa4
Compare
jif-oai
reviewed
Apr 10, 2026
| Ok(config) | ||
| } | ||
|
|
||
| pub(crate) fn reject_forked_spawn_model_overrides( |
| apply_role_to_config(&mut config, role_name) | ||
| .await | ||
| .map_err(FunctionCallError::RespondToModel)?; | ||
| if fork_mode.is_some() { |
Contributor
There was a problem hiding this comment.
only if fork_mode is "all"
friel-openai
force-pushed
the
dev/friel/fork-config-inheritance
branch
from
April 10, 2026 16:43
d9a1aa4 to
a7f099a
Compare
jif-oai
approved these changes
Apr 13, 2026
friel-openai
marked this pull request as ready for review
April 13, 2026 15:07
friel-openai
enabled auto-merge (squash)
April 13, 2026 15:08
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
When a
spawn_agentcall does a full-history fork, keep the parent's effective agent type and model configuration instead of applying child role/model overrides.This is the minimal config-inheritance slice of #16055. Prompt-cache key inheritance and MCP tool-surface stability are split into follow-up PRs.
Design
agent_type,model, andreasoning_effortfor v1fork_contextspawns.agent_type,model, andreasoning_effortfor v2fork_turns = "all"spawns.fork_turns = "N") configurable; requested model/reasoning overrides and role config still apply there.Tests
cargo +1.93.1 test -p codex-core spawn_agent_fork_context --libcargo +1.93.1 test -p codex-core multi_agent_v2_spawn_fork_turns --libcargo +1.93.1 test -p codex-core multi_agent_v2_spawn_partial_fork_turns_allows_agent_type_override --lib