From e9c52566b88e11248f92a29ef443731a83e6880a Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Wed, 15 Jul 2026 16:27:57 -0600 Subject: [PATCH] feat: Explicitly Prevent .undo usage in graph agents --- src/repl/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/repl/mod.rs b/src/repl/mod.rs index bf8b49b..a23cc88 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -976,6 +976,12 @@ pub async fn run_repl_command( } }, ".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()?; } ".rebuild" => match args {