Advanced Tasks
Choosing the agent a task runs, its model and its settings, driving tasks over the API, and the reasoning behind the parts of the model that look strange.
Everything in Tasks works without reading this page. This one is for when you want to choose between Claude Code, Codex and Mistral Vibe, drive the whole thing from a script, or understand why a task refuses to close itself.
A task's agent is an app — today Claude Code, Codex and Mistral Vibe, each driven
through what its vendor ships for it: the official SDK for the first two, Vibe's own Agent Client
Protocol (vibe-acp) for the third. Your organization installs them under Settings → Integrations, or on
the welcome screen when it is new — it comes with none installed.
- On the project (Edit project → Agents), switch on the apps its tasks may run under. The first one is the default; Make default promotes another. Each app switched on puts its SDK in the project's image, so saving rebuilds it.
- On each task, the Harness chip of the composer — first, since everything after depends on it — picks one of the project's apps. It is fixed for the whole conversation, follow-ups included.
Each app reads its own credential from your secrets: ANTHROPIC_API_KEY for Claude Code,
OPENAI_API_KEY for Codex, MISTRAL_API_KEY for Mistral Vibe (a key from Mistral AI Studio).
The app says what can be chosen under it — its models, and its own settings:
| App | Settings |
|---|---|
| Claude Code | Effort — low, medium, high, extra high, max |
| Codex | Reasoning — low to ultra, limited to what the chosen model supports, with that model's default shown; Web search — off, cached, live |
| Mistral Vibe | Thinking — off to max, limited to what the chosen model supports (Mistral Medium 3.5, Mistral Large 4, GLM-5.3, GLM-5.3 Flash) |
Over the API, the catalog is GET /api/orgs/{orgId}/integrations/agents, and a task takes
agentAppId, model and agentOptions ({ "effort": "high" }). A setting the app does not have,
or a value the model does not take, is refused when the task is created.
The opening turn the harness receives is your prompt plus a two-line block, and the split between those two lines is the whole design:
| Line | Kind of thing | Configurable |
|---|---|---|
Spunto context: you are running in a disposable sandbox, in <cwd>, starting from <base>. — <cwd> is the project's first repository, or /workspace without one; the starting from part only when the task asked for a base branch | facts the agent can't infer from inside its sandbox | no |
| This sandbox is deleted once the task is accepted or dropped: anything worth keeping has to leave it before then (for code: commit it on a branch you name, and push it). | an opinion about what "done" means | yes — Settings → Agents & tasks, per organization |
| (nothing by default) | what only this repository needs said | yes — Agent instructions in the project's task settings, added after the organization's |
An org's instruction replaces the default rather than appending to it. Appending would leave two sentences contradicting each other the moment someone wants a different workflow — and the one they didn't write would be first.
The organization's instruction is a house rule — what "done" means has no reason to differ between two repositories of the same team. What does differ (which test suite to run, which folder not to touch) goes in the project's own Agent instructions, which is appended after the organization's rather than replacing it: a project can add to a house rule, not quietly opt out of it.
It's read when a task starts, never copied onto the task row. A running task keeps the instruction it began with — re-reading it every turn would silently rewrite the history of sessions already in flight.
Every command Spunto runs for a task — the session, accept, drop — gets these:
SPUNTO_TASK_ID SPUNTO_TASK_BASE_BRANCH SPUNTO_TASK_STATE
SPUNTO_TASK_TITLE SPUNTO_TASK_SESSION_STATUS
SPUNTO_TASK_MODEL (when resolved)There is no variable for the task's branch, because Spunto creates none: whatever branch the agent
made, read it from the checkout with git branch --show-current. (SPUNTO_TASK_BRANCH is still set
for tasks delegated before October 31, 2026, when Spunto branched for them.)
A task that carries links or metadata also gets them as JSON, in
SPUNTO_TASK_LINKS and SPUNTO_TASK_METADATA.
A follow-up gets one more, SPUNTO_TASK_SESSION_ID — the harness's own session id, which is what
makes resuming a conversation possible.
Your project's secrets are there too, resolved exactly as they are for a sandbox you open
yourself — so an accept command can be gh pr merge without you pasting a token into the project
settings.
Default model on the project and Model in the composer list the models of the harness's app. The project's default model belongs to its default harness; a task under another app starts on that app's own default. The field stays free text underneath: a model the catalog does not list yet still goes through.
A task's model is resolved once, at creation, and stays fixed for the whole conversation,
including every follow-up turn — rather than being re-read from the project on each turn. It is
also exported as SPUNTO_TASK_MODEL.
An agent session lasts minutes to hours. Without a machine-readable stream, Spunto would have exactly one fact to offer over all that time — "it's running" — with the output arriving in one block at the end. Every agent app streams its session, and Spunto reads it as it happens:
| Dialect | App | What it gives you |
|---|---|---|
claude-runner | Claude Code | The Agent SDK's messages. Interactive: the session stays alive between turns, so you can read it live, talk to it while it works, and interrupt a turn without killing it. |
codex-runner | Codex | The Codex SDK's events. Interactive, turn by turn: a message sent during a turn starts the next one. |
There is nothing to configure: the dialect comes with the app. A task's events say which one it
is read in (protocol).
What gets stored is never a harness's shape:
session.started session.title message thinking
tool.call tool.result plan usage session.ended…plus raw for anything an adapter couldn't place.
There has to be a common denominator: you cannot render Codex, Gemini CLI and a shell script of
your own through one vendor's message format. Adapters translate at the boundary, and raw
guarantees nothing is lost silently — an unknown event is itself information about the harness.
The harness's own line is kept next to every event. Normalizing without it would be a one-way
door: an adapter that maps a field wrong, or hasn't learned a new one yet, would destroy the
original on write. With it, type and payload are a projection — re-derivable from the line
that produced them. It's expensive relative to what it explains, so it's never returned unless you
ask for it (?source=true).
Which is also why there's a third option, Spunto events (JSONL): print one of those objects per line from your own harness and it renders exactly the same way.
{"type":"message","payload":{"role":"assistant","text":"Found it."}}
{"type":"tool.call","payload":{"callId":"1","name":"Edit","input":"{\"file_path\":\"src/a.ts\"}"}}
{"type":"tool.result","payload":{"callId":"1","output":"1 replacement.","isError":false}}curl -H "Authorization: Bearer spk_..." \
"https://spunto.net/api/orgs/{orgId}/projects/{projectId}/tasks/{taskId}/events?since=0"seq is dense and monotonic per task — send the highest one you have back as since and you never
re-read what you already have. Add &source=true for the harness lines.
The Session panel shows context, tokens and cost for the whole task, not for the page of events you happen to be reading. Three rules behind those numbers:
- Tokens are summed by us, over per-call events. A turn in flight hasn't produced a final result line yet — a recap that waited for one would show nothing during exactly the period someone is watching.
- A harness's own running total is never added up. In interactive mode a result line lands on every turn and repeats the whole session. Summing them would bill the first turn once per later turn.
- Money comes from the harness, never from us. Pricing a call needs a price list; a platform that invented one would be showing a number it can't defend.
The context gauge is the last call's prompt against the window the session opened with. Nothing in the stream states that window, so it's resolved from a catalog of model ids, or from the Models API when the task's secrets carry an Anthropic credential. A model neither source knows gets no percentage — a gauge against a guessed window is worse than no gauge, and the token count stays correct either way.
POST .../tasks/{taskId}/messages { prompt, files? } → 202
POST .../tasks/{taskId}/interrupt → 202Every agent app's session holds a live stdin inside the sandbox, so a message is written straight into it — no job, no resume, no restart. The session that already holds the context is the one that receives it. Interrupt sends a control request: the harness ends the current turn and stays alive, so the next message is an ordinary turn. That's the whole difference with Drop, which kills the process and fails the task.
On the non-interactive streams there's no open stdin, so a reply is only accepted while the task
is in-review — which is when it's waiting for you anyway — and it works by resuming the
harness with its session id. Spunto only knows that id because it read it off the stream, which is
why answering requires a session stream at all: the alternative would be a fresh session with no
memory of the turn it's meant to continue.
A harness that resumes differently gets a Follow-up command of its own.
Files travel both ways, all types. You attach them from the clipboard (where a screenshot lives), by dropping them anywhere on the composer, or from the paperclip at the left edge of the writing area. The agent's own files — a screenshot from a tool, a PDF it read — are pulled out of the stream and stored, with the line keeping their id in their place.
They reach the agent by path, never by payload: each file is written into
$HOME/.spunto/attachments/<task>/<id>/ in the sandbox, and the text sent to the harness gains a
line naming those paths. So a harness needs to know nothing beyond "open a file I was given the
path to" — which works for every agent, for a PNG as much as for a 4 MB CSV,
and the file is still there to be reopened later.
Limits: 10 MB per file, 10 files and 25 MB per turn, deduplicated per task on content, deleted with the task. Images are downscaled to 1568 px before upload — what the model resizes to anyway — so a retina screenshot leaves under 200 KB. Everything else goes as-is.
Every command Spunto ran for the task, with its output — the skills refresh, the agent session and its follow-ups, the accept or drop command. Each shows the exact shell that ran, where, how long it took and what it printed. Failed and still-running ones are expanded.
curl -H "Authorization: Bearer spk_..." \
https://spunto.net/api/orgs/{orgId}/projects/{projectId}/tasks/{taskId}/commandsOldest first — the order things happened in.
Spunto once let a project point a status command at its forge: a script run in the task's machine
every few seconds whose output could move a task — including all the way to done.
It's gone, and the reason is worth stating, because it looks like a feature to lose. It meant your forge could reach into your machines. Merge a pull request from your phone, and a container you were still reviewing got parked, a task you had never looked at closed itself, and the machine was handed to the next task — overwriting the working tree you had merged from. The trigger was elsewhere, the consequence was here, and nothing on screen connected the two.
So a task's state comes from what Spunto started and what you clicked, and from nothing else:
| The session | The task |
|---|---|
| is running | running |
| ended badly | failed |
| ended cleanly | in-review — and it waits |
The same reasoning is why what your forge reports is read-only, and why there's no Merge button next to it. Reading doesn't have that power; writing would.
Your forge is still where the work lands, and your accept command is still where a merge happens — the difference is that you trigger it, from the task you're looking at. If a pull request was merged elsewhere, pressing Accept is how you tell Spunto the work is over; the merge command is idempotent on an already-merged branch, or you leave it empty and Accept simply closes the task.
There's no "waiting for your input" state either. It can't be detected honestly yet, and a state that lies is worse than one that's missing.
What your forge says about the work — a pull request's state, its checks, its review — shows up in
the task's details as a block drawn by the GitHub app (or any app with the embed capability):
the pull requests shared in the conversation, wherever the agent or you pasted the link. Ask
the agent to open a pull request and give you its link, and the block follows it.
Two details already paid for on the GitHub side: check runs (Actions, any CI that's an App) and
legacy commit statuses (Buildkite, a Jenkins webhook) are two halves that have to be read together,
and only each person's latest review counts — summing all of them leaves someone who requested
changes and then approved stuck in "changes requested" forever. checks: null means this forge
doesn't report them, which is not nothing failed: a repository with no CI won't get a green tick.
# Accept command
gh pr merge "$(git branch --show-current)" --squash --delete-branch
# Drop command
gh pr close "$(git branch --show-current)" --delete-branchThese run in the task's own sandbox — restarted first if review mode had parked it — so they can touch the checkout as well as the forge, and read the branch the agent created from it: Spunto doesn't know its name. Accept requires exit code 0; a failing merge leaves the task in review.
Nothing in a task's lifecycle calls GitHub, and nothing in it runs git on your behalf either. A
repository is not a prerequisite: a project with none starts its sandbox on an empty
/workspace, the session runs there, and the whole cycle — sandbox, session, review, Accept — works
unchanged with no forge account anywhere. That's the shortest way to try delegated work. The only
thing missing is the diff, which says No git repository in /workspace, so there is no diff to
show. The agent itself still needs its credential (ANTHROPIC_API_KEY for Claude Code).
When there is a repository, the sandbox clones it on the base branch you picked (or the default one), and that's all the git Spunto does. Whether the work goes on a branch, and what it's called, is the agent's call — or your instruction's.
curl -H "Authorization: Bearer spk_..." \
https://spunto.net/api/orgs/{orgId}/projects/{projectId}/tasks/{taskId}{
"id": "k3f9x2...",
"title": "The Sign up button overflows its card on mobile",
"state": "in-review",
"branch": null,
"baseBranch": "main",
"model": "claude-opus-5",
"machineKind": "sandbox",
"sandboxId": "sbx_abc123",
"commandId": "cmd_def456",
"outcomeUrl": "https://github.com/acme/app/pull/262",
"outcomeLabel": "#262",
"links": [{ "label": "SPU-142", "url": "https://cms.example.com/items/spu-142" }],
"metadata": { "cmsItemId": "itm_8f2k1" },
"startedAt": "2026-08-30T09:14:02.000Z",
"completedAt": null
}branch is null: Spunto creates no branch for a task (a task delegated before October 31, 2026
still shows the one it was given). outcomeUrl and outcomeLabel are whatever the work produced — a pull request, a merge request, a
preview deployment. Nothing in the model is specific to one forge; the criterion for a typed column
is the product draws it, and the product draws a link and its label.
Whatever creates a task — you, a script, an automation reacting to a ticket — can say where it came from. Neither field is ever written by Spunto.
curl -X POST -H "Authorization: Bearer spk_..." -H "Content-Type: application/json" \
https://spunto.net/api/orgs/{orgId}/projects/{projectId}/tasks \
-d '{
"prompt": "…",
"links": [{ "label": "SPU-142", "url": "https://cms.example.com/items/spu-142" }],
"metadata": { "cmsItemId": "itm_8f2k1", "source": "backlog" }
}'linksare for people: shown at the top of the task's details,http(s)only, up to 10.metadatais for machines: up to 50 string pairs (keys of 1–40 characters fromA–Z a–z 0–9 _ . -, values up to 500), shown folded and never interpreted. Find a task again withGET /api/orgs/{orgId}/tasks?metadata[cmsItemId]=itm_8f2k1— archived tasks included unless you passarchived.
PATCH .../tasks/{taskId} changes both later: links is replaced as a whole, metadata is merged
key by key (null or "" removes a key).
commandId is the agent session, a command run in the task's sandbox: its output is there while it
runs and after it finishes. Because the session lives in the sandbox rather than in the API, it
survives restarts on our side entirely.
POST .../projects/{projectId}/tasks delegate { prompt, title?, baseBranch?, model?, sandboxMachineType?, fromSnapshot?, files?, links?, metadata? }
GET /api/orgs/{orgId}/tasks every task of the org (?state=&q=&projectId=&metadata[key]=&limit=&offset=)
PATCH .../tasks/{taskId} rename, replace links, merge metadata { title?, links?, metadata? }
GET .../projects/{projectId}/tasks one project's, most recently active first
GET .../tasks/{taskId} detail
GET .../tasks/{taskId}/commands what the platform ran, oldest first
GET .../tasks/{taskId}/events the session, event by event (?since=&source=)
GET .../tasks/{taskId}/diff what changed since the base, read with git in the sandbox
GET .../tasks/{taskId}/diff/patch one file's patch (?path=&repo=&oldPath=&untracked=)
GET .../tasks/{taskId}/attachments/{attachmentId} an attachment's bytes
POST .../tasks/{taskId}/messages talk to the session (202) — a done/failed task too, while its sandbox exists
POST .../tasks/{taskId}/retry start over a failed task whose session never started (202)
POST .../tasks/{taskId}/interrupt end the current turn, keep the session (202)
POST .../tasks/{taskId}/validate Accept (202)
POST .../tasks/{taskId}/cancel Drop (202)The detail carries what a client needs to offer either: canReopen (a finished task whose sandbox
still exists — a message puts it back in review and resumes the session), reopenBlocker (why
not, when it can't) and canRetry; the timeline marks a reopened task with a session.reopened
event, and the checkout is left on whatever branch the agent left it on.
Everything that does real work runs as a durable background job — task.run, task.settle,
task.validate, task.cancel. None of it dies with an API redeploy, which is why the POSTs that
act on an existing task answer 202 instead of waiting. Delegating answers straight away with the
queued task.