mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Use optional default environment for disabled mode
Restore CODEX_EXEC_SERVER_URL=none semantics by making EnvironmentManager::default_environment return None when environment access is disabled. Remove the separate disabled-for-agent flag and derive tool availability from the optional default environment. Add an end-to-end tool exposure test for CODEX_EXEC_SERVER_URL=none. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -5698,7 +5698,8 @@ impl CodexMessageProcessor {
|
||||
let environment = self
|
||||
.thread_manager
|
||||
.environment_manager()
|
||||
.default_environment();
|
||||
.default_environment()
|
||||
.unwrap_or_else(|| Arc::new(codex_exec_server::Environment::default()));
|
||||
// Status listing has no turn cwd. This fallback is used only
|
||||
// by executor-backed stdio MCPs whose config omits `cwd`.
|
||||
McpRuntimeEnvironment::new(environment, config.cwd.to_path_buf())
|
||||
@@ -5855,7 +5856,8 @@ impl CodexMessageProcessor {
|
||||
let environment = self
|
||||
.thread_manager
|
||||
.environment_manager()
|
||||
.default_environment();
|
||||
.default_environment()
|
||||
.unwrap_or_else(|| Arc::new(codex_exec_server::Environment::default()));
|
||||
// Resource reads without a thread have no turn cwd. This fallback
|
||||
// is used only by executor-backed stdio MCPs whose config omits `cwd`.
|
||||
McpRuntimeEnvironment::new(environment, config.cwd.to_path_buf())
|
||||
@@ -6449,8 +6451,7 @@ impl CodexMessageProcessor {
|
||||
.thread_manager
|
||||
.environment_manager()
|
||||
.default_environment()
|
||||
.get_filesystem();
|
||||
let fs = Some(fs);
|
||||
.map(|environment| environment.get_filesystem());
|
||||
let mut data = Vec::new();
|
||||
for cwd in cwds {
|
||||
let extra_roots = extra_roots_by_cwd
|
||||
|
||||
Reference in New Issue
Block a user