Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Reject dynamic environments named `local` (#34784)

jif44436fd07592
diff --git a/codex-rs/exec-server/src/environment.rs b/codex-rs/exec-server/src/environment.rs
index 0f0cc4737b..4ac437c728 100644
--- a/codex-rs/exec-server/src/environment.rs
+++ b/codex-rs/exec-server/src/environment.rs
@@ -490,6 +490,11 @@ fn validate_environment_id(environment_id: &str) -> Result<(), ExecServerError>
"environment id cannot be empty".to_string(),
));
}
+ if environment_id == LOCAL_ENVIRONMENT_ID {
+ return Err(ExecServerError::Protocol(format!(
+ "environment id `{LOCAL_ENVIRONMENT_ID}` is reserved for EnvironmentManager"
+ )));
+ }
Ok(())
}