mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
## Why Runtime process handles are recyclable and thread-local. Using them as terminal session identities can merge separate commands or associate `write_stdin` operations with the wrong exec. ## What changed - Give each exec a distinct terminal session and track the latest session for each thread-local process handle. - Record the exec selected by `write_stdin` at runtime and use it to correct session membership during replay, including when dispatch is delayed until a handle is reused. - Fall back to the latest session for the thread and handle when replaying older traces without runtime target events. ## Testing Extend reducer coverage for process ID reuse across threads and successive execs, stdin session membership, and delayed runtime target resolution. GitOrigin-RevId: 330c6fd26a4eebdef03ae600a030dc76920e0dd9