Repository navigation
v1.4.0 — wait for completion
- New
wait_for_completionprimitive: agents sleep honestly while their heavy job runs and wake promptly when it finishes — no morejob_statuspolling or guessed sleeps (completes the loop:wait_for_turnfor the queue,wait_for_completionfor execution) - Structured result on every path:
finished(exit code, output tail, duration, permit-released flag),still_running(checkpoint: call again),timeout,job_unknown,stopped_by_request— never unbounded run_with_permitgainswait: true(+wait_timeout_ms) for fire-and-wait in a single call- Order guarantee: the permit is released before waiters wake, so a woken agent always sees free capacity
- Daemon-tracked jobs: waiters are held server-side and resolved by the daemon's liveness sweep; daemon restarts are transparent (waiters re-issue, tracked permits survive via the journal)
- Old-daemon compatibility: new clients fall back to a light events-based poll — same result shape, no missed wakeups (live-verified against a 1.3.0 daemon)
- Exposed on MCP, OpenCode plugin, and CLI (
load-lock wait --job <id>) - Policy text and docs (AGENT_GUIDE, ARCHITECTURE, OPERATIONS, ADAPTERS) now teach the start-then-wait flow
Tests: 150/150 green.