DM the human on Mattermost for each question, release ready to cut and exit 1 of loop-claude
CI / tests (pull_request) Successful in 2m32s

This commit is contained in:
2026-11-11 22:24:06 +01:00
parent c9514fe8b4
commit 5588270e43
15 changed files with 458 additions and 4 deletions
+4
View File
@@ -22,6 +22,7 @@ from loop_claude.project.records import read_records
from claude_code.session import session_named
from loop_state.running_loops import shown_running
from loop_claude.stop import Stop
from loop_claude.direct_message import tell
@@ -32,6 +33,9 @@ def main(argv: list[str], env: typing.Mapping[str, str], paths: Paths, launcher:
stop = Stop(130, "")
if stop.reason:
say(stop.reason, effects, stdout=not stop.code)
# Exit 2 is a stop the human chose or must answer at the terminal, and 130 is Ctrl-C; a loop given no task stops before it runs.
if stop.code == 1 and argv:
tell(f"loop-claude in {cwd} stopped: {stop.reason}", effects)
return stop.code
+3
View File
@@ -33,6 +33,9 @@ interrupts of every loop on the machine. The first answer counts, from either pl
- Enter alone, on loop-claude's terminal: stops the loop.
A release ready to cut opens that session on the terminal at once, since only the human may cut it;
loop-inbox lists it too. While claude is open, Ctrl-C reaches it alone, and the loop goes on.
Where ~/.claude/.env exists, each question, and each stop with exit 1, also goes to the human as a
Mattermost DM, as bin/mattermost-dm sends it; a DM that fails is said on the terminal, and the loop
goes on.
While it runs, loop-claude also lists itself in loop-inbox, with the todo.md items its chunk takes,
as bin/loop_state/running_loops.py describes.