Commit Graph
1 Commits
Author SHA1 Message Date
pastilhasandClaude Opus 5 b9fce2aeb6 draft: waits as a primitive, not an agent-comms trick
The field report describes the watcher for one purpose — one agent waiting on another's push. That is
where it was discovered, not where it belongs. Same shape answers: wait for the job, wait for the
container, wait for the credential file, wait for a human to reply.

What this adds over the field report:

  the cost model as a formula   idle is free forever; a wait costs `fires x context-at-the-time`, and
                                every wake is uncached by construction because the prompt cache TTL is
                                ~5 min and nothing worth waiting for resolves that fast
  block > poll > model          most things Officer waits on can be blocked on rather than polled.
                                inotify for a file, tail --pid for a process, docker events, IMAP IDLE,
                                and — highest leverage and unbuilt — postgres LISTEN/NOTIFY, since
                                nearly everything here is already a row in one database
  an exit-code contract         0 fired / 1 timed out / 2 broke. 1 and 2 must not be conflated: "nothing
                                happened" and "I stopped being able to tell" are opposite facts, and
                                absence reads as reassurance
  lifetimes                     if the payload plus the repo is enough to act on, do not keep a session
                                alive to receive it. Event-spawned short-lived agents cost a constant
                                amount per event; resident ones cost more every time

Draft. One mechanism proven (the git poll, fired twice tonight); the contract and the Officer use-case
table are specification. Marked measured vs reasoned throughout.

On a branch, not master: the master checkout is pinned behind the remote while the server runs from it,
and pushing master would also trip the watcher currently armed on it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 00:31:07 +00:00