Skip to main content
Trinity
Announcements/June 5, 2026
June 5, 2026

Trinity Target Architecture — Coordination Revised: Push → Pull

Off Friday's call, docs/planning/TARGET_ARCHITECTURE.md has been updated. Agent coordination moves from a push model (backend dispatches into a Redis mailbox) to pull / work-stealing: the backend never pushes — every task is a durable row in one per-agent Postgres queue, and the agent pulls the next one only when it has a free worker. A busy or dead agent just stops pulling, so work never lands on an agent that isn't ready.

Why:simpler (deletes the slot ZSET, dispatch breaker, and most of the cleanup/canary machinery), one source of truth for "queued" + "running", the two levers we wanted (depth = queued count, capacity = worker count), kills the Cornelius runaway, ~80% reuse of what we've already built.

Two constraints:

  • Postgres lands beforethe queue carries the fleet — SQLite's single-writer lock is the real 200-agent ceiling; schema-changing features are on hold this week.
  • Side-effect idempotency is the open blocker — re-delivery is safe for bookkeeping but re-sends an agent's email/payment; pull mode is read-only agents first until effect-scoped keys exist.

The doc is updated — read it and push back: docs/planning/TARGET_ARCHITECTURE.md