List every running loop in loop-inbox, with the ID and tagline of each item its chunk takes

This commit is contained in:
2026-10-29 19:57:11 +01:00
parent 8bddfdc282
commit 9bcfaebb83
16 changed files with 389 additions and 50 deletions
+1
View File
@@ -110,6 +110,7 @@ Valid while cache reads cost a twentieth of input and Claude Code's compaction k
- loop-inbox runs the claude command the loop wrote, `bypassPermissions` included, so that claude runs in the same sandbox as the loop. Since loop-inbox runs a command read from a file, the folder is private to the user.
- Files, read by polling, need no daemon and only the standard library, and a loop with no loop-inbox running is answered on its terminal as before.
- loop-inbox lists a question only while its loop holds the session's lock file with flock, and removes a question whose lock is free. The kernel frees the lock however the loop ends, killed included. A process id could not tell a running loop from a killed one: on 2026-10-29 this machine's kernel handed out its 32,768 ids again every 30 to 75 minutes, so a killed loop's question came back whenever another process got its id. The lock file stays once the loop ends, one per project: removing it while another process has it open could let loop-inbox lock a file no loop holds. Todo item 252.
- A loop also lists itself as running, for its whole run, with the items its chunk takes: it holds `<session>.running.lock` and keeps `<session>.running` beside it, and loop-inbox lists it only while that lock is held, as with a question. The lock is a file of its own because the loop replaces `<session>.running` whole on each change, which gives it a new inode, and a flock belongs to an inode. The routed item comes from the route; the judge names the items the worker took in, in its reply's `items_taken_in`, and a reload hands them over. Todo item 255.
A bench of three readers seated as the README's audience picked the name `loop-inbox`, 3–0.