fix(goal): the TUI judge also sees only its own session's processes; a lifted barrier resumes the loop from the idle hook

Independent review found two gaps in the first fix. The TUI/Desktop/dashboard
goal path (tui_gateway/prompt_turn.py) still passed every agent's processes to
the judge; it now filters by the session's own key like the CLI and gateway
loops. And the 30-minute barrier cap (and a pid/timer barrier lifting at all)
was only checked lazily, on the next turn, so a parked session with nothing
else arriving stayed parked. The CLI idle hook now checks the barrier every
5 s while idle and queues the goal's continuation the moment it lifts.

Tests (2 new): an elapsed timed barrier queues the continuation from the idle
hook and clears the barrier; an unparked or inactive goal is a no-op.
This commit is contained in:
Teknium
2026-09-05 06:23:55 -07:00
parent f5f54ab784
commit 1f3912d277
4 changed files with 91 additions and 1 deletions
+1
View File
@@ -3468,6 +3468,7 @@ class HermesCLI(CLIAgentSetupMixin, CLICommandsMixin, CLIBillingMixin, CLITuiMix
self._check_termios_drift,
lambda: self._drain_process_notifications("cli-idle"),
self._maybe_fire_loop_tick,
self._maybe_resume_parked_goal,
):
with suppress(Exception):
step()