From 6decc41121438da9203c8e30275201b445e44d77 Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Thu, 30 Apr 2026 10:00:40 -0400 Subject: [PATCH] feat: add loop-status exit-code mode --- commands/loop-status.md | 2 + scripts/loop-status.js | 34 ++++++++++++-- tests/scripts/loop-status.test.js | 76 ++++++++++++++++++++++++++++++- 3 files changed, 108 insertions(+), 4 deletions(-) diff --git a/commands/loop-status.md b/commands/loop-status.md index 1149fc4b..0d0e9945 100644 --- a/commands/loop-status.md +++ b/commands/loop-status.md @@ -40,6 +40,8 @@ tool calls that have no matching `tool_result`. directly. - `ecc loop-status --bash-timeout-seconds 1800` adjusts the stale Bash threshold. +- `ecc loop-status --exit-code` exits `2` when stale loop or tool signals are + found, or `1` when transcripts cannot be scanned. - `ecc loop-status --watch` refreshes status until interrupted. - `ecc loop-status --watch --watch-count 3` emits a bounded watch stream for scripts and handoffs. diff --git a/scripts/loop-status.js b/scripts/loop-status.js index b0bee3f2..a21e708a 100644 --- a/scripts/loop-status.js +++ b/scripts/loop-status.js @@ -24,6 +24,7 @@ function usage() { ' --bash-timeout-seconds Age before a pending Bash call is stale (default: 1800)', ' --wake-grace-multiplier ScheduleWakeup grace multiplier (default: 2)', ' --now