A writable host socket is accidentally mounted.
Detect: Launch-policy validation identifies a privileged socket or forbidden mount.
Recover: Reject the sandbox specification and correct the launcher policy before execution.
Constrain agent-executed code and tools through independent process, filesystem, network, credential, and resource boundaries.
Sandboxing limits what an untrusted or compromised execution can affect. For agents, the risk includes generated code, third-party tools, retrieved instructions, and ordinary mistakes. Capability isolation grants only the particular files, endpoints, operations, and resources required for the current task.
A prompt telling the model to behave safely is not an isolation boundary. Enforcement belongs below the model in operating-system controls, container or virtual-machine boundaries, network policy, scoped service adapters, and credential brokers. The appropriate isolation strength depends on the trust level and the consequences of a boundary escape.
A proof of concept may run generated analysis in a disposable environment using synthetic files and no ambient production credentials.
Production requires explicit mounts, outbound network policy, nonprivileged execution, resource limits, ephemeral credentials, and validated artifact export paths.
Enterprise scale adds workload classes with different isolation strength, tenant placement policy, sandbox lifecycle controls, patching, escape testing, and capacity accounting.
Declares permitted inputs, outputs, endpoints, operations, and resource budgets for one execution.
Creates an isolated process environment with constrained privileges and a disposable filesystem.
Issues short-lived operation-scoped credentials without exposing broad secrets to generated code.
Enforces approved destinations, methods, resource scope, and request limits.
Inspects outputs before copying accepted artifacts into trusted storage or presenting them to users.
flowchart LR
T["Authorized task"] --> M["Capability manifest"]
M --> L["Sandbox launcher"]
L --> S["Untrusted execution"]
S --> G["Network and tool gateway"]
G --> A["Allowed service operations"]
S --> V["Artifact verification"]
V --> O["Trusted output store"]
S --> D["Revoke and destroy"]Determine whether the task runs trusted adapters, generated code, or third-party binaries and choose a suitable isolation boundary.
Translate authorized intent into concrete mounts, endpoints, operations, and limits; deny unspecified access by default.
Create a fresh sandbox without host secrets, privileged sockets, or inherited writable project directories unless explicitly required.
Run the task with CPU, memory, time, process, and network limits enforced outside model control.
Check paths, file types, size, and expected content before promoting outputs into the trusted workspace.
Revoke credentials, terminate descendants, remove temporary state, and record resource usage and policy violations.
Professional services · Illustrative enterprise scenario, not a reported customer outcome.
Illustrative architecture: A delivery team asks an agent to run generated data-cleaning code on client-provided spreadsheets.
The code may read unintended host files or transmit client data if it inherits broad filesystem and network access.
Permit analysis of approved inputs and export of reviewed results while isolating client data and execution resources.
Each job receives read-only input mounts, a private scratch directory, no default network access, and a controlled artifact export service.
A script tries to access a host credential path; filesystem isolation denies it and the job returns an explicit blocked-access result.
Measure completed authorized analyses, blocked boundary violations, cleanup success, resource consumption, and artifact validation failures without claiming isolation is infallible.
| Decision | Benefit | Cost |
|---|---|---|
| Stronger execution isolation | Reduces the reachable host and cross-tenant surface. | Adds startup latency, operational overhead, and possibly lower utilization. |
| Default-deny network access | Limits exfiltration and uncontrolled dependencies. | Tasks needing external data require explicit approved adapters. |
| Disposable environments | Reduce state leakage between tasks. | Repeated setup can increase latency and package-cache complexity. |
Detect: Launch-policy validation identifies a privileged socket or forbidden mount.
Recover: Reject the sandbox specification and correct the launcher policy before execution.
Detect: Lifecycle accounting detects descendants or resource usage after job completion.
Recover: Terminate the entire workload boundary and verify credential revocation and storage cleanup.
Choose isolation based on threat model and verify host, kernel, and runtime exposure.
Use a broker or adapter that enforces narrow operations and short lifetimes.
Validate paths, sizes, types, and content at a separate export boundary.