feat: Explicitly Prevent .undo usage in graph agents
CI / All (ubuntu-latest) (push) Failing after 25s
CI / All (macos-latest) (push) Has been cancelled
CI / All (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-07-15 16:27:57 -06:00
parent 4c7de650c0
commit e9c52566b8
+6
View File
@@ -976,6 +976,12 @@ pub async fn run_repl_command(
} }
}, },
".undo" => { ".undo" => {
if let Some(name) = graph::active_agent_graph_name(ctx) {
bail!(
"Graph-based agent '{name}' does not support .undo. \
The graph manages its own state."
);
}
ctx.undo_last_exchange()?; ctx.undo_last_exchange()?;
} }
".rebuild" => match args { ".rebuild" => match args {