codex/codex-rs/code-mode-host
Jennifer Zhao 806d9732c9 Report exec runtime resets before accepting further requests (#52825)
## Why

Replacing a gRPC code-mode runtime loses stored values and running cells. Silently continuing after reconnection hides that loss, while prior external tool operations may already have completed.

## What changed

- Capture the runtime generation when `execute` and `wait` calls are created. If recovery replaces it, reject those calls with an explicit reset error, including concurrent calls and calls first polled after recovery.
- Explain the lost state and advise inspecting prior tool results before retrying. Allow a fresh `exec` call to continue on the replacement runtime.
- Keep `terminate` from reopening the runtime so cleanup cannot hide a reset from the next request.

## Testing

Extend gRPC recovery tests to cover reset errors after host restarts, missing sessions, and route loss, rejection of queued calls, and successful fresh execution with cleared stored state.

GitOrigin-RevId: 914cab3bb45e30a3f3b2afacb5631e42b18e21b0
History 2026-10-10 08:51:21 +00:00
..
src Add opt-in gRPC over stdio for the code-mode host (#52723) 2026-10-09 23:26:34 +00:00
tests Report exec runtime resets before accepting further requests (#52825) 2026-10-10 08:51:21 +00:00
BUILD.bazel Add Bazel release staging archives (#51850) 2026-10-07 22:11:14 +00:00
Cargo.toml Enforce application network policy for AWS auth and telemetry (#47408) 2026-09-23 00:47:34 +00:00