From 408bb8e81e14b01b4fb669b3d13624bdcace7c0f Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Mon, 16 Feb 2026 15:58:59 -0800 Subject: [PATCH] fix: block slash command queueing while agent is running (#983) --- src/cli/App.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cli/App.tsx b/src/cli/App.tsx index e92a3da..e8cb523 100644 --- a/src/cli/App.tsx +++ b/src/cli/App.tsx @@ -5693,6 +5693,15 @@ export default function App({ setDequeueEpoch((e) => e + 1); } + const isSlashCommand = userTextForInput.startsWith("/"); + if (isAgentBusy() && isSlashCommand) { + const attemptedCommand = userTextForInput.split(/\s+/)[0] || "/"; + const disabledMessage = `'${attemptedCommand}' is disabled while the agent is running.`; + const cmd = commandRunner.start(userTextForInput, disabledMessage); + cmd.fail(disabledMessage); + return { submitted: true }; // Clears input + } + // Interactive slash commands (like /memory, /model, /agents) bypass queueing // so users can browse/view while the agent is working. // Changes made in these overlays will be queued until end_turn.