mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Expose the session ID to shell commands (#37848)
## What changed - Set `CODEX_SESSION_ID` to the shared root-session ID for shell tool calls, unified exec processes, and user shell commands. - Preserve `CODEX_SESSION_ID` when restoring a shell snapshot, alongside the existing runtime-owned environment variables. GitOrigin-RevId: 5228867d25507105c7edf11607a8298958c3b917
This commit is contained in:
1 parent
4996cf05af
commit
97729885d4
7 files changed
+18
No files matched your search
@@ -5,6 +5,7 @@ Concrete ToolRuntime implementations for specific tools. Each runtime stays
|
||||
small and focused and reuses the orchestrator for approvals + sandbox + retry.
|
||||
*/
|
||||
use crate::exec_env::CODEX_PERMISSION_PROFILE_ENV_VAR;
|
||||
use crate::exec_env::CODEX_SESSION_ID_ENV_VAR;
|
||||
use crate::exec_env::CODEX_THREAD_ID_ENV_VAR;
|
||||
use crate::sandboxing::SandboxPermissions;
|
||||
use crate::shell::Shell;
|
||||
@@ -269,6 +270,7 @@ pub(crate) fn maybe_wrap_shell_lc_with_snapshot(
|
||||
.collect::<String>();
|
||||
let mut override_env = explicit_env_overrides.clone();
|
||||
for key in [
|
||||
CODEX_SESSION_ID_ENV_VAR,
|
||||
CODEX_THREAD_ID_ENV_VAR,
|
||||
CODEX_PERMISSION_PROFILE_ENV_VAR,
|
||||
CODEX_APPLY_PATCH_PRESERVE_LINE_ENDINGS_ENV_VAR,
|
||||
|
||||
Reference in new issue
Block a user