mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
Cache shell snapshots in the exec server (#39756)
## What changed - Add the `shellSnapshotV2` executor capability and an optional shell snapshot request to `ExecParams`. - Capture and restore Unix shell state and profile exports from an in-memory, attachment-scoped cache for `bash`, `zsh`, and `sh`. - Apply environment policies, runtime `PATH` entries, sandbox context, and live managed-proxy settings when preparing restored commands. - Bound snapshot size, capture time, scope length, and cache capacity, and fall back to the original command when capture fails. ## Testing - Cover local, remote, TTY, sandboxed, and supported-shell execution, plus environment filtering, proxy handling, in-memory reuse, and capture failure fallback. GitOrigin-RevId: 624f747972c249c88c6f10f42cf0af97b75b5541
This commit is contained in:
@@ -221,6 +221,7 @@ fn exec_server_params_for_request(
|
||||
argv: request.command.clone(),
|
||||
cwd: request.cwd.clone(),
|
||||
env_policy,
|
||||
shell_snapshot: None,
|
||||
env,
|
||||
tty,
|
||||
pipe_stdin: false,
|
||||
|
||||
Reference in New Issue
Block a user