diff --git a/gateway/run.py b/gateway/run.py index 225f82fa1..cdf33135e 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -1821,6 +1821,15 @@ class GatewayRunner: adapter._pending_messages[_quick_key] = queued_event return "Queued for the next turn." + # /approve and /deny must bypass the running-agent interrupt path. + # The agent thread is blocked on a threading.Event inside + # tools/approval.py — sending an interrupt won't unblock it. + # Route directly to the approval handler so the event is signalled. + if _cmd_def_inner and _cmd_def_inner.name in ("approve", "deny"): + if _cmd_def_inner.name == "approve": + return await self._handle_approve_command(event) + return await self._handle_deny_command(event) + if event.message_type == MessageType.PHOTO: logger.debug("PRIORITY photo follow-up for session %s — queueing without interrupt", _quick_key[:20]) adapter = self.adapters.get(source.platform)