feat: tie shell snapshot to cwd (#11231)

Fix for this: https://github.com/openai/codex/issues/11223

Basically we tie the shell snapshot to a `cwd` to handle `cwd`-based env
setups
This commit is contained in:
jif-oai authored and GitHub committed 2026-02-09 22:14:39 +00:00
1 parent c2ca51273f
commit ffd4bd345c
8 files changed
+268 -63

No files matched your search

+5 -1
View File
@@ -113,7 +113,11 @@ pub(crate) async fn execute_user_shell_command(
let use_login_shell = true;
let session_shell = session.user_shell();
let display_command = session_shell.derive_exec_args(&command, use_login_shell);
let exec_command = maybe_wrap_shell_lc_with_snapshot(&display_command, session_shell.as_ref());
let exec_command = maybe_wrap_shell_lc_with_snapshot(
&display_command,
session_shell.as_ref(),
turn_context.cwd.as_path(),
);
let call_id = Uuid::new_v4().to_string();
let raw_command = command;