Sync agent plan mode state on CLI startup

CLI starts in plan mode by default (when not in agent mode), but was not
calling agent.set_plan_mode(true) at initialization. This meant the gate
check would not run until the user explicitly entered plan mode via /plan.
This commit is contained in:
Dhanji R. Prasanna
2026-02-05 11:47:38 +11:00
parent b86901a86b
commit 25ad198b83

View File

@@ -288,6 +288,9 @@ pub async fn run_interactive<W: UiWriter>(
// Track plan mode state (start in plan mode for non-agent mode)
let mut in_plan_mode = !from_agent_mode;
// Sync agent's plan mode state with CLI state
agent.set_plan_mode(in_plan_mode);
// Initialize rustyline editor with history
let config = Config::builder()
.completion_type(rustyline::CompletionType::List)