mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Switching to a fork can interrupt approval routing for source and child threads that remain on a local daemon or remote app server. Their pending requests and event listeners need to survive the switch. ## What changed - Retain background request routing and event listeners for tracked threads when switching to a daemon-backed fork, preserving pending approvals without duplicating them. - Register the source thread before the `fork_thread` tool creates a fork so its requests remain routable during the operation. - Route requests for the currently viewed thread to the active UI, even when that thread is also tracked in the agents overview. ## Testing Add regression coverage for local daemon and remote forks retaining source and child threads, replaying pending requests when returning to the source, and displaying active-thread file-change approvals. Verify that embedded forks still discard the source thread state and that `fork_thread` registers its source before issuing the fork request. GitOrigin-RevId: 63139e2b9a6eff373ab05a31e0140a432ce47389