mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
## Why Hosts preparing a child thread lacked the parent's effective base instructions and the developer instructions a native subagent would inherit. Hosts also need the base instruction provenance to preserve custom text while letting model-owned instructions resolve for the child's model. ## What changed Include effective base instruction text and provenance in `PreparedChildContext`. Share developer instruction selection with native subagent creation so host preparation uses the configured V2 subagent override when present and falls back to the parent turn's developer instructions otherwise. ## Testing Add integration coverage that starts a child on a different model and checks that custom base instructions persist, model-owned instructions resolve for the child model, and the V2 override takes precedence over the parent developer instructions. GitOrigin-RevId: 0e151e343e58d995c8901a9ba819cb7f60d248f5