Skip to content
Français

Open an interactive agent terminal

Work with the native CLI in an open sandbox.

Start from Reuse a sandbox and its configuration. Work with the native CLI in an open sandbox.

sandbox.attach() starts the agent’s own CLI in your terminal, inside the sandbox. You work with it by hand; the call resolves when you quit, with status and the commits made during the session.

import { createSandbox } from "@elie-laloum/outpost/core";
import { coder, repository, sandboxProvider } from "./outpost.config.ts";

await using sandbox = await createSandbox({
  repository,
  sandboxProvider,
  agent: coder,
});
const session = await sandbox.attach({
  brief: { text: "Walk me through the payment module." },
});
console.log(session.status, session.commits);
// Example output: 0 []

Run it from a real terminal. continuation reopens a captured conversation. The top-level attach() opens and closes its own sandbox, and applies the branch policy when the session exits with status 0.

Providerattach()
Docker, Podman, hostSupported
DaytonaSupported
Vercel, FirecrackerRejected

Attach needs a CLI agent such as Codex or Claude Code. The built-in harness, fallback agents and replay agents are rejected.