Skip to content

Your first session

From the UI, or:

Terminal window
curl -X POST http://localhost:3000/api/v1/sessions \
-H "X-API-Key: $YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_root": "general-agent",
"prompt": "Add a health check endpoint at /healthz that returns 200 OK.",
"goal": "open-reviewed-green-pr"
}'

What you get back is a session in waiting, with an AgentSessionJob enqueued.

Within a minute or so it should flip to running. If it doesn’t, treat that as a symptom and see Expected timings below.

While it runs you’ll see the timeline stream in over Turbo: user messages, assistant messages, thinking blocks, tool calls, tool results, subagent accordions. That’s the transcript pipeline doing its job.

The session pauses to needs_input when the agent’s turn ends. Send a follow-up:

Terminal window
curl -X POST http://localhost:3000/api/v1/sessions/$ID/follow_up \
-H "X-API-Key: $YOUR_KEY" \
-d '{"prompt": "Also add a test for it."}'

Three things can happen, and the status code tells you which:

Session stateResultStatus
needs_input or waitingdelivered immediately, session resumes200
runningqueued as an EnqueuedMessage, delivered when the turn ends202
running + force_immediate: truethe process is interrupted and the message delivered now200

The 202 case is the one that surprises people. A follow-up to a running session lines up behind the current turn instead of interrupting it. Pass force_immediate if you mean “stop what you’re doing.”

The needs_input list is your to-do list. That’s the design intent — sessions sitting there are waiting on you, and agents are instructed not to archive themselves out of it while you still need to read something.

A session showing “blocked on elicitation” is different: the agent process is still alive, and an MCP server is waiting for you to answer a question. See Elicitation.

If something takes materially longer than this, the problem is probably the system:

OperationExpected
Session waiting → running~1 minute
GitHub Actions CI (for the agent’s PR)5–10 minutes
Stuck-session auto-recovery~15 minutes
Catalog refresh (worker)every 15 minutes
Catalog refresh (web)every 5 minutes

The session went to failed because one of its MCP servers needs OAuth and has no valid credential. The UI will show Authorize buttons. Click through the flow and the session resumes automatically, replaying the original prompt. See MCP server OAuth.

ActionWhat it does
Pauserunning → needs_input
SleepGo dormant; a one-time trigger will wake you
RestartRe-run from the start; falls back to restart-from-scratch if there’s no clone
ForkBranch a new session from a specific message index
RefreshRe-read the transcript from disk (never shortens the stored one)
HeartbeatAuto-nudge this session every N seconds while it’s in needs_input
ArchiveMove to trash; the clone is reaped after an undo window