List a loop's question in loop-inbox only while the loop holds the session's lock, so a killed loop's question stays gone whatever its pid now names

This commit is contained in:
2026-10-29 18:14:44 +01:00
parent 93d413f5f3
commit 5df105033c
10 changed files with 157 additions and 66 deletions
+1
View File
@@ -109,6 +109,7 @@ Valid while cache reads cost a twentieth of input and Claude Code's compaction k
- While claude is open for a question, as for a release ready to cut, the routing calls or a `/talk`, loop-inbox lists the loop and where claude is open, but takes no answer for it.
- 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: 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 bench of three readers seated as the README's audience picked the name `loop-inbox`, 3–0.