Skip to content

v1.4.0 — wait for completion

Choose a tag to compare

@aron98 aron98 released this 20 Oct 13:54
· 9 commits to main since this release
  • New wait_for_completion primitive: agents sleep honestly while their heavy job runs and wake promptly when it finishes — no more job_status polling or guessed sleeps (completes the loop: wait_for_turn for the queue, wait_for_completion for 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_permit gains wait: 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.