Skip to content
Français

How Outpost runs a task

Understand resource lifetimes and what remains after a task.

The agent receives the task and returns an answer. A CLI harness starts an installed agent CLI; the built-in harness calls a model API with your tools. The sandbox runs commands. The workspace holds the files and, for Git execution, the branch.

These choices are independent. Changing the agent need not change where it runs. Changing the sandbox need not discard a workspace you own.

Entry pointWho closes it?What remains?
dispatch()Outpost closes the sandbox and workspace it creates. Borrowed workspaces remain yours.The result, captured conversations and work retained by the workspace policy.
createSandbox()You close the sandbox, preferably with await using.A borrowed workspace remains open; owned files follow the selected cleanup policy.
createWorkspace()You close every sandbox using it, then the workspace.Named Git branches, explicitly retained snapshots and published outputs follow their own retention rules.

Start with one request, reuse an environment through sandbox sessions, then choose explicit workspace ownership when files must outlive an environment. Closing a borrowed sandbox never transfers ownership to its caller.

A one-shot dispatch() owns the resources it creates. This is the lifecycle used by your first task.

Drag to move · Ctrl + scroll to zoom
100 %
  • Prepare filesOpen the workspace selected by the repository and branch policy. (Outpost)
    • → Open the sandbox : workspace ready
  • Open the sandboxAllocate the environment and prepare the agent’s access and project tools. (Outpost)
    • → Run the task : ready
  • Run the taskSend the brief, collect activity and wait for completion. (Agent)
    • → Collect the result : process complete
  • Collect the resultSynchronize remote changes and apply the selected branch policy. (Outpost)
    • → Close owned resources : finished or failed
  • Close owned resourcesRelease the sandbox and preserve work required for review or recovery. (Outpost)

A named branch remains available for review. Automatic integration applies only when the selected branch policy requests it. Dirty or detached worktrees can remain after cleanup. The returned answer is what the agent reports; your own checks decide whether the work is acceptable.

A fresh dispatch does not reuse installed dependencies or temporary sandbox files. Open a sandbox session for several agent turns and commands on the same files. await using closes it when its scope ends, including after an error.

A workspace can outlive that sandbox. Open it yourself when later steps must reuse its branch or files with another environment. Close the current sandbox before opening the next one on that workspace, and close the workspace last. A borrowed resource remains its caller’s responsibility.

One sandbox accepts one operation at a time. Parallel work needs separate sandboxes and workspaces; multiple repositories describes independent ownership across repositories.

Git execution keeps runtime data under the target repository’s .outpost, even when your scripts live elsewhere. Native agent conversations can use their own host locations. Storage explains those locations and which objects can move to a transport.

Directory and ephemeral workspaces keep their files separate from the runtime directory and need no Git repository. Working without Git covers copies, mounts and snapshots; publishing files is an explicit operation, not an effect of closing a workspace.

When a task fails, inspect retained work before retrying. A failed cleanup can leave resources to recover; a saved checkpoint or snapshot alone does not prove an abandoned process has stopped.