mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Forked subagent startup serializes history persistence and spawn-edge writes. Cancellation during startup can also leave a provisional child behind. ## What changed - Defer copied-history durability so it can run alongside spawn-edge persistence, while still awaiting both before submitting the child's initial input. - Commit agent and residency reservations and notify clients only after initial input is accepted. - Guard provisional children so cancellation or startup failure removes and shuts them down, discards their stored state, and closes their spawn edge after any pending edge write finishes. ## Testing Add coverage for cancellation at the child-history durability barrier, checking child termination, removal, and edge closure. Extend fork-context tests in legacy and paginated history modes to verify inherited context can be read from storage after spawn acknowledgment without flushing the live child first. GitOrigin-RevId: e02dda57efc32b7237bb7af0ce5e5844922890c3