mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Expose the Codex version to commands and turn metadata (#42395)
## What changed - Set `CODEX_VERSION` to the running package version in user shell and unified exec environments, overriding stale shell-policy or snapshot values. - Add the reserved `codex_version` field to MCP turn metadata. ## Testing - Cover version propagation through shell policies, shell snapshots, unified exec, and MCP metadata. GitOrigin-RevId: 7846c70d668176530b1f467293b749dc9ddd79a0
This commit is contained in:
@@ -15,7 +15,7 @@ use crate::exec::StdoutStream;
|
||||
use crate::exec::execute_exec_request;
|
||||
use crate::exec_env::create_env;
|
||||
use crate::exec_env::inject_apply_patch_env;
|
||||
use crate::exec_env::inject_session_id_env;
|
||||
use crate::exec_env::inject_session_env;
|
||||
use crate::sandboxing::ExecRequest;
|
||||
use crate::session::TurnInput;
|
||||
use crate::session::turn_context::TurnContext;
|
||||
@@ -166,7 +166,7 @@ pub(crate) async fn execute_user_shell_command(
|
||||
let shell_snapshot_location = turn_environment.shell_snapshot(&cwd);
|
||||
let shell_environment_policy = turn_environment.shell_environment_policy();
|
||||
let mut exec_env_map = create_env(shell_environment_policy, Some(session.thread_id));
|
||||
inject_session_id_env(&mut exec_env_map, session.session_id());
|
||||
inject_session_env(&mut exec_env_map, session.session_id());
|
||||
inject_apply_patch_env(&mut exec_env_map, &turn_context.config.features);
|
||||
if exec_env_map.contains_key(PROXY_ACTIVE_ENV_KEY) {
|
||||
strip_managed_proxy_env(&mut exec_env_map);
|
||||
|
||||
Reference in New Issue
Block a user