Fix exec inheritance of root shared flags (#18630)

Addresses #18113

Problem: Shared flags provided before the exec subcommand were parsed by
the root CLI but not inherited by the exec CLI, so exec sessions could
run with stale or default sandbox and model configuration.

Solution: Move shared TUI and exec flags into a common option block and
merge root selections into exec before dispatch, while preserving exec's
global subcommand flag behavior.
This commit is contained in:
Eric Traut
2026-04-20 16:12:17 -07:00
committed by GitHub
parent 2af4f15479
commit 0f1c9b8963
7 changed files with 372 additions and 158 deletions

View File

@@ -2,8 +2,10 @@ mod approval_mode_cli_arg;
mod config_override;
pub(crate) mod format_env_display;
mod sandbox_mode_cli_arg;
mod shared_options;
pub use approval_mode_cli_arg::ApprovalModeCliArg;
pub use config_override::CliConfigOverrides;
pub use format_env_display::format_env_display;
pub use sandbox_mode_cli_arg::SandboxModeCliArg;
pub use shared_options::SharedCliOptions;