Set deadlines and cancel work
Bound agent execution time, control repeated passes and cancel from your code.
Set task deadlines
Section titled “Set task deadlines”Set deadlines alongside the brief when a task needs tighter limits than the defaults. You can bound the whole agent turn and the time it may remain silent.
If the agent runs longer than 20 minutes, or stays silent for 5, the promise rejects with an OutpostError of code timeout. The sandbox is released; the branch keeps what the agent committed.
Choose a limit
Section titled “Choose a limit”API reference: DispatchOptions.
Your observe callback receives a stopped event whose reason says which one ended the process: deadline, idle-timeout, completion or aborted.
Cancel from your code
Section titled “Cancel from your code”Pass an AbortSignal. Here, Ctrl+C stops the agent instead of leaving it running in the sandbox.
The promise rejects with the value passed to abort(), here "cancelled by user". AbortSignal.timeout(ms) works the same way for a deadline that spans every pass.
| After a stop | dispatch() | sandbox.dispatch() in a session |
|---|---|---|
| Agent process | Its process group and descendants terminated | Same |
| Sandbox | Released | Still running, ready for the next dispatch |
| Worktree, branch | Kept; recoveryDetails(error) gives both | Kept |
To change the agent’s direction without stopping it, steer it instead.
Repeat the brief until the agent declares it done
Section titled “Repeat the brief until the agent declares it done”passes sends the brief again when a pass ends without a completion marker. Ask for the marker in the brief: Outpost does not add it.
Each pass starts a new conversation on the same branch, so it sees the previous commits. Outpost stops at the first pass whose answer contains a marker. until also accepts a list; until: [] disables matching and runs every pass.
API reference: DispatchResult.
If the agent writes its marker but keeps running, Outpost stops it settleMs after its last output. The result is kept and warn receives a message.
Set Git and file operation deadlines
Section titled “Set Git and file operation deadlines”limits sets deadlines on the Git and file steps around the agent. Pass it to dispatch(), createWorkspace() or createSandbox().
API reference: StageLimits.
Other limits
Section titled “Other limits”- BudgetsToken and attempt ceilings shared by the tasks of a workflow.
- Concurrency, retries and timeouts
timeoutMsfor each task attempt and for a whole run. - Built-in harness
limitson steps, tool calls and usage of one agent loop. - Sandbox sessions
deadlineMsandsignalon a single command. - Write a brief
expansionMsbounds the shell commands of a file brief. - Steering a running agentChange direction without cancelling.
Limits
Section titled “Limits”- Every duration must be a positive number:
0does not disable a limit. passesabove 1 cannot be combined withresponseorcontinuation.- Stopping an agent does not roll anything back. Commits and files it already wrote stay on the branch.
API: dispatch · DispatchOptions · DispatchResult · StageLimits · recoveryDetails · AgentObservation.