Work loops
A work loop is a managed plan, act and check cycle. Every step is recorded, tools are permission-checked before they run, and the loop ends with an outcome that says exactly what happened.
Overview
A work loop is a managed way for an actor to work towards a goal. Instead of an opaque process, the work is a sequence of records on a thread.
The actor can be an AI agent, a person using a screen, a workflow or another automation. Every turn, tool call, result and stop reason is a record on the loop's thread. You can query and audit them like any other record. There is no separate "agent log" to dig through.
A loop does more than run a task once. It reads its own track record before it acts, does the work, and is judged by someone else when it finishes. That outside judgment is the only thing that moves its standing. The next section explains each step.
loop opens on a new thread
│
├─ turn 1: core.work.turn.v1
│ ├─ tool call: core.work.tool_call.v1
│ └─ tool result: core.work.tool_result.v1
│
├─ turn 2: core.work.turn.v1
│ └─ ...
│
└─ outcome: core.work.loop_outcome.v1 ← structured terminal recordThe loop runs in one of two modes:
- Local (default for
spl work-loop "..."): the loop runs on your machine. Workspace tools can run commands and read and write files, confined to a workspace directory. - Remote (
spl work-loop ... --remote, or anyPOST /v1/work/loopcall): the loop runs in your workspace. Tools are built in (no shell), records land in your workspace, and you can watch the thread from anywhere.
Read, do, be judged
A work loop takes part in the same trust system as everyone else. It completes a full cycle:
reads its own track record ┐
▼
┌────────────────────────────────────────────┐
│ loop runs: plan → act → check → outcome │
└────────────────────────────────────────────┘
▼
an external actor judges the outcome ┘
│
▼
the verdict moves the loop's trust ──▶ next loop reads itIt reads its own track record. When a loop starts, it can see the trust the actor has earned in that area: its history of accepted and rejected work. A loop with a strong record gets a little more freedom, and one with a thin or poor record is held to a tighter line.
It does the work. The middle is the plan, act and check cycle described below. Turns, tool calls and results are all recorded.
It is judged by someone else. This keeps the loop honest. A loop's own outcome ("done, succeeded") does not earn it any trust, and a loop cannot give itself a passing grade. Trust moves only when a different actor, a person or a trusted reviewer, looks at what the loop produced and records a verdict: accept or reject, optionally with notes and an area of work. That verdict is a record, and it is what counts toward the loop actor's trust.
Then the cycle repeats: the verdict updates trust, and the next loop reads it. A loop that consistently produces accepted work earns more freedom over time. One whose outcomes are routinely rejected does not, and it can't shortcut that by grading itself.
You record a verdict with spl work-loop-review <thread> --accept (or --reject), the same way a completed task is approved or rejected at the evaluation gate. The actor doing the work and the actor judging it must be different identities for the judgment to count.
Everything is a record
The records are the truth, and the loop's state comes from the records on its thread. This gives you:
- Pause and resume. Resuming re-reads the thread and carries on.
- Shared visibility. Anyone with access to the thread sees its records.
- Syncing. A paired workspace pulling the thread gets the whole loop.
- Cancel. Cancelling is a record (
core.work.loop_cancel.v1DO). - Trust. The loop runs under a real identity (yours, when you hand work over from chat), and trust builds under that identity.
How a loop completes
The loop continues as long as the agent keeps calling tools. When the agent takes a turn with no tool calls, the work is finished and the loop closes with an outcome.
Three other paths end the loop early:
- A limit is reached: turns, tokens, time, or a cost cap in USD. The outcome names which one.
- The agent can't make progress: it needs a tool it doesn't have, the goal is ambiguous, or it needs a decision from you. The outcome is
blockedwith a structured coercion record alongside it. - A repeated-failure pattern is detected: the same tool call with the same arguments fails multiple times in a row. The loop halts with
guardrail_haltrather than thrashing.
In every case the final record says exactly what happened. The loop never reports a made-up "done."
Outcomes
Every loop ends with a core.work.loop_outcome.v1 record. The outcome field is one of eight values:
| Outcome | success | What it means |
|---|---|---|
completed | true | The agent reached a turn with no tool calls: the work is done. |
failed | false | The loop failed because of an upstream or infrastructure error, not an agent decision. |
cancelled | false | Someone explicitly cancelled the loop while it was running. |
blocked | false | The loop halted because it could not proceed. A paired core.work.coercion.v1 record carries the structured reason. |
max_turns | false | The loop hit its turn ceiling before finishing. Increase max_turns or scope the goal smaller. |
budget_exhausted | false | A token, USD, or wall-clock budget ran out. The body carries a budget_kind field naming which one. |
guardrail_halt | false | The same tool call with the same arguments failed enough times in a row that the loop was stopped to prevent thrashing. The body carries the tool name, an arguments hash, and the failure count. |
awaiting_actor | n/a | The loop is paused waiting for a decision from a person (a core.work.decision_request.v1 was raised). This is not a final outcome: the loop resumes when you respond. |
The blocked outcome is the most important one to understand: it is how a loop honestly says "I can't do this".
Coercion reasons
A blocked outcome is always paired with a core.work.coercion.v1 record whose reason field is one of:
| Reason | What happened |
|---|---|
tool_unavailable | The loop identified a tool it would need to make progress, but the tool is not in its grant. If the tool is in the actor's requestable set, the loop can ask for it through a decision request. |
ambiguous_goal | The goal has more than one reasonable interpretation. The loop surfaces the alternatives rather than picking one silently. |
precondition_failed | A goal assumed something that wasn't true, for example, "summarise the records on this thread" when the thread is empty. |
decision_required | The loop reached a fork that needs a human call. A core.work.decision_request.v1 is emitted; the loop blocks until you respond. |
input_invalid | A goal parameter could not be understood, such as an unreadable date range or a malformed reference. |
internal_error | The language model or an upstream service returned an unexpected error after the loop used up its retries. |
The coercion record carries a narrative field explaining the situation in prose, and, where relevant, a missing_tools array or a decision_request_ref. The workspace shows it as a card next to the outcome.
A loop cannot call a tool it does not have. If the language model asks for one, the call is rejected and the loop stops with a blocked record. A missing tool never turns into a made-up answer.
Limits by tier
Every actor has a tier (Trial, Paid, Team or Operator), and the tier sets what the loop can do:
| Tier | Max turns | Wall-clock | Token budget | Daily cost | Daily loops |
|---|---|---|---|---|---|
| Trial | 5 | 2 min | 20k | $0.50 | 10 |
| Paid | 16 | 10 min | 200k | $5 | 200 |
| Team | 50 | 30 min | 1M | $50 | 2000 |
| Operator | ∞ | ∞ | ∞ | ∞ | ∞ |
Requests that exceed the tier's limit are denied up front. The loop does not start, and you get a clear denial_reason (WORK_DAILY_CAP_EXCEEDED or WORK_DAILY_COUNT_EXCEEDED). Use POST /v1/work/loop/preview to size goals before sending them.
Where a loop runs
A loop runs in one of two places, decided by the tier of the member it runs for, when it starts.
- On your machine. The loop runs inside your workspace's own process. This is for the owner on their own machine, where the owner is already trusted.
- Sandboxed. The loop runs in a separate, locked-down process with no network, no view of your home directory, limits on memory, processes, file size and CPU time, and one short-lived credential. Syncropel checks every tool call it wants to make against your permission rules. This is the default for every other tier.
A sandboxed loop can reach only what Syncropel hands it: the threads it may read and write, the kinds of record it may write, and the tools its tier and definition declared. It cannot reach the provider credential, the owner's bearer token, the store, the network or another run. If a tool was granted but the sandbox can't provide it, the tool is withheld and named on the run (narrowed), never silently dropped.
The preview reports which one a start would use, and every run's outcome records which it used. The owner can change a tier's default with one config record. See The sandboxed transport.
Task budget
A loop can carry an optional task_budget: a per-loop limit on turns, tokens or USD cost, on top of the tier's daily limits. The language model can see the budget, so it can pace itself and wrap up as it runs low. When the budget is hit, the loop ends with budget_exhausted and the budget_kind field names which one.
spl work-loop "Summarise this week's dispatches" --max-turns 8Repeated-failure guardrail
If the same tool call with the same arguments keeps failing, the loop stops instead of retrying forever.
This happens in two steps:
- After a few identical failures, the next identical call is answered with a message telling the agent "this exact call has failed N times; change strategy or stop."
- If the agent keeps trying, the loop stops with
guardrail_haltand acore.work.guardrail.v1record naming the tool, the arguments hash and the count.
One-off temporary errors are not counted, only repeated identical failures.
Compensation records
Sometimes a loop breaks an assumption made about it, for example by wrapping up early as it nears its context limit. Syncropel then writes a core.work.compensation.v1 record naming what happened.
Owners can review these. GET /v1/work/compensation/review and /review/top compare each actor against the others and surface actors whose loops do this far more often than usual. This is how you notice a previously reliable actor starting to misbehave.
Compensation records are not punishment. One high count on a single goal may just mean the loop hit an unusual limit. A sustained high rate across many goals is what stands out.
Chat-actor delegation: @agent
A conversation with the chief of staff is single-shot by default: you ask, it answers. A turn that needs tools becomes a loop automatically, and you can also start a governed run with spl run.
When work is handed over:
- The loop runs as you, not as the chief. It uses your identity, permissions and tier, and the chief steps aside. Every record it writes is signed with your identity.
- The chief's reply and the loop's outcome are paired. A
core.work.delegation.v1record opens the handoff, and the loop's outcome closes it.
The chief guesses when to start a loop from the wording of your message (verbs like "build", "audit", "find every…"). To be explicit, start your message with @agent.
See Agents for what the launch screen shows, what the capability is, and what the outcomes mean.
How to start a loop
Three ways to start a loop:
# CLI: run on your machine
spl work-loop "Summarise this week's dispatches"
# CLI: run in your workspace with a task budget
spl work-loop "..." --remote --max-turns 8
# HTTP API
curl -X POST http://localhost:9100/v1/work/loop \
-H "Authorization: Bearer $SPL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"goal": "...", "max_turns": 8}'
# Chat: @agent delegation
# (type into any assistant thread)
@agent audit my last 7 days of dispatches and write a summarySee the CLI reference and API reference for full surface, and the body-kinds reference for the records the loop emits.
What's next
- Agents: how AI agents run loops, including
@agentand what the outcomes mean. - The chief of staff is the default conversational assistant; a turn that needs tools escalates to a loop.
- Actors: the identities records and loops are attributed to.
- Threads: where a loop's records live.
- Trust: how a loop's records feed trust.
Helpers
A helper is an automated participant that does one kind of work well: a solver, a classifier, a checker. It need not be a language model, but it is still an actor with an identity, a trust record and an audit trail.
Trust
What trust means in a workspace. A standing earned from reviewed work, scoped to an area of work, that grows with good outcomes, fades when unused, and decides how much a member is allowed to do on their own.