Skip to content

The agent that grows with you

refactor: route the /loop wakeup send through _notif_submit

teknium1e78752906415
diff --git a/tui_gateway/session_notifications.py b/tui_gateway/session_notifications.py
index 22e504a7ae0..e6d8d5de310 100644
--- a/tui_gateway/session_notifications.py
+++ b/tui_gateway/session_notifications.py
@@ -189,12 +189,8 @@ def _notif_slash_loop_tick(rid: str, sid: str, session: dict, mgr, wakeup: str)
if not _notif_claim_turn(session):
mgr.abandon_tick()
return
- try:
- _emit("message.start", sid)
- _run_prompt_submit(rid, sid, session, payload["message"])
- except Exception:
- _notif_release_turn(session) # the swallow below would otherwise leave the session busy for good
- raise
+ # Releases the claim on failure: the swallow below would otherwise leave the session busy for good.
+ _notif_submit(rid, sid, session, payload["message"], "loop wakeup send failed")
return
except Exception:
pass