Personal Agent Sandbox
When enabled for your account, Agent Sandbox gives you a personal, isolated coding container right inside OpenCloud Agent. It runs the unmodified official claude (Claude Code), codex (Codex), and agy (Antigravity) CLIs alongside the pinned opencloud CLI and a side-by-side live app preview.
Open Agent Sandbox from the left sidebar in Agent.
Sign-in and credential boundary
Your coding-agent subscriptions stay completely inside your own sandbox:
- Click Claude Code, Codex, or Antigravity in the header to sign in directly through that CLI's own login flow (for example, Anthropic OAuth, OpenAI device login, or Google sign-in).
- Provider credentials are saved only inside your personal
/home/agentvolume. OpenCloud never extracts, reads, logs, brokers, or stores your provider sign-ins in its central vault, and sandbox volumes are excluded from off-site backups. - Each running sandbox automatically receives a short-lived, revocable
opencloudaccount login (mode0600, rotated while active, and revoked automatically on stop, reset, sign-out, or access removal). Runopencloud whoamiin Shell to confirm the active account; do not runopencloud logininside the sandbox. - Just like on a local workstation, the account login can list, create, and pull apps and connect folders, while app-scoped commands (
opencloud logs,opencloud app dev,opencloud app verify,opencloud deploy) require running inside a folder connected withopencloud app connect "$APP_ID".
Chat, Terminal, and Live preview
- Claude Code opens in structured Chat mode by default (with model and mode pickers, native session history, inline tool progress, explicit permission approvals, and a collapsible bottom Terminal drawer). Use Open TUI (when no turn is running) to switch to the raw interactive terminal UI.
- Codex and Antigravity open in full interactive Terminal mode by default so you interact directly with each official CLI.
- Shell opens a bash shell in
/workspacewith the pinnedopencloudCLI ready onPATH. - Preview renders any of your deployed apps in a sandboxed cross-origin frame with Desktop, Tablet, Mobile, Reload, and Open-in-new-tab controls. On narrow viewports, Preview starts closed and switches cleanly with Chat and Terminal without overlapping panes.
Lifecycle, persistence, and storage
Your files in /workspace and CLI sign-ins/configuration in /home/agent live on private persistent volumes attached only to your sandbox:
- Sleep stops and removes the container while keeping
/workspaceand/home/agentintact. After clicking Sleep, reloading that tab keeps the sandbox asleep until you click Start or Start sandbox (or open a Fix in Sandbox link). - Sandboxes also sleep automatically after 15 minutes with no attached browser terminal or active turn, or when they reach the 4-hour container lifetime limit. Your volumes remain preserved.
- Controls → Restart container boots a fresh container while preserving all files and provider sign-ins.
- Controls → Factory reset permanently deletes every file in
/workspaceand/home/agent, including configuration and saved provider sign-ins. Sandbox volumes are not included in off-site backups and cannot be recovered. OpenCloud CLI access is provisioned again automatically the next time you start the sandbox. - A 2 GiB combined storage quota across
/home/agentand/workspace(shown in the header badge) protects shared hosts: if usage exceeds the limit or cannot be measured, new structured chat turns pause while Shell stays open so you can remove large files or build caches. On hosts configured with hard XFS project quotas, writes past the limit also fail at the filesystem layer.
Fix in Sandbox
When an app raises an alert in its Agent thread (for example, when automatic repairs are turned off or a failure needs human investigation), the alert card offers Fix in Sandbox alongside Fix it.
Fix in Sandbox is always opened manually by a person—never run unattended on consumer subscriptions.
Opening it launches your sandbox with a read-only incident brief showing the alert summary, status, and one-click actions:
Load into chat places a sanitized repair prompt into the chat composer for your review without sending it automatically.
Copy repair prompt copies the fenced prompt (isolating untrusted alert text inside
BEGIN/END UNTRUSTED ALERT DATAmarkers) for pasting into Claude Code, Codex, or Antigravity.Copy CLI command copies the workspace pull, connect, and log inspection command:
bashopencloud pull ./<app-slug> --app "$APP_ID" && cd ./<app-slug> && opencloud app connect "$APP_ID" && opencloud logs "$APP_ID"
Test your fix in an isolated development session (
opencloud app dev start .andopencloud app dev verify .), promote when ready (opencloud app dev promote .), and runopencloud app verify "$APP_ID"from that connected folder.Click Verify & resolve alert in the brief. OpenCloud checks the control plane's
app_verificationsrecord on the current active deployment after the alert was last observed and marks the alert Resolved only when a passing live verification exists.
