Standardize shell execution on unified exec (#39772)

## What changed

- Use `exec_command` and `write_stdin` as the shell tool surface.
- Treat legacy `default`, `local`, and `shell_command` model metadata as `unified_exec`.
- Remove obsolete shell-selection configuration and runtime paths while preserving the feature and policy gates for zsh fork execution.

GitOrigin-RevId: d743cbe598630d73052f1fecad680c4cde17977d
This commit is contained in:
jif authored and copyberry committed 2026-08-20 18:29:35 +00:00
1 parent 5bcd7b0fbc
commit bce5f2fcfc
40 files changed
+189 -992

No files matched your search

+15 -3
View File
@@ -6440,8 +6440,6 @@ async fn legacy_toggles_map_to_features() -> std::io::Result<()> {
assert!(config.features.enabled(Feature::UnifiedExec));
assert!(config.use_experimental_unified_exec_tool);
Ok(())
}
@@ -11033,6 +11031,7 @@ async fn feature_requirements_can_still_disable_unified_exec() -> std::io::Resul
[features]
unified_exec = false
shell_tool = true
unified_exec_zsh_fork = false
"#,
),
)
@@ -11041,14 +11040,27 @@ shell_tool = true
assert!(!config.features.enabled(Feature::UnifiedExec));
assert!(config.features.enabled(Feature::ShellTool));
assert!(!config.features.enabled(Feature::UnifiedExecZshFork));
assert!(
!config
.startup_warnings
.iter()
.any(|warning| warning.contains("Ignoring unknown `features` requirement")),
"{:?}",
config.startup_warnings
);
config
.features
.enable(Feature::UnifiedExec)
.expect("managed feature mutations should normalize successfully");
config
.features
.enable(Feature::UnifiedExecZshFork)
.expect("managed feature updates should preserve administrator policy");
assert!(!config.features.enabled(Feature::UnifiedExec));
assert!(config.features.enabled(Feature::ShellTool));
assert!(!config.features.enabled(Feature::UnifiedExecZshFork));
Ok(())
}
-6
View File
@@ -991,9 +991,6 @@ pub struct Config {
/// Configuration for the experimental code-mode tool surface.
pub code_mode: CodeModeConfig,
/// If set to `true`, used only the experimental unified exec tool.
pub use_experimental_unified_exec_tool: bool,
/// Maximum poll window for background terminal output (`write_stdin`), in milliseconds.
/// Default: `300000` (5 minutes).
pub background_terminal_max_timeout: u64,
@@ -3774,8 +3771,6 @@ impl Config {
config
};
let use_experimental_unified_exec_tool = features.enabled(Feature::UnifiedExec);
let forced_chatgpt_workspace_id = cfg
.forced_chatgpt_workspace_id
.clone()
@@ -4175,7 +4170,6 @@ impl Config {
update_plan_enabled,
tool_registry,
code_mode,
use_experimental_unified_exec_tool,
background_terminal_max_timeout,
ghost_snapshot,
multi_agent_v2,