Files
codex/codex-rs/core/src
sayan-oai 5685183570 Use captured environment state for permissions and daemon recovery (#46568)
## Why

When a selected environment is unavailable, permission fallbacks can use the turn's initial environment and workspace roots. Daemon recovery can also miss a local environment that finishes starting after the turn begins.

## What changed

- Resolve fallback permissions from thread defaults using the captured selection's workspace root URIs, including when setup is starting or has failed.
- Apply this resolution to Guardian reviews, permission instructions, and sandbox context selection.
- Capture daemon recovery from the latest step inputs and refresh environment readiness before checking recovery eligibility.

## Testing

Add regression tests for Guardian resolving project-root restrictions against an unavailable captured environment's workspace and for daemon recovery including a local environment that finishes starting during a turn.

GitOrigin-RevId: c76d83d786fdc9c444b78ecbc335b02a20805c58
2026-09-19 01:56:57 +00:00
..