Files
codex/codex-rs/app-server/tests
jif 82b17bc724 Allow agent roles on full-history forks (#37252)
## Why

Multi-agent v2 rejected `agent_type` when `fork_turns` was `all`, forcing callers to choose between a configured role and the parent's full conversation context.

## What changed

- Apply an explicitly selected role to full-history forks, including its model and developer instructions.
- Preserve the parent's developer instructions when the selected role does not define its own.
- Keep the inherited conversation history and model-switch context intact.
- Update the `spawn_agent` schema to clarify that roles apply independently of history inheritance.

## Testing

- Cover full-history role overrides and developer-instruction precedence in multi-agent v2 tests.

GitOrigin-RevId: cd4f35e31d75f56289760f245bff38dd0233abe6
2026-08-06 10:27:33 +00:00
..