跳转至

idle

Catches the undeclared stop the stop-gate misses. When the harness signals — via an idle-prompt notification — that the agent is simply sitting idle at its prompt rather than working, this hook marks the session idle, so a session that quietly ran out of things to do is not left reading as active on the board.

It acts only on the idle-prompt notification, ignoring every other notification kind. As a board-lifecycle hook it also acts only on a GOVERNED session — it resolves the record in the global store from the payload's session_id and no-ops unless governed: true — then marks idle via spex session idle --session <id>. It is guarded so it never clobbers a deliberate declaration: marking idle applies only to a session still in the undeclared active state, leaving any considered awaiting, asking, parked, or error claim untouched. Together with stop-gate and session-fail it closes the last gap where a session could stop without its true state reaching the board.