Publish the roster first
A coordinator can call only delegates frozen into its immutable agent version. Each delegate either pins an exact child version or follows a child agent’s latest published version:22222222-… of the invoice reviewer and follows
the shipment-extraction agent 33333333-…. It also pins one Skill version in
skillVersionIds and follows Skill 55555555-… in skillIds; see
Versioned Skills.
A delegate names exactly one of the two. Delegate keys must be unique, and so
must the pinned versions and the followed agents. A coordinator can contain at
most 32 delegates, and
maxParallel is from 1 through 8. Publishing rejects a
child from the coordinator’s own agent definition. The platform tool names
delegate_agent and message_agent are reserved.
Because the workspace is shared, coordinator and child versions must select
the same sandbox enabled state, provider key, snapshot, and network policy.
Their capability arrays may differ, so a child can receive a narrower set of
filesystem, shell, or browser tools. Publication also rejects direct or
indirect delegate cycles.
The console exposes the same roster under Agents → Delegates. Each pick pins
the agent’s current version; switch a linked delegate’s version selector to
Latest version to follow the agent instead. A later child publication never
changes an existing coordinator version; it only changes what a following
delegate resolves to in new sessions. Child agents with an incompatible sandbox
identity remain visible but disabled, with the mismatched enabled state,
provider, snapshot, or network policy explained beside them.
Versions are resolved when a session starts
A coordinator version stays immutable when it follows a delegate. The version a followed delegate runs is decided per session:- When a root session is created, OAO resolves “latest” once for the root agent version and for every delegate it can reach, including nested delegates and their Skills. It reads them all from one consistent database snapshot.
- The result is frozen for the whole session tree. Delegated child sessions copy the root session’s resolution, so a child published while the session runs never mixes versions inside one tree.
- Follow-up runs in the session, and later turns sent to its child sessions, keep the same versions. Start a new session to pick up newer versions.
GET /sessions/{sessionId} return the record
as resolvedVersions. It lists every agent version in the tree, root first,
with the exact Skill and delegate versions each one runs. followsLatest tells
you which links were resolved from a followed agent or Skill:
resolvedVersions is null for sessions created before OAO recorded
resolutions; those sessions run their agent version’s pinned links, which is
all such a version can have. The console session view shows the same resolved
versions.
Safety checks
Publishing a coordinator returns400 bad_request when a followed delegate:
- is not a live agent of the same project, or has no published version;
- is the coordinator’s own agent;
- has a latest version whose sandbox enabled state, provider, snapshot, or network policy differs from the coordinator’s; or
- would close a cycle. OAO walks followed agents through their latest versions, and a link anywhere in the tree that follows the coordinator’s own agent counts as a cycle.
409 conflict, creates nothing, and names the agent, version, and link when:
- a followed agent was deleted or has no published version;
- a followed agent’s latest version now uses a different sandbox than its coordinator;
- a followed Skill was deleted, is disabled, has no published version, or has a deprecated or revoked latest version;
- two Skills bound to one agent version would share a name; or
- the delegates form a cycle.
Change the sandbox of a followed agent
OAO does not refuse to publish a child version that is incompatible with the coordinators that follow it. Instead, new sessions of those coordinators fail with the409 above until a compatible coordinator version is published or the
delegate is pinned.
Refusing the child’s publication would deadlock chain-wide changes. Rolling a
new sandbox snapshot through coordinator → child → grandchild changes every
agent in the chain. Whichever agent you publish first is briefly mismatched
with a neighbor, so every publication order would be refused. Failing at
session start lets the bottom-up order work, leaves running sessions
untouched, and names the fix.
To roll a sandbox change through agents that follow each other:
- Publish the deepest followed agent with the new sandbox.
- Publish each coordinator above it with the same sandbox, from the bottom up. Each publication is checked against the version you published in the step before.
- Until a coordinator is republished, new sessions that reach its changed
delegate fail clearly with
409.
Runtime flow
OAO, not Flue’s ephemeral subagent helper, owns the durable relationship. The runtime uses a separate registeredManagedAgent instance for each child
thread. PostgreSQL stores the coordinator-child relation, exact versions,
workspace binding, run sequence, idempotency hashes, and cancellation state.
The coordinator uses:
delegate_agent({ agent, prompt })to create a persistent child thread;- the returned
delegationIdto correlate later work; and message_agent({ delegationId, prompt })to create another run in that same child session after its previous run settles.
Durability and safety
- PostgreSQL is authoritative. Deterministic request keys make tool replay return the existing delegation or child run instead of duplicating work.
- Before a platform tool claim, the runtime idempotently provisions its tenant-scoped service principal. Internal broker or database failures become a generic platform-tool failure instead of exposing database details to the model or transcript.
- The platform tool claim behind
delegate_agentandmessage_agentholds a bounded lease that the runtime renews on a heartbeat for as long as the child runs, so a delegation that takes minutes still returns the child’s response in one attempt. If another worker takes the claim over, the superseded executor aborts its wait and stands down without submitting a result. - Child threads use the normal fenced admission, wake recovery, product-run deadline, and Flue retry paths.
- Cancelling or timing out a parent run cascades cancellation to its unsettled children. Operators can also cancel a delegation directly.
- Parallel calls are allowed up to the published
maxParallelvalue. Each call has a separate child thread but shares the workspace. - Raw delegation prompts are stored only as authorized child transcript/run input. Tool ledgers, product events, audit records, logs, and traces receive IDs and bounded metadata such as character counts, never the prompt text.
- RLS repeats organization and project identity across every orchestration relation. API reads and mutations require the delegation scopes documented in HTTP API.
Operator follow-up
GET /sessions/{sessionId} includes delegations. The console renders links to
the persistent child sessions. The Sessions table also places every visible
child immediately beneath its coordinator with an indented tree connector;
the child uses a compact row treatment, and both rows remain direct links to
their own isolated transcripts. Filtered or
paginated results never hide an otherwise visible child merely because its
parent is outside the current result set.
An operator can submit a later child turn with
POST /delegations/{delegationId}/messages, using a fresh idempotency key, or
cancel the relation with POST /delegations/{delegationId}/cancel.

