Files
codex/codex-rs/core/tests
aakash-oai 5fdb50af95 Restrict code-mode host replacement to session admission (#57782)
## Why

Automatic gRPC reconnection could spawn a replacement host while dispatching an RPC for an existing session. Host loss must remain visible so recovery can report lost state without replaying execution or completed external effects.

## What changed

- Bind each local host channel to one child process and allow only `OpenSession` to replace a dead host.
- Add caller-owned transport support to `GrpcCodeModeSessionProvider` and map local transport failures to `Unavailable` so initial connection failures use the existing bounded admission retries.

## Testing

Add regression coverage for child exit during initial connection and between channel selection and dispatch, concurrent session recovery, and child reaping after teardown. An integration test kills the host after a command completes and verifies that recovery reports the reset, clears stored state, and leaves the command's external effect unchanged.

Increase the remote MCP stalled-handshake test's initialization timeout and mock response delay to let requests reach the server on loaded CI workers.

GitOrigin-RevId: 4ffd810e4cfcfb7a56e606816aa867bc206a09b6
2026-10-28 16:46:41 +00:00
..