Delivery, Admission, and Usage
How Compozy commits Network history before in-process notification, admits bounded Live wakes, and settles truthful usage.
- Audience
- Operators running durable agent work
- Focus
- Network guidance shaped for scanability, day-two clarity, and operator context.
Compozy treats every Network envelope as external data. Valid content becomes durable conversation history first. Starting an agent turn is a separate, stricter decision.
Commit-first delivery
Rendering diagram…
One BEGIN IMMEDIATE transaction stores the conversation message, immutable recipient
dispositions, admission outcome, any admitted network_wake task run, and accounting ledger rows.
After commit, the runtime sends only an in-process scheduler notification. Restart recovery uses
the normal task_runs recovery path; Network does not own a second queue or claimer.
Wake admission
A durable message starts a model turn only when every gate passes:
- Network availability is enabled.
- The recipient's immutable participation snapshot is Live.
- The message is a
sayaddressed directly to that peer or explicitly mentions it. - The wake is not a duplicate and is not coalesced into an open wake.
- Wake depth and every resolved finite bound still permit it.
- The recipient has no conflicting in-flight wake.
Unaddressed thread traffic, capability advertisements, receipts, traces, channel membership, and
availability alone do not start model turns. The acceptance record keeps the reason when a wake is
skipped, including not_live, not_addressed, duplicate, coalesced, depth_exceeded,
budget_exhausted, or network_disabled.
Finite Live bounds
Every Live snapshot resolves all of these values:
| Bound | What it limits |
|---|---|
max_wakes | Admitted Network turns for the execution. |
max_wake_wall_time | Deadline for one Network turn. |
max_total_wall_time | Aggregate Network-turn wall time. |
max_input_tokens | Aggregate reported input tokens. |
max_output_tokens | Aggregate reported output tokens. |
max_wake_depth | Causal depth of Network-triggered turns. |
coalesce_window | Window for attaching compatible messages to one open wake. |
Zero never means unlimited. Defaults fill omitted values only after Live was explicitly selected, and administrative limits are inclusive ceilings.
Usage settlement
The wake runner settles one terminal outcome with aggregate provider usage. The ledger is idempotent: repeating a terminal settlement cannot double-charge counters.
- When the provider reports token usage, the ledger records
usage_state: "actual"and the actual input/output counts. - When it cannot report usage, the ledger records
usage_state: "usage_unavailable"and preserves the reservation instead of substituting zero.
Inspect workspace totals with:
compozy network usage --workspace checkout-api -o jsonRun detail and the Network UI project the same ledger. The release exposes usage and exhaustion; it does not claim configurable currency spend limits.
Untrusted prompt wrapper
When an admitted wake prompts a session, Compozy supplies a compact Network header with the sender, channel, conversation container, message IDs, causation, and bound evidence. Message body content remains untrusted data. It cannot override system rules, grant permissions, or expand tool access.
Agents should:
- reply through
compozy__network_sendor the audited CLI fallback - preserve the conversation container and correlation IDs
- use a new
work_idwhen moving work between a public thread and a direct room - keep raw claim tokens, credentials, and provider secrets out of messages
- use task APIs, not conversation text, for task ownership and terminal state
Audit evidence
The runtime records message acceptance, recipient decisions, wake admission or skip reason, dispatch, terminal outcome, and usage settlement with workspace and owner correlation. Conversation history and task-run state remain separate authorities.