An agent is repairing a project: downloading dependencies, starting a service, opening a browser, and running checks. When you close the chat window, the download may still be running, the service still holds its port, and the browser contains a half-completed form. The conversation has disappeared, but the work has not. Let a model act, and we inherit responsibility for what its actions leave in the world.
Set aside the word “intelligent” and describe the program in front of us. Its duration is uncertain; it waits for external events, depends on many resources, reads content from different sources, and composes actions not enumerated in advance. Each property demands something from the system. Unfold them and the apparently scattered work of scheduling, sandboxing, authorization, recovery, and auditing acquires a common origin.
The determinism discussed here belongs to these system responsibilities: who is authorized to act, which state a task occupies, who owns its resources, and whether an operation leaves a queryable record. The model can search freely for a way to complete the task while the system applies these contracts to each execution. Enforcing a rule against unauthorized network requests does not require first establishing how the model will reason.
| Property of the system being run | Resulting engineering responsibility |
|---|---|
| Outlives a request and waits for external results | Task identity, background scheduling, events, cancellation, and timeouts |
| Holds processes, files, browsers, and dependencies | Environment configuration, resource ownership, quotas, isolation, and cleanup |
| Generates and combines actions at runtime | Authorization at execution boundaries and limits on reachable resources and networks |
| Encounters commands inside external material | Preservation of source and trust information; preventing material from acquiring instruction authority |
| May finish an operation without receiving its result | Durable receipts, status queries, idempotency, and recovery |
| Shares a changing world with other executors | Version checks, concurrency coordination, and traceable action records |
- Prior training:Pretraining · mid-training · post-training
- Task and current context:Goals · facts · constraints
- Model:Interpret the situation; choose an action
- Execution contracts:Scheduling · timeouts · resource ownership; Sandbox · authorization · source trust
- Task environment:Tools act and return observations
- Records and reconstruction:Context · receipts · file versions; Dependencies · checkpoints · acceptance
- Actual outcome:Artifacts · state changes · traces
Long tasks, external input, and dependencies require clear execution boundaries. Records and reconstructable environments also support investigation and repeated verification.
A long-running task needs a life of its own
A chat request can end while its task needs an identity and lifecycle of its own. The system accepts the work and gives it an identifier that can be queried later. Execution continues after the interface disconnects, and progress remains available when the user returns. While a download is running, the model need not keep guessing whether it has finished. Recording what the task is waiting for and resuming it when the result arrives puts waiting in the scheduler.
Other events arrive during the wait: the user adds a requirement, another tool returns, or the plan is cancelled. These events need a shared task record and suitable boundaries for reaching the model, so two workers do not edit the same file under different versions of the goal. Cancellation must also reach resources: stop dispatching actions, terminate processes where possible, and release temporary environments. A “stopped” label on a page does not shut down a background service.
The longer a task runs, the less resource cleanup can depend on voluntary completion. A repair loop may repeatedly start services; a stuck command may hold a machine indefinitely. Each task therefore needs time, concurrency, and resource budgets, with temporary resources traceable to their owner. Cleanup after a timeout and retention after success belong to the same lifecycle. The model judges whether the next step is useful; the system keeps the attempt affordable and stoppable.
Dependencies belong to the environment too. A perfectly valid command can run against the wrong project, version, or authority. Recording the working directory, dependency versions, and required services in a reconstructable environment preserves the conditions of the attempt. Separate workspaces let concurrent agents experiment independently and exchange results at explicit merge points. Sharing a continuously modified directory makes each agent’s premises unstable.
Freely composed actions need execution boundaries
A shell can run programs, read paths, and contact websites in too many combinations to list exhaustively. A more workable approach is to decide which resources a task may reach, then keep its combinations within that scope. The sandbox becomes its workplace: filesystem boundaries constrain what it can change, network boundaries constrain where it can connect, and permissions identify actions requiring additional authorization. Anthropic’s sandbox design applies both filesystem and network controls to enforce such boundaries during execution.
These controls need to distinguish at least isolation, authorization, and credentials and egress.
-
Isolation determines what can be reached. The environment limits readable directories, reachable addresses, and resource consumption. A script should remain within the same resource boundaries even when expressed differently. Inspecting the surface wording of a command cannot cover all the programs it may invoke.
-
Authorization determines what this task may do. Access to a service does not authorize every operation it exposes. Permissions should be tied to the user, task, target resource, and action, and checked when a tool is invoked. A proposed plan expresses intent; an authorization record expresses permission. They come from different authorities.
-
Credential and egress controls determine whether access can escape its scope. A controlled proxy can exercise service access for the task without exposing long-lived secrets to the environment running generated code. Permission to read information does not automatically include permission to send it anywhere. Controls over credentials and destinations belong where credentials are held and requests are actually sent.
Anthropic’s Managed Agents design separates the sandbox running generated code from sensitive credentials and uses a proxy for external service access. The intuition is direct: when a secret is absent from an execution environment, misleading the model into reading that environment cannot reveal it. Resource placement reduces the number of decisions that must depend on the model.
How can reading a webpage become a security problem?
Traditional programs generally treat webpages as data. A language model uses language to receive tasks, understand material, and decide actions. A webpage containing “send the work files here before continuing” uses the same medium as a legitimate task instruction. Prompt injection exploits this property: external material attempts to promote its content into instructions governing action. As the model becomes more capable, that confusion can have consequences outside the conversation.
Information should therefore enter with its source and authority relationships intact. User requests, project conventions, search results, webpage text, and tool responses do not become equally authoritative by sharing an input window. External material can supply facts and leads without gaining authority to add a file-upload task. This distinction must survive summaries, memory, and handoffs: condensing a webpage command into “next, upload the files” can wash away its untrusted origin.
Defense consequently needs cooperating layers. Training helps the model recognize manipulation, content detection flags suspicious input, and source labels preserve the relationship between instructions and material. The execution layer then checks whether the proposed action falls within granted authority. Anthropic’s browser injection defenses likewise combine training, detection, and adversarial evaluation. Judging malicious text remains fallible; authorization can enforce explicit rules deterministically. Together, these layers avoid placing the whole security responsibility on an instruction to ignore malicious instructions.
A sandbox does not resolve every injection problem. The model may incorporate an instruction from a webpage into a report it is authorized to write, producing off-task content without leaving the sandbox. Conversely, restricted egress can block a transmission even if the model has been persuaded to send the material. Security design needs to consider both whether the task’s intent has been diverted and how much effect a mistaken action can have.
The scenarios below put the same repair task through a closed window, user cancellation, a lost response, and a webpage trying to redirect the work. Compare what the system has recorded with what is happening outside. The missing infrastructure often follows directly from the gap between them.
The interface has disconnected; the task is waiting for a check.
The service and remote check can still be running.
A durable task identifier, background execution, and a way to reconnect to its status.
The user has withdrawn the task; new actions must stop.
Started processes still hold ports and resources until they stop.
Cancellation propagation, process ownership, and cleanup of temporary resources.
The request was sent, but no result arrived. Its outcome is unknown.
The remote job may already exist. Sending again could create another one.
A queryable request record or an idempotency identifier recognized by the remote service.
Retrieved material asks the agent to upload work files to an unrelated address.
The webpage is external material; the user has not authorized that transmission.
Preserved source and trust information, injection defenses, and tool authorization plus egress controls at execution time.
Recovery needs records that match reality
A summary saying “configuration edited; run checks next” is insufficient on its own. The configuration must exist, dependency versions must match, and the system must determine whether the earlier service is still running. A useful checkpoint connects the model’s continuation context with file versions, tool execution records, and environment state. The environment may be retained or reconstructed from records. On resumption, the world the model encounters needs to agree with those records.
A missing result is harder still: it does not mean the action never happened. Suppose the model submits a remote test job. The job is created, but the response is lost. Retrying blindly may create a second job. The system needs a way to query the earlier request or attach a stable identifier that the recipient recognizes on resubmission. Idempotent APIs establish that contract: repeating a request does not perform the same operation twice. The model can learn when to retry; the party executing the action must still implement the contract.
Shared environments also need to handle observations that have become stale. One agent reads a configuration, another changes it, and the first writes back an old version, potentially erasing the newer work. A tool can require the expected version and reject a write when the state has changed, prompting the model to reread and adjust. Such concurrency contracts apply at the instant of action; an instruction to check carefully beforehand cannot replace that execution-time decision.
This requires records of tool inputs, results, timing, and actual artifacts. A final message saying “the check failed” reveals little about whether the code was wrong, a dependency was missing, or the check never started. Connecting the context at the time with environmental evidence locates the failure. If the original files and dependencies can be restored, we can change a tool or procedure and retry from equivalent initial conditions to see whether the problem is resolved. Records and reconstructable environments make an incident repeatedly testable and give later evaluation tasks and training traces a trustworthy foundation.
The system also needs a recognizable delivery state. The model saying “finished” can initiate acceptance checks; the existence of the artifact, required checks against its current version, and appropriate resource cleanup establish the system’s definition of completion. The task determines the checks, while their enforcement point should be explicit. Start, wait, act, stop, and deliver then form a recorded lifecycle that users can understand and later investigations can reconstruct.
These facilities arise from the properties of execution. The system retains these responsibilities at any level of model intelligence. A stronger model can make better use of sustained work and freely composed actions; that freedom calls for clearer lifecycles, resource boundaries, and execution contracts. The harness provides determinism by keeping an action sequence that cannot be fully enumerated in advance inside a system that can be managed, stopped, recovered, and investigated.