fix(gateway): bypass active-session guard for gateway-handled slash commands

This commit is contained in:
Xowiek
2026-04-17 04:08:20 +03:00
committed by Teknium
parent d465fc5869
commit 511ed4dacc
5 changed files with 114 additions and 15 deletions

View File

@@ -1579,20 +1579,9 @@ class BasePlatformAdapter(ABC):
# session lifecycle and its cleanup races with the running task
# (see PR #4926).
cmd = event.get_command()
if cmd in (
"approve",
"deny",
"status",
"agents",
"tasks",
"stop",
"new",
"reset",
"background",
"restart",
"queue",
"q",
):
from hermes_cli.commands import should_bypass_active_session
if should_bypass_active_session(cmd):
logger.debug(
"[%s] Command '/%s' bypassing active-session guard for %s",
self.name, cmd, session_key,