Anonymous - 2026-09-20

Originally posted by: lodar

Thanks for this. You read our source correctly on both counts, and sorry for the slow reply.

Yes, we would take this, with one property changed.

Do not return a run id. A run opens when a seat claims work, so "a run row exists" currently
means "an attempt began", and reclaim and idle accounting depend on that. Submission should return an
admission identity instead:

5dive run submit --agent=<name> --work-order=<file|-> [--idempotency-key=<k>] --json
-> { "submission": "<lease-id>", "task": "DIVE-N", "state": "admitted", "run": null }

Three states rather than one: admitted (durable, idempotent, fail-closed, synchronous — this is
your binding), activated (a run opens when a seat starts), evidence (still best-effort). You
keep exactly what you asked for, a durable identity a retry re-resolves instead of duplicating. It
just is not called a run.

Build on src/lib/durable.sh rather than a new table. It already implements the durable,
idempotent, fail-closed claim you specified: a unique lease key derived from what the action does —
no pid, no timestamp, no nonce — and a claim that returns claimed, replay, or in-flight. It is a
plain library call, not welded to the one path using it today.

On delivery, precisely. A non-injecting path exists, but it is not the seat pulling its own work:
the heartbeat flushes the spool from outside the seat, and only when it observes the seat idle.
Delivery is still an inject — a deferred one, not an atomic one. Atomic delivery into a running agent
is not something we can engineer away, and we would rather say so than design around it: admission
can be atomic, arrival cannot. We think admission is the property your caller actually needs — if
that is wrong for your case, say so, because it changes the design.

Shape it under run rather than as a flag on agent send.

Happy to review a draft PR or an interface sketch first, whichever you prefer.