Chapter 3 of 15

Chapter 3 of 15

Chapter 3: Agent Isolation

Outline

3.1 Introduction to Agent Isolation

  • Isolation as authority containment, not only sandboxing
  • Role, lifetime, and scope as the first controls
  • Why substrate-only thinking is insufficient

3.2 Threat Model for Agent Environments

  • Untrusted content steering trusted tools
  • Over-broad inheritance of context, workspace, and credentials
  • Stale ownership, duplicate activity, and false status
  • Unreviewed egress, disclosure, and durable-state contamination
  • What isolation must preserve when work goes wrong

3.3 Isolation Architecture Patterns

  • 3.3.1 Coordinator and worker separation
  • 3.3.2 Tool-scoped execution surfaces
  • 3.3.3 Background and periodic isolation
  • 3.3.4 Specialist runtimes and coding agents
  • 3.3.5 Choosing isolation strength by consequence

3.4 The OpenClaw Isolation Framework

  • 3.4.1 Isolation begins with role, lifetime, and scope
  • 3.4.2 Workspace, filesystem, and state boundaries
  • 3.4.3 Network and egress boundaries
  • 3.4.4 Approval and escalation boundaries
  • 3.4.5 Evidence, freshness, and recovery

3.5 Tool Isolation and Capability Boundaries

  • 3.5.1 Per-tool sandboxing with distinct security contexts
  • 3.5.2 The principle of least capability: dynamic permission grants
  • 3.5.3 Inter-tool communication controls and data flow policies
  • 3.5.4 Preventing confused deputy attacks in multi-tool chains

3.6 State Management and Persistence

  • Partitioned memory and durable-state boundaries
  • Checkpointing and migration without authority bleed
  • Audit evidence that explains decisions without oversharing
  • Retention and garbage collection for sensitive temporary data

3.7 Observability Without Compromise

  • Structured tracing across role and tool boundaries
  • Privacy-aware monitoring and metrics
  • Operator access controls and break-glass discipline

3.8 Performance Optimization

  • Reusing clean runtimes without preserving tenant residue
  • Density optimizations and shared-memory risk
  • Accelerators and other privileged execution surfaces
  • Spending isolation budget where blast radius is real

3.9 Case Study: Containing a Compromised Background Worker

  • 3.9.1 Requirements: drafting, repository access, and outbound messaging
  • 3.9.2 Isolation topology: coordinator, coding runtime, and approval gate
  • 3.9.3 Incident response: revoke egress, preserve evidence, and respawn narrowly

3.10 Future Directions

  • 3.10.1 Formal verification of isolation properties
  • 3.10.2 Confidential computing for agent model weights
  • 3.10.3 Standardization efforts and interoperability challenges

3.11 Chapter Summary

  • Key takeaways for practitioners
  • Checklist: evaluating isolation in agent deployments

3.1 Introduction to Agent Isolation

3.1.1 Isolation protects authority, not only code execution

Agent isolation in OpenClaw begins with a simpler claim than “run everything in a harder sandbox”: the dangerous thing is not merely code executing, but authority moving too easily. A model reply, retrieved web page, background worker, or coding runtime becomes risky when it can inherit context, tools, or destinations that exceed the narrow job it is supposed to perform. Isolation is therefore the discipline of ensuring that useful work remains inside a bounded lane even when the model is wrong, the input is hostile, or the runtime grows stale.

Generated code and shell commands are obvious examples, but the same logic applies to less dramatic actions. A drafting worker that can also message external recipients, a browser session that can feed attacker-controlled text directly into an outbound send, or a background task that keeps acting after ownership changed are all isolation failures. They are failures of authority containment, not just operating-system hardening.

3.1.2 Agent work crosses runtime, tool, and time boundaries

OpenClaw is a multi-boundary system. Requests arrive through channels and APIs. The control plane decides whether work stays inline, moves to a subagent, becomes a cron or heartbeat task, or enters a specialist coding runtime. Tools then cross their own boundaries into files, shell, browsers, messages, providers, and devices. Some work ends immediately. Some persists and resumes later.

That means isolation must answer more than “what process is this?” It must answer: Which role owns this work? What state may survive? Which tool surfaces may be touched? Which actions require a fresh approval or destination check? How will later operators know whether the worker that acted was still the right one to act? A chapter that only inventories kernels and sandboxes misses the real OpenClaw problem: authority moves across roles, tools, and time.

3.1.3 Why substrate-only thinking falls short

Strong substrates still matter. Containers, sandboxes, browser isolation, and VM boundaries reduce the cost of mistakes and raise the bar for direct compromise. But substrate strength is only one layer. A perfectly confined runtime can still disclose sensitive material if it is allowed to call the wrong tool, send to the wrong destination, or persist the wrong state. Likewise, a tool policy can be carefully written and still fail if stale background workers keep acting from obsolete assumptions.

For OpenClaw, the right question is not “which isolation primitive wins?” It is “which combination of runtime boundary, tool grant, approval semantics, and durable evidence keeps this class of work legible and recoverable?” That is why this chapter emphasizes role separation, scoped capabilities, provenance-aware tool chaining, and freshness checks alongside substrate choices. Isolation is a system property, not a box you tick by adopting one sandbox technology.


3.2 Threat Model for Agent Environments

3.2.1 Untrusted content becoming trusted action

The most common agent security failure is not exotic escape code. It is attacker-controlled or simply low-trust content influencing a higher-trust action. A retrieved page, email, repository comment, or model suggestion becomes dangerous when the runtime treats it as permission instead of input. The isolation problem is to keep untrusted content from silently minting broader authority in downstream tools.

3.2.2 Over-broad inheritance of context, workspace, and credentials

Workers often become unsafe because they inherit too much. A delegated session may receive the entire transcript when it only needed a task brief. A coding runtime may hold more of the repository than the change requires. A tool surface may reuse broad credentials because they are convenient. These are design shortcuts that convert helpful delegation into ambient authority. Isolation should narrow what is inherited at spawn time and re-evaluate new requests when the task widens.

3.2.3 Stale ownership, duplicate activity, and false status

OpenClaw also has time-based threats. Background jobs, cron workers, and long-lived coding sessions can act on assumptions that were true when spawned but false now. Worse, more than one runtime can appear to own the same route or task. That leads to duplicate actions, conflicting outputs, and optimistic summaries that no longer match reality. Isolation therefore has to preserve freshness: the system must know whether a worker is still the current authority rather than merely a still-running process.

3.2.4 Unreviewed egress and disclosure

The highest-impact failures often happen at egress. A runtime that was meant to read, compare, or draft suddenly messages a recipient, mutates an external system, posts to a provider, or deploys a change without a clear approval boundary. In a platform with many tools, disclosure and side effects are easier to cause than direct host compromise. Isolation must therefore keep outbound channels, destructive actions, and privileged APIs behind explicit gates with destination-aware policy and truthful delivery records.

3.2.5 Shared-state contamination and audit loss

Finally, isolation fails when durable state becomes a dumping ground for speculative or stale output. If any worker can rewrite task ownership, approval facts, or chapter state as casually as it writes a scratch file, then the persistence layer quietly reintroduces ambient authority. Audit is the other casualty: investigators can no longer tell which worker proposed an action, which one executed it, and whether the state they are reading reflects verified truth or leftover convenience. A useful threat model therefore ends with a positive requirement: isolation must preserve narrow authority, fresh ownership, provenance, and recoverable evidence even when work goes wrong.


3.3 Isolation Architecture Patterns

Isolation in OpenClaw is not one technology choice. It is a layering decision about which runtime holds context, which tool surface holds authority, and how much blast radius the system is willing to tolerate for a given task. The most important question is rarely “container or VM?” It is usually “does this unit of work really need the authority it is about to inherit?”

A useful mental model is to start with the smallest safe lane and escalate only when the task genuinely demands it. Fast conversational synthesis, bounded research, deep coding work, browser-heavy inspection, and high-consequence egress do not belong in the same authority bucket. Treating them as interchangeable may look efficient for a while, but it is exactly how prompt injections, stale context, and unintended side effects become operational incidents.

3.3.1 Coordinator and worker separation

The first isolation boundary is architectural, not kernel-level: separate the coordinating session from the worker that performs risky or long-running work. In OpenClaw, the main session usually owns user intent, approval context, and final synthesis. That does not mean it should personally execute every tool-heavy action. When a task becomes iterative, backgrounded, coding-intensive, or likely to ingest untrusted content, the safer design is to hand the work to a narrower runtime.

This separation limits accidental inheritance. The worker does not need the entire conversational history, every unresolved approval, or every adjacent tool grant the coordinator may hold. It needs a scoped objective, the relevant files or excerpts, the expected output format, and any explicit constraints. The coordinator keeps the wider human relationship while the worker stays inside a bounded lane.

3.3.2 Tool-scoped execution surfaces

A second pattern is to isolate tool surfaces even when they are invoked from the same session. Reading local files, editing workspace content, browsing remote pages, running shell commands, and sending messages are not just different APIs. They are different consequence classes.

The security mistake is to treat “the agent can use tools” as a single permission. OpenClaw is safer when each tool call is understood as a separate boundary crossing with its own scope, policy, audit trail, and expiry semantics. A browser fetch should not quietly inherit messaging authority. A file-editing pass should not imply shell execution. An exec command that can mutate the filesystem should not automatically inherit unrestricted network egress.

This is why tool capability boundaries matter even when process isolation is modest. A well-governed tool boundary often prevents real-world abuse more effectively than a stronger sandbox wrapped around a flat authority model.

3.3.3 Background and periodic isolation

Isolation also has a time dimension. Cron jobs, heartbeats, and background tasks should not behave like immortal extensions of the live conversation. They wake later, under changed circumstances, and often with weaker situational awareness than the interactive coordinator had when they were created.

For that reason, periodic and deferred work should carry a narrower mandate: check a condition, advance a specific workstream, validate liveness, refresh an artifact, or surface a blocker. They should re-check ownership, state freshness, artifact version, and approval conditions rather than assuming that earlier intent still authorizes current action. Many agent failures that look like “automation mistakes” are really failures to isolate old assumptions from new reality.

3.3.4 Specialist runtimes and coding agents

Some tasks genuinely need a broader working surface for a limited period. Coding agents may need repository access, iterative test runs, patch generation, and sustained local context. Browser-heavy or document-heavy work may need its own runtime because it ingests attacker-controlled content while performing long chains of inspection.

The safe response is not to avoid specialist runtimes. It is to make them legible. A specialist runtime should be created for a named objective, within a known workspace or thread, and with a clear review path for anything consequential that emerges from its work. It may be more powerful inside its lane than a normal worker, but it should not quietly become a general-purpose operator with ambient authority far beyond the task that justified its existence.

3.3.5 Choosing isolation strength by consequence

OpenClaw benefits from choosing isolation strength by blast radius, not by habit.

PatternBest fitSecurity benefitMain caution
Coordinator sessioninterpretation, synthesis, low-risk local readspreserves the human relationship and approval contextshould not silently turn context into broad side effects
Isolated workerresearch, drafting, bounded analysis, periodic maintenancenarrows inherited context and limits lifetimecan act on stale assumptions if durable state is weak
Specialist runtimecoding, browser-heavy inspection, tool-dense iterationkeeps risky or expansive work out of the coordinator lanemay accumulate too much workspace or tool power if review is vague
Strong OS/VM or browser sandboxuntrusted execution, hostile content, or external automationreduces escape and contamination riskdoes not replace approval policy or destination scoping

The pattern across these choices is simple: separate roles first, then strengthen the substrate where the consequence justifies it. Runtime isolation without tool discipline is incomplete. Tool discipline without role separation still leaks authority through context.


3.4 The OpenClaw Isolation Framework

OpenClaw’s isolation framework is best understood as a stack of boundaries around work: role and lifetime, workspace and state, tool grants, approval semantics, and durable evidence. The goal is not to make every task maximally constrained. The goal is to ensure that a compromise, misfire, or prompt injection stays contained inside the narrowest practical lane and leaves enough evidence for honest recovery.

OpenClaw runtime isolation is a five-step control story: policy chooses one worker lane, each call crosses one narrow boundary, outcome truth splits into durable record or live review, and any resume path re-enters with reduced authority until freshness is proved again.

Policy first defines a fresh decision window: scope, lifetime, destination class, and review requirements are chosen now rather than inherited from yesterday's grant. A worker then occupies one lane at a time; main session, isolated worker, and specialist runtime are alternatives, not cumulative privileges. The same exclusivity applies at per-call granularity, so files, browser, exec, and message/API egress remain separate gates rather than adjacent permissions that smear together. Outcome truth must split: a call either stops at durable record truth or moves to live review before any external side effect, and those two proofs should not be laundered into one success state. Recovery returns only to a new policy decision after freshness proof. Records, checkpoints, and prior approval text may rebuild context, but they do not restore owner freshness, review freshness, recipient validity, or spendable grant authority. That order makes the security claim visible at book scale instead of leaving it buried in later sections.

3.4.1 Isolation begins with role, lifetime, and scope

The runtime’s first question should be: what kind of worker is this? A main conversational session, a short-lived isolated subagent, a cron worker, a heartbeat task, and a thread-bound coding runtime have different security expectations even before any tool is called. Some should inherit broad conversational context; others should begin nearly empty. Some should exist for one answer; others may persist across an editing cycle. Some should return a draft; others may be allowed to propose a verified patch.

This is why isolation-by-default matters. A worker that does not need the parent transcript should not receive it. A worker that only needs a narrow file set should not begin with the whole workspace conceptually available. A runtime created for deep coding work may justifiably receive longer-lived thread context, but that is a deliberate tradeoff rather than an invisible convenience. In OpenClaw, containment begins before the first command or tool grant. It begins with how a unit of work is spawned.

3.4.2 Workspace, filesystem, and state boundaries

The next layer is the distinction between scratch space, working artifacts, and operational truth. Scratch space exists so a worker can think and stage intermediate output. Working artifacts include draft chapters, diffs, figure scripts, rendered review assets, and similar task products. Operational truth is different: task ownership, approvals, chapter state, review decisions, health, and other facts the broader system relies on.

Conflating these categories is dangerous. If every worker can freely rewrite the system’s source of truth, then stale or speculative output becomes governance data. OpenClaw is safer when local files are scoped to the task at hand, destructive writes are explicit, and durable shared truth lives in structures designed for concurrency and audit. Even when the runtime must temporarily fall back to local files, it should label that fallback clearly instead of pretending the boundary does not exist.

3.4.3 Network and egress boundaries

Isolation is incomplete if all runtimes share the same outbound reach. Untrusted web content, shell execution, messaging, external APIs, and node/device control should be treated as separate egress classes with different policy expectations. The fact that a worker is useful does not mean it should be able to contact arbitrary destinations or send irreversible outputs.

OpenClaw’s strongest pattern is policy-before-egress. Determine the destination, normalize its stable identifier, verify the current route owner, confirm that the destination evidence is fresh, attach the relevant scope and approval requirements, and only then allow the boundary crossing. This prevents a common confused-deputy failure mode: content gathered in one context quietly borrowing authority from another. A browser session may inspect a page; that does not mean it can message the page contents to a third party. A coding worker may prepare a patch; that does not mean it may deploy it.

3.4.4 Approval and escalation boundaries

High-consequence actions deserve an explicit escalation boundary even when the surrounding interface is imperfect. In practice, approval buttons fail, threads drift, delivery states lag, and background work may need to resume after an interruption. The control that matters is not the button itself but the approval semantics: who approved what, for which target, under which context, and before which side effect.

That is why OpenClaw should separate analysis, recommendation, and execution. A worker may prepare an asset, propose a command, or draft a message. Crossing into external send, elevated execution, destructive change, or other irreversible action should require a fresh and legible gate. Plain-text keeper tokens, explicit natural-language approvals, and durable status records are all preferable to a polished but unverifiable “approved” state, provided the token remains bound to the exact artifact version, target, intended side effect, and review moment it was meant to authorize, and is rejected after artifact drift rather than copied forward as a generic yes. For review assets, the same rule means a keeper token approves the named rendered file and caption, not later regenerations, sibling variants, or a diagram script that happens to share the same short label. The caption is part of the binding evidence: if the caption is rewritten to imply a broader claim, the old keep should preserve the artifact as evidence rather than authorize the new assertion. Natural-language approval should be treated the same way: it can substitute for a failed button only when the text clearly points to the same artifact, caption, and review moment. A failed approval control is an interface failure, not an evidence failure; the boundary should preserve the plain-text acceptance exactly and bind it to the artifact record instead of inventing a cleaner synthetic approval. If the named review artifact cannot be found, the plain-text token should remain as intent evidence but should not approve a replacement file until the replacement is shown under its own review label. If the same token appears in a later transcript without its original channel, sender, and review timestamp, it should be treated as forwarded evidence until the durable review record rebinds those fields.

3.4.5 Evidence, freshness, and recovery

The last layer is what makes containment believable after something goes wrong: durable evidence. Isolation is not only about stopping the first bad action. It is also about making later reconstruction possible. The system should be able to explain which worker held the task, what files or tools it touched, what approval state applied, which artifact version it produced, and whether the worker was still fresh when it acted.

The recovery question is therefore two-part: what work survives, and what authority must be re-proved before the next action? Checkpoints, logs, and preserved review text are valuable only if the system keeps those questions separate. Evidence may rebuild context, but it must not silently re-issue permission, route ownership, destination authority, or expired tool grants.

Freshness matters because stale ownership is itself a security risk, and because a once-valid route binding, destination, or approval target can become stale independently of the worker. A background worker that still exists is not automatically the right worker to keep acting. If liveness, ownership, or approval state becomes uncertain, the safe move is to stop, surface the blocker, and recover from recorded truth. In a well-designed OpenClaw deployment, recovery often means discarding the worker, respawning a narrower one, and continuing from durable state rather than trusting whatever ambient context happened to survive.


3.5 Tool Isolation and Capability Boundaries

Tool isolation is where the abstract principle of least privilege becomes a concrete runtime contract. In OpenClaw, an agent does not hold a flat permission such as “can use tools.” It must request a specific operation against a specific tool surface, and that request is mediated before execution. The important unit is not the worker in aggregate but the call in context: which current worker is asking, which artifact or destination is in play, what side effect is being attempted, what approval state and policy epoch exist, and when that grant expires. The result is not general authority but a narrow, revocable grant that can be explained after the fact, named in the receipt, cancelled before execution if the policy epoch changes, and cannot be widened by a downstream tool simply because the payload is already in motion or replayed after the recipient binding has drifted. This framing also keeps review tokens honest: an approval attached to one artifact or tool call is evidence for that bounded act, not a portable capability another tool can spend later.

Tool capability boundaries translate least privilege into concrete runtime controls: each tool call crosses a policy gate, receives an artifact- and destination-bound scoped grant, and executes under tool-specific boundary controls with audit and expiry. Once a review asset is accepted, the accepted artifact path, caption, and token become keeper evidence for that rendered object; they should not be reinterpreted as approval for a regenerated diagram, a sibling export, or a later manuscript claim that merely reuses the same short label.

The distinction matters because agent systems rarely fail only at the model layer. They fail when model output is allowed to slide across tools without restating purpose, target, consequence, and evidence at each boundary. Sequence is not transitivity: permission to inspect should not silently become permission to execute, persist, or disclose. A successful read may justify a later recommendation, but it does not carry forward human consent for a send, a write, or a deploy; a successful dry-run likewise does not authorize production execution. Silence about approval state is not approval, one tool's audit trail is not another tool's approval record, and an expired, narrowed, or route-changed grant must degrade into evidence rather than spendable authority instead of being paraphrased into a fresh approval. A prompt injection embedded in a web page should not be able to turn a browser fetch into a shell invocation, a filesystem read, or an outbound message merely because the same worker touched all three surfaces in sequence. OpenClaw therefore treats each tool as a separate capability surface with its own policy vocabulary, sandbox shape, audit trail, and revocation conditions. When an approval covers several named review objects, the runtime should split that batch intent into separate artifact receipts before any one receipt becomes spendable authority.

3.5.1 Per-tool sandboxing with distinct security contexts

Every tool invocation runs inside a context tailored to the tool’s real blast radius rather than inside a generic “tool runner.” That separation is both technical and semantic.

At the technical layer, a tool may receive a dedicated UID/GID, a constrained mount namespace, its own process tree, a reduced environment, and network rules that are narrower than those of the parent agent. At the semantic layer, the runtime records what kind of authority is being exercised: local read, local mutation, outbound communication, remote query, device actuation, credential use, or arbitrary execution. These categories matter because they correspond to different abuse paths and different approval expectations. A grant that is safe for one category should fail closed when translated into another, rather than being interpreted generously by the next tool in the chain, reused against a different consequence class, or revived after its policy epoch has changed. A grant should also name the canonical target it authorizes, so a later display-name, path, redirect, or alias change cannot quietly move the same approval to a different object. When a tool uses an internal credential or session token to perform the authorized call, the receipt should name the credential class and broker decision without returning reusable secret material to the model transcript or downstream tools. Credential brokerage should also be one-way: a receipt may prove that the broker spent an approved credential for this call, but it should not expose a handle that lets a neighboring tool replay the same session outside the grant boundary. If the same operation is retried after a path, recipient, redirect, or display-name resolution changes, the retry should request a new grant rather than treating the previous canonical-target match as still valid. If that tool fans out into helper calls, retries, or provider-specific subrequests, those subcalls should inherit the same narrowed grant and receipt boundary rather than minting fresh ambient authority just because they are invisible to the model.

If canonicalization cannot complete, the boundary should preserve the attempted target, resolver state, and refusal reason as evidence, but it should not mint a provisional grant merely to keep the workflow moving. A later successful resolver pass should issue a new grant identifier instead of retroactively converting the refused attempt into authority. Cached canonical target IDs deserve the same caution: they are evidence about a previous resolver result, not proof that the current route, owner, or destination binding is still valid. If a resolver maps the same display label to a new canonical target, the boundary should treat that as target drift and require a fresh grant rather than carrying the old approval forward. The retry path should preserve both observations: the old canonical target remains audit evidence for what was originally approved, while the new canonical target starts as an unapproved candidate until policy rebinds it. When a resolver produces competing aliases for the same apparent target, the safer boundary is to record the ambiguity and require an operator or policy-level tie-breaker rather than choosing the most convenient alias inside the tool call. If a cached ID is reused, the receipt should say what freshness check converted it from historical evidence back into current authority. Batch tool requests should preserve this per-call binding rather than letting one successful resolution cover neighboring calls with different targets, consequence classes, or expiry windows. If a worker resumes from a checkpoint that contains only the cached ID, it should re-resolve the target and record the fresh binding before treating the ID as spendable authority. A display name, browser URL, or friendly route label can help an operator understand the receipt, but the grant itself should bind to the resolved canonical object and the resolver epoch that produced it. Denials should be recorded with the same specificity as grants, because a generic “tool failed” receipt hides whether the boundary protected the wrong worker, wrong target, stale route, expired approval, or prohibited consequence class. The denial receipt should also state whether the request was refused before payload disclosure, after payload inspection, or after target resolution, since each point leaves a different evidence and leakage profile. If the fresh resolver result points somewhere different, the boundary should preserve both bindings and stop for review instead of migrating the old approval to the new target. When the fresh resolver result depends on an implicit default, such as the current account, region, tenant, or working directory, that default should be written into the grant receipt rather than left as ambient runtime state. When that fresh binding is ambiguous because multiple aliases, redirects, or display names resolve near the same target, the boundary should stop with a resolver-conflict receipt instead of choosing the familiar-looking candidate that lets the old grant proceed. When the fresh resolver returns the same canonical ID but different human-visible metadata, the grant should preserve both views in the receipt so a reviewer can tell whether the target stayed stable or merely looked familiar. If the fresh resolver disagrees with the cached value, the old value should remain as audit evidence while the attempted action stops for review rather than silently retargeting the existing grant. Plain-text keeper tokens follow the same rule: they can confirm which rendered artifact was accepted, but they cannot substitute for a fresh policy epoch when a later tool call needs executable authority. If the resolver returns multiple plausible matches, the boundary should preserve the ambiguity as evidence and ask for a narrower target rather than choosing the most convenient alias. Successful resolution should also record the displayed label alongside the canonical identifier, so later reviewers can see what the human saw without treating a mutable label as the authority itself. When approval arrives as plain text, the same record should keep the human-facing token beside the canonical target so the system can honor the acceptance without confusing the caption or button label for the durable authority. If the plain-text token names an artifact that no longer matches the current path, caption, or checksum, the boundary should keep that mismatch as negative evidence and require a new review rather than silently attaching the old keep to the closest surviving object. If the token is copied without its surrounding message, channel, and review timestamp, the boundary should treat it as incomplete evidence until those context fields are recovered from the durable record. A token that was valid for a draft or review lane should not be upgraded into execution authority until the execution lane records its own target, consequence class, and policy epoch. If an operator approves a batch of review items in one sentence, each item should still receive its own artifact binding, because one clear keep can cover multiple named artifacts only after the durable record has split the batch into separate receipts. When a later version of an artifact enters review, the older keeper token remains historical approval for the older artifact rather than a standing preference that automatically accepts the replacement.

In practice, the boundary contract differs sharply by tool type:

  • Shell / exec receives the strongest containment because it can compose many lower-level primitives and can turn harmless-looking strings into system actions through quoting, interpolation, and shell expansion rules. The runtime constrains the argument vector, command shape, standard input, working directory, environment variables, umask, inherited file descriptors, credential source, time budget, process-group handling, exit-code, termination-signal, stdout/stderr separation, stream capture, command-digest recording, and secret-bearing output redaction, and often whether network access exists at all.
  • The approval record for an exec grant should bind the exact command shape and working directory, not merely the human-readable task goal, so a later retry cannot swap in a broader shell form while claiming to be the same approved operation.
  • If the command is retried after timeout or interruption, the new receipt should state whether the original process was terminated, still running, or unknown before a second grant is issued.
  • Child processes spawned by an exec tool should inherit the same narrowed grant envelope rather than escaping into the parent runtime's broader environment, credential set, or network reach.
  • Environment variables supplied to exec should be classified as configuration, secret material, or provenance context in the receipt, because the same command digest can behave differently when invisible environment state changes.
  • Retrying a failed exec call should reuse only the recorded evidence, not the grant itself; a changed command digest, working directory, environment source, or network setting is a new boundary crossing.
  • Standard input deserves the same binding as the command line: piping a newly generated script, secret-bearing blob, or browser-derived text into an approved binary changes the payload and should require a fresh digest and provenance record.
  • If an exec approval covers a diagnostic command, the grant should also name whether captured output may be forwarded to another tool or user-visible channel, since stdout can disclose secrets even when the command itself is read-only.
  • Browser / web is treated as an untrusted-content ingestion surface. Origin policy, cache partitioning, download handling, download provenance, downloaded-artifact hashing, script execution limits, DOM extraction rules, DNS-rebinding resistance, external navigation limits, and redirect-chain capture matter more than raw filesystem control; downloaded artifacts and extracted page text remain source-attributed, low-trust, freshness-bound evidence for a later decision, not instructions that can spend authority on another surface.
  • A downloaded file should carry the origin, redirect chain, retrieval time, content digest, and opener context into later review, but those fields are provenance for judgment, not permission for the file to inherit browser, shell, or messaging authority.
  • A browser boundary should also quarantine downloads and captured page data until their source, hash, declared type, and intended consumer are recorded; moving them into a coding workspace or message draft is a new capability decision, not a continuation of browsing.
  • Browser snapshots and screenshots deserve the same treatment: they can show what a session rendered at a moment, but they are not durable proof that the underlying account state, route owner, or permission target remained unchanged after capture.
  • A browser grant should record the requested origin, final resolved origin, and redirect chain separately, so a redirect, canonical-link hop, or same-looking page reached through a different route can downgrade trust, narrow follow-on actions, or require review instead of silently carrying the original policy decision forward.
  • Browser form submissions deserve a separate egress decision: reading a page or filling a draft field is not the same act as sending data back to the origin, especially when the form can mutate account state, trigger email, or disclose local context.
  • Browser automation that clicks controls should distinguish navigation, selection, save, submit, purchase, and publish consequences; a coordinate or selector match is not enough to prove the intended side effect class.
  • Authenticated browser state is evidence of what that session could see, not a transferable credential for later API calls; cookies, profiles, and autofill context should stay bound to the browser boundary unless a separate grant explicitly names the downstream consumer.
  • If cached browser content is reused after the live origin is unreachable, the receipt should say so plainly; cache provenance can support comparison, but it should not be mistaken for fresh origin evidence.
  • If a later tool consumes browser-derived text after translation, OCR, or summarization, the transformed text should keep the original source digest and transformation step in its receipt; otherwise the safer boundary is to treat it as a new, lower-confidence artifact rather than a clean restatement of the page.
  • If extracted browser text is later summarized or reformatted, the summary should keep a pointer to the original origin and digest instead of becoming a cleaner-looking source that loses the hostile-content boundary.
  • If a browser download is renamed for operator convenience, the receipt should preserve the original filename, final local path, and digest together so the friendlier name cannot blur which artifact actually crossed the boundary.
  • Redirect capture should record the final origin actually inspected without treating that origin as an approved destination for a later message, file write, credential exchange, or callback.
  • If a later worker relies on cached browser content, the cache record should carry the original retrieval time, final origin, and content digest into the new decision instead of letting the cache look like fresh first-party evidence.
  • Browser cache, cookies, and service-worker state should be scoped to the inspection lane and cleared or checkpointed explicitly; a later browser task should not inherit authenticated state merely because the same tool surface is convenient.
  • Browser form state should be logged as observed page state, not as user intent, until the coordinator binds the canonical origin, submitted fields, and resulting side effect to a fresh approval.
  • A downloaded artifact should carry its source URL, redirect chain, retrieval time, digest, and inspection status forward; renaming it into a local workspace path must not erase its low-trust origin or convert it into first-party evidence.
  • Browser-derived filenames, titles, and form labels should be treated as attacker-controlled display text until a policy layer binds them to a canonical origin and intended consequence.
  • Browser clipboard writes and downloads should be treated as outbound egress, not harmless UI convenience, because they can move hostile or sensitive content into a user's broader desktop workflow outside the browser sandbox.
  • Screenshots and page snapshots should preserve capture time, viewport, authenticated account context, and origin, because a visual receipt can prove what was seen without proving that the page remained trustworthy or that the account was authorized to act.
  • A screenshot of a filled form, highlighted control, or apparent confirmation state is observation evidence only; it should not become submit authority unless the current origin, fields, account, and consequence class are rebound at execution time.
  • Autofill, password-manager prompts, and remembered account selectors should be treated as privileged browser state, not page content; using them changes the credential boundary and needs a fresh origin, account, and consequence check.
  • Files and memory are governed primarily by path scope, canonical-path resolution, symlink and hardlink traversal handling, mutation mode, persistence rules, retention class, atomic-write expectations, conflict detection, and whether a write would touch canonical operational truth rather than a working artifact. Read access to a narrow workspace subtree is materially different from broad write access, durable-state mutation, destructive overwrite rights, append-only log changes, or casual rewrites of audit evidence.
  • A read grant that resolves a path successfully should not be treated as a latent write grant to the same path, because the consequence class changes from inspection to mutation even when the object name is identical.
  • Append-only logs should accept new facts without permitting old entries to be rewritten into cleaner hindsight, because recovery depends on knowing what the worker believed before the correction.
  • Summaries, dashboards, and compacted transcripts may point to keeper evidence, but they should not replace the raw receipt; a later worker needs the original path, caption, token, timestamp, and capture surface before treating the summarized decision as authoritative.
  • Atomic writes should preserve the previous version until the replacement is fully validated, so a failed edit cannot corrupt both the working artifact and the recovery evidence in the same motion.
  • Denied tool grants should leave a compact receipt too: the refusal reason, policy epoch, canonical target, and requested consequence class are evidence for later recovery, not embarrassing noise to omit from the record.
  • A local cache of operational truth should be labeled as a cache in receipts and recovery notes, so later workers do not mistake a stale fallback file for the current authority record.
  • A restored checkpoint should identify which facts are recovered context and which facts must be revalidated against the current durable store before any worker treats them as authority.
  • Plain-text keeper acknowledgments belong in append-only evidence with the artifact path, caption, and review token preserved verbatim; they should not be rewritten into a cleaner approval state that hides why the fallback path was needed.
  • Token normalization may help dashboards group decisions, but the raw approval text should remain attached to the keeper record so reviewers can distinguish an explicit acceptance from a later operational paraphrase.
  • Plain-text approval tokens captured outside the primary review UI should be bound by exact artifact path, caption, and capture time before they are treated as keeper evidence.
  • When a keeper token is reconciled from an append-only log after a button failure, the receipt should say which review surface failed so the fallback does not later look like the preferred approval channel.
  • A failed or missing review button should not erase the uncertainty that surrounded the decision; the fallback receipt should say which control failed, which plain-text token replaced it, and which artifact version that token could safely cover.
  • The evidence should also name the review surface that captured the fallback token, so a later operator can distinguish a direct approval reply from a copied status note or dashboard summary.
  • When a rendered asset becomes a keeper, its checksum should join the path, caption, and approval token in the evidence record, so later filesystem cleanup or preview regeneration cannot make a nearby file look like the accepted artifact. If a checksum cannot be produced at acceptance time, the keeper record should say so explicitly and remain provisional rather than letting a path-only approval masquerade as immutable evidence.
  • If the checksum is added later, that later value should be recorded as reconciliation evidence with its own capture time, not backdated into the original approval moment.
  • If a keeper is reconciled from an append-only log while the primary review store is unavailable, the receipt should say so plainly and link the log entry without upgrading the fallback note into a cleaner primary approval.
  • If the same plain-text keeper token is later attached to more than one rendered artifact, reconciliation should preserve the collision and require review rather than choosing whichever artifact most recently used the token string.
  • If two keeper records point to the same rendered path but disagree on caption, checksum, or approval token, reconciliation should preserve both records and stop for review rather than merging them into the tidier-looking one.
  • A keeper reconciliation pass should record the accepted token against the existing artifact and caption rather than rerendering or normalizing the asset into a new review object.
  • If the accepted artifact is missing during reconciliation, the keeper record should preserve the last known path, caption, token, and checksum as evidence, mark the file unavailable, and stop short of substituting the nearest surviving preview.
  • If a worker discovers that a prior log entry was wrong, the repair is a later correction linked to the original event, not a silent replacement of the evidence the next operator would have used.
  • When append-only logs are mirrored into dashboards or summaries, the summary should carry the source entry IDs and freshness time; a tidy rollup is navigation aid, not a replacement authority record.
  • If a dashboard summary drops the keeper token, checksum, or original caption, it should be treated as an index into the append-only evidence rather than as enough proof to promote, rerender, or discard the artifact.
  • Messaging is an egress boundary. Recipient identity, recipient canonicalization against stable account identifiers rather than display names that may drift, channel binding, route ownership, route-owner freshness, attachment policy, content review, channel-permission freshness, attachment-version binding, send-attempt correlation, idempotency keys, replay-resistant review tokens, duplicate-send suppression, and truthful delivery logging become first-class controls because the security concern is disclosure, replay, misdelivery, and externally visible side effects outside the runtime. The send receipt should preserve the canonical recipient resolved at execution time, not merely the display label reviewed earlier.
  • A reviewed message draft is not send authority by itself; the boundary should bind the final body, attachments, recipient, channel, and route owner at the moment of send so a later edit or resumed worker cannot spend an approval on different content.
  • Message previews are evidence for the exact content, recipient binding, attachment digest, and channel state shown at review time; if any of those fields change before send, the preview expires instead of silently authorizing the mutated payload.
  • Forwarded or quoted approvals should preserve the original review context as evidence, but the receiving worker should still rebind the current recipient, channel, payload digest, and consequence class before treating the approval as spendable.
  • Plain-text send approvals should resolve through the live message candidate and its preview digest, so a bare approved reply cannot be reused for a regenerated body, sibling channel, or nearby recipient.
  • Approval tokens copied into a new thread, channel, or resumed worker should be treated as references to the original review object, not as self-contained send authority.
  • A failed, bounced, or unverifiable send receipt is evidence about that attempted route, not permission to retry through a fallback channel, recipient alias, attachment version, or regenerated payload without a fresh destination-bound review and consequence check.
  • Duplicate-send suppression should key on the reviewed recipient, channel, content digest, attachment digest, and side-effect class, so a retried delivery can prove it is the same bounded act rather than a nearby disclosure with a friendlier route.
  • External APIs, nodes, and devices combine egress with operational side effects. They therefore require destination scoping, least-required credential scopes, rate limits, bounded retry policy that cannot broaden credential scope, extend credential-lease lifetime, or cross the original idempotency window after failure, request and response size ceilings, content-type validation, a stated consequence class, idempotency keys before state-changing calls, staged dry-runs where available, credential-lease identity, schema or API-version pinning, request/response and error-body redaction boundaries, audit correlation, rollback expectations where rollback is possible, tool-specific freshness checks, provider-response provenance, response-signature verification where the provider supports it, execution-effect evidence tied to the requested destination and idempotency key rather than a generic success status, and in some cases explicit human approval. If a response no longer matches the pinned schema, the result should become low-trust evidence for review rather than a value the agent coerces into the old contract. Likewise, provider-side redirects, fallback regions, or silent model/tool substitutions should be recorded as execution facts, not treated as proof that the originally reviewed destination and consequence class still hold.
  • API retry receipts should distinguish transport uncertainty from completed side effects, so a timeout cannot be rewritten as permission to repeat a non-idempotent operation under a broader destination or credential scope.
  • A dry-run receipt from an API or device adapter should describe what would have happened under the current policy epoch, but it should not become execution authority after the target, credential lease, schema version, or consequence class has changed.
  • If an API adapter falls back to a secondary provider, region, model, or node route, the receipt should name that substitution explicitly and require the substituted destination to satisfy the original consequence and approval constraints rather than inheriting trust from the failed primary path.

This per-tool design prevents accidental authority pooling. A browser session that reads attacker-controlled content does not automatically gain the authority carried by the messaging tool. A file editing tool does not inherit the outbound reach of an API client. Even when the same user request causes several tools to participate in sequence, each step must pass through its own gate. The same boundary should treat denials as terminal for that attempted consequence class: a refused shell, message, API, or file grant may inform a narrower follow-up request, but it is not partial authority to approximate the side effect through a different tool. Fallback adapters should preserve that refusal as a constraint, not translate it into a nearby provider, route, or tool surface with a friendlier policy vocabulary.

3.5.2 The principle of least capability: dynamic permission grants

OpenClaw implements least privilege through short-lived capability tickets minted at invocation time rather than through long-lived ambient credentials embedded in the agent runtime. A useful mental model is that the agent asks for an action, while the runtime decides the narrowest grant that can safely satisfy it.

A capability ticket typically binds at least the following fields:

  • the requesting principal, role, session, and current owner binding
  • the tool surface being invoked
  • the exact operation class, such as read, append, navigate, query, or send
  • the target resource or destination, resolved to a stable canonical identifier where one exists, with the canonicalization method and request-parameter digest recorded
  • the input trust and provenance class that the tool is allowed to consume
  • the relevant artifact version, review object, approval reference, and canonical-record target when the action can change external state
  • the allowed state transition, such as draft -> review-ready or review-approved -> send, including whether that transition is single-use
  • quantitative limits such as bytes, files, rows, tokens, time, retries, parallelism, cost ceilings, or request count
  • approval metadata, reviewer role binding, policy snapshot, and grant issuer identity
  • a short expiration window, revocation condition, single-spend marker or replay nonce, and audit correlation identifier

When a ticket expires during a multi-step tool chain, the safe continuation is a new grant request against the current owner, artifact, destination, and policy epoch, not an implicit extension of the old ticket because the chain began legitimately.

The expiration clock should come from the control plane that issues and revokes the grant, not from a worker-local transcript or cached timestamp that can survive past the authority it describes. If the worker cannot confirm the issuer's current clock, policy epoch, and revocation channel at spend time, the ticket should be treated as evidence of a past decision rather than authority to act now. The grant issuer should also be outside the requesting worker, so a compromised or merely over-eager runtime cannot convert its own confidence, plan text, or cached approval summary into a fresh ticket. If the worker loses contact with the issuer before spend time, the ticket should fail closed as stale evidence rather than being treated as still valid because it appears in local context. Free-form rationale text may explain why a ticket was requested, but it should not be parsed later as an additional scope field, target selector, or substitute approval. Dispatch should also re-check revocation immediately before the tool call begins, because a ticket that was valid when queued may be invalid by the time the worker reaches the boundary. Scheduler ownership deserves the same check: a cron or delayed job may remember the work item, but it must prove the current route owner and policy epoch before spending any ticket minted by an earlier wake cycle. If a worker resumes from a checkpoint, it should treat any remembered ticket as historical evidence and request a newly issued grant instead of replaying cached authority across a changed policy epoch.

For example, an agent preparing a draft summary from three local markdown files may receive a grant that allows only read access to those specific paths, with a maximum byte budget and a lifetime measured in seconds. If the model later attempts to broaden the request to include a sibling directory, overwrite a file, send the draft externally, reuse the ticket against a newer artifact version, or spend the same ticket from a worker that no longer owns the route, that is not a continuation of the original grant. It is a new request that must be evaluated independently.

The same rule applies after partial failure. A timeout, provider error, interrupted tool call, or missing receipt should not leave behind a half-spendable grant that the next retry can reinterpret. Retries must either reuse the same idempotency identity inside the original window, against the same canonical target, or return to policy evaluation with fresh artifact, destination, approval, and route-owner evidence. Retry budgeting belongs to the same boundary: once the original retry count, time window, or cost ceiling is exhausted, the next attempt is a new policy question rather than a continuation hidden inside reliability code. Consuming the single-spend marker at attempt start, and requiring any later receipt to close that same idempotency identity, keeps retries from turning uncertainty about execution into fresh authority. The absence of a receipt should therefore be recorded as unresolved effect evidence, not treated as proof that the grant remains unused. A retry queue may preserve work intent, but it cannot extend the grant's expiry merely by keeping the job alive. If the retry changes verifier, channel, provider region, or confirmation source, the new receipt must close a new policy decision rather than being attached to the original grant as delayed proof.

This matters even more when approval transport degrades. A button callback, a plain-text ..._keep token, or an explicit natural-language approval should never act as ambient permission. Those are transport surfaces for the same underlying decision, not parallel sources of authority. The runtime should therefore run a bindability test: can that reply still be resolved without guesswork to one live review request instance, one current artifact or action target, one allowed next transition, one current reviewer, one current policy snapshot, one unspent idempotency identity, and one expiry window measured by the control plane rather than by the worker transcript or a stale local clock? A short review caption helps by projecting that identity into human-usable text—for example, book_asset_ch03_toolcap_v2_review paired with book_asset_ch03_toolcap_v2_keep—but the caption is only a binding aid. Its value is that it can survive unreliable buttons while still naming the same pending review object; the authority never lives in the chat text itself. The caption should travel with a version or digest hint, so a user-visible approval can be reattached to the exact artifact that was reviewed rather than to a newly rendered look-alike. If the artifact is regenerated after review, even from the same source description, the old caption becomes history rather than authority until the new digest is reviewed. Natural-language approval has to meet the same bar by identifying the pending review object or artifact unambiguously, not merely sounding affirmative near the right conversation. The caption must also remain unique within the current review window, so a later variant cannot borrow the earlier human-readable token simply because its name looks familiar. If one reply could plausibly bind to two live review objects, the right outcome is a rebinding prompt, not a guess. The authority lives in the still-pending review object that the caption names.

The operational rule is stricter than many review systems imply: approval text is evidence about a decision, not the decision engine. The durable review object, policy state, and promotion target still have to agree about what authority is being spent right now. That is why plain-text approval recovery is acceptable only when the runtime can rebind the reply to one exact pending transition such as review-ready -> keeper or review-approved -> send. When that rebind succeeds but promotion, delivery, or canonical sync has not yet closed, the honest state is still partial—typically approved-local-only, not finished effect. Silence from one callback lane is not enough to prove the decision disappeared if the same review window still names another authoritative approval surface. If the artifact version changed, the route owner changed, the destination class widened, the review request was re-issued, a sibling variant was later minted under a similar caption, the reply moved through a different chat or session context, or the reply was already consumed earlier in the workflow, that evidence is now spent approval, not reusable authority. Keeper captions are therefore aliases for one live pending decision, not bearer tokens that can be replayed later. The same approval word can survive a rerender while the reviewed artifact has changed underneath it, which is exactly why semantic resemblance is not rebinding. The truthful result is not “probably approved,” but “approval unresolved,” and the runtime should fall back into an approval-blocked execution class until a fresh decision is bound.

Just as important, a granted request, a tool invocation that actually ran, and an external effect that later closed are three different truths. In operational terms they should read as three different receipts: permission was bound, execution was attempted, and effect was confirmed or not confirmed. The policy layer may deny or narrow a request before execution. The tool may run and still fail locally. The tool may report success while the outside world remains unconfirmed, or while confirmation belongs to an earlier idempotency key rather than the effect being attempted now. A restored keeper caption may prove reviewer intent while still failing bindability because the artifact digest, destination binding, idempotency key, or canonical-record target changed; a valid bound approval may allow execution while delivery, promotion, or canonical sync later fails.

The discipline this chapter argues for is simple but often neglected: never let one green badge stand in for all three receipts. Permission belongs to policy state. Execution belongs to the runtime record for that specific call. Effect belongs to the downstream confirmation path—message delivery, remote mutation acknowledgement, canonical-store sync, deployment health, or whatever the outside system can truthfully attest. Denials and narrowings deserve the same receipt discipline: a blocked request should record the missing proof or narrowed scope, not vanish as if no security decision occurred or reappear through retry orchestration as a weaker grant. When those proofs collapse into one flattering status, operators lose the ability to see where authority was spent, where work actually ran, and where reality stopped matching intent. An effect receipt should also name the verifier and evidence source, so a worker's own success string cannot masquerade as independent confirmation from the destination system. Redaction should protect secrets in those receipts without removing the binding facts—target digest, grant identifier, verifier name, and idempotency identity—that make later reconstruction possible. If a verifier is changed during redaction or privacy review, the receipt should be downgraded to derived evidence until the new verifier can be tied back to the original destination and idempotency identity. A receipt that redacts away every binding field should be treated as a privacy-preserving failure of evidence, not as a usable audit record. If a receipt is later corrected, superseded, or revoked, the correction should link to the original grant and effect record instead of overwriting the earlier operational truth. Late confirmations deserve the same skepticism: if the downstream receipt cannot be tied back to the same grant, target, and idempotency identity, it is evidence to investigate rather than closure for the current action. Aggregated dashboards should preserve that distinction too: a rolled-up success count may summarize many receipts, but it must not erase which verifier closed which effect for which grant when an incident needs reconstruction. Duplicate confirmations should collapse into the same evidence record rather than minting a second completed effect, because replayed receipts are audit material, not additional authority. Conflicting confirmations should not be averaged into success; they should reopen the effect as contested evidence until the authoritative destination record can be named. If two verifiers disagree, the receipt should preserve the verifier identities, observation times, and canonical destination keys so the conflict remains investigable rather than becoming a vague failed-status flag. If the destination record later proves no effect occurred, the consumed approval and attempted execution remain evidence, but they do not become reusable authority for a fresh attempt. If the verifier is unavailable, the state should remain pending-verification rather than being upgraded to success or collapsed into failure by retry code. When a provider later backfills a success event, the boundary should verify that the event belongs to the same policy epoch and destination binding before it closes the original effect. If the destination exposes both a human-facing confirmation and a machine-readable event stream, the receipt should prefer the machine event for closure while preserving the human-facing screen as context, not as the authority that proves the effect occurred.

This approach closes a common security gap in agent systems: the silent widening of authority during multi-step reasoning. Without dynamic grants, a runtime often authenticates the agent once and then lets the model improvise within a broad permission envelope. With dynamic grants, every meaningful change in operation type, destination, or data sensitivity becomes observable and enforceable.

The control argument is readable as a three-step sequence: agent intent → policy gate → scoped grant. That first step is the decision point where the runtime binds request, actor, target, review state, and expiry before any tool runs. The grant is not poured into a generic execution channel, but translated into different boundary conditions for shell, files, web, messaging, and external APIs according to each surface's real consequence profile. Enforcement then records whether the action was denied, narrowed, attempted, expired, or completed, and returns that evidence to policy instead of letting the tool narrate its own legitimacy.

That sequence is the security property. It keeps authority residue from accumulating across steps. Yesterday's allowed shell command does not justify today's different command. A browser read does not authorize a later outbound send. A keeper or send approval that once bound cleanly does not remain valid after the artifact, recipient, reviewer binding, policy epoch, or transition target has changed. The runtime stays honest by forcing every widened, stale, or mismatched request back through policy, where the right answer can again be denial, narrowing, or a fresh request for proof.

3.5.3 Inter-tool communication controls and data flow policies

Per-tool isolation is necessary but insufficient if tool outputs can flow into more privileged tools without mediation. The dangerous pattern is not always a single compromised tool; it is a chain in which a low-trust source launders instructions or data into a higher-impact action.

The boundary should therefore preserve the trust label on output as it moves: extracted web text, command output, parsed logs, and model-written summaries may become evidence for a later decision, but they should not become instructions for a more privileged tool unless a fresh policy step deliberately reclassifies them.

OpenClaw addresses this by assigning provenance and policy state to tool outputs. A browser extraction, for example, is not treated as neutral text. It is tagged as externally sourced, potentially attacker-controlled content, with the extraction time, source URL, and content digest preserved. When that output is passed to another tool, the receiving boundary evaluates not only the requested action but also the origin, freshness, sensitivity, schema fit, transformation history, and policy epoch of the input. If the handoff format drops those labels, the receiver should treat the payload as lower-trust evidence rather than silently inheriting the sender's authority.

If any part of that provenance chain is missing, ambiguous, contradicted by the transformed artifact, or older than the receiving tool's policy window, the safe default is to downgrade the input to evidence for human or coordinator review rather than instructions that can drive a higher-authority action. That downgrade should be recorded as a policy outcome, not hidden as parser uncertainty, so later retries cannot treat the same unlabeled payload as newly clean input. The downgrade receipt should name the label, digest, adapter, or policy fact that failed to survive the handoff, because "provenance incomplete" is too vague to guide safe recovery. If only part of the provenance survives, the receiving boundary should preserve the usable evidence while refusing to promote the whole artifact into a higher-trust class.

Several practical rules follow from this model:

  • Untrusted content cannot widen downstream authority. A web page, repository comment, or OCR result may influence what the agent wants to do next, but it cannot itself mint a broader shell, file, or messaging grant, lower the review class, or relax the destination binding.
  • Cross-boundary transformations require explicit purpose rebinding. Data gathered for summarization is not automatically cleared for external transmission; the runtime must name the new purpose, the new destination or audience, the new consequence class, the source-evidence link that survived transformation, and the policy basis for allowing it.
  • Transformation adapters are policy subjects, not neutral plumbing. A converter that turns HTML into JSON, screenshots into OCR text, or draft prose into a command proposal should record its adapter identity, schema or prompt version, input digest, output digest, and any confidence or loss notes, so later boundaries can tell whether the trust class was preserved, narrowed, or made too uncertain to spend; adapter confidence may support review, but it must not upgrade source trust by itself.
  • Approval-bearing artifacts keep one stable identity across tools. A rendered figure, draft patch, or message proposal may move between workers, but later approval or send steps still have to bind through the same review request instance, artifact digest, canonical keeper caption or token, current policy snapshot, current reviewer identity, and a single still-unspent transition record. The decision should spend one exact keeper-promotion or delivery transition, rather than trusting a transient button state, a copied caption, or whatever generic approved text appears afterward.
  • Egress reviews evaluate provenance composition, not just destination. Content assembled from local secrets plus untrusted external input deserves more scrutiny than content drawn from one low-sensitivity source because the danger is not only where it goes, but what hidden instruction, provenance-stripping channel, or disclosure path it may be carrying with it. The review should preserve that mixed-origin fact even if the final text looks polished and locally authored, and should not lower the review class merely because a later summarizer removed the obvious source markers.
  • Shared scratch space is minimized. Tools exchange mediated artifacts, not unconstrained access to one another's working state, and temporary handoff links expire with their policy context instead of becoming informal shared drives.

The governing idea is that policy follows purpose, not payload reuse. The same bytes may appear as a summary candidate, a patch rationale, or a send attachment, but those are different actions with different consequence classes. A reused payload should arrive with a newly stated purpose and target, not with inherited authority from the last place it appeared. Treating those appearances as one continuous flow because the payload looks familiar is how provenance gets laundered into permission.

A useful design test is to ask where the system forces a reclassification stop. The answer should never be “inside the model’s latent judgment” or “inside a convenience parser that cleaned the text up first.” If browser text is normalized into JSON, if a draft patch is converted into a command proposal, or if a screenshot is OCR'd into an outbound note, that transformation may improve usability but it does not change trust class by itself. Somewhere after the transformation and before the next side effect, a boundary still has to restate purpose, name the receiving tool's consequence class, check provenance, record the reclassification evidence, and decide whether the downstream action is allowed. The transformed artifact should also remain linked to the source evidence, retrieval time, or digest that gave it its trust class, so a cleaner format cannot masquerade as cleaner authority. Otherwise format conversion becomes a covert authority bridge. Loss notes are part of that evidence: when a converter drops styling, attachments, hidden fields, headers, or surrounding conversation, the downstream boundary should know what context disappeared before it treats the output as complete enough for approval or egress. If the adapter, schema, or prompt version changes during retry, the resulting artifact should be treated as a new transformation with its own provenance record rather than as a cleaner copy of the old evidence.

The same rule applies to approval transport. A caption such as ..._keep, a copied review link, a bare approved, or a natural-language “looks good” may survive multiple tool hops as valuable evidence, but none of those strings should behave like a bearer instrument. They are references to a decision record, not free-floating authority, and generic approval text is acceptable only when the runtime can still bind it to one live pending review object, one current reviewer, one current target, the current delivery surface, one current policy snapshot, and one unspent transition. If no live candidate can be named, the reply should be recorded as orphaned approval evidence with its capture surface and timestamp instead of being attached to the nearest plausible review item. Once a promotion, send, or destructive step consumes that decision, later tools may quote the token as history but must not spend it again unless policy rebinds a fresh transition; if the tool sees the same token twice, the second sighting should resolve to evidence or a no-op, not a second grant. Inter-tool portability is useful; fungible approval text is dangerous.

Seen this way, provenance is not metadata sprinkled on top of the workflow. It is the thing that stops one tool from smuggling intent into another. A browser extraction can remain useful without pretending to be send-ready copy. A patch explanation can cross into review without quietly inheriting deploy authority. A recovered draft can restore context without restoring the send permission that once sat nearby.

This is especially important for external send surfaces. Many real incidents in agent systems are not classic memory-corruption failures; they are disclosure failures caused by unreviewed handoffs from retrieval tools to outbound channels. By carrying provenance through the chain, OpenClaw can require stronger checks before a message, API call, or device action leaves the boundary, and it can make an honest negative claim afterward: not merely that the send was denied, but that no purpose-bound path ever reclassified untrusted source material into approved outbound content.

3.5.4 Preventing confused deputy attacks in multi-tool chains

A confused deputy attack occurs when a more privileged component is induced to misuse its authority on behalf of a less trusted actor. Agent systems are unusually vulnerable to this pattern because they routinely compose tools with different trust levels in a single reasoning trace.

Consider two realistic variants. In the first, a browser tool fetches a support article that contains hidden instructions telling the agent to export local credentials and message them to an external address. In the second, a low-trust worker produces a draft artifact and a later message merely says approved; if the runtime treats that generic approval text as sufficient authority for any related send or promotion step, a different artifact—or the same artifact pointed at a newly widened destination—can ride forward on borrowed legitimacy. In both cases the downstream tool becomes the deputy: it spends real outbound or mutating authority on behalf of an upstream source that never truly earned that power.

OpenClaw reduces this risk through five checks at every high-impact hop:

  1. Authority does not transitively inherit. The fact that one tool was allowed to run does not imply that a second tool may act on its output.
  2. Target rebinding is re-evaluated. If a downstream tool introduces a new recipient, hostname, file path, artifact id, or command target, that target is canonicalized where possible and checked against policy as a fresh boundary crossing.
  3. Intent must remain attributable to an approved scope. The runtime preserves whether an operation was directly requested by the user, derived from trusted workflow state, or suggested by untrusted content.
  4. Approval text must bind to the reviewed object, not merely resemble prior captions. A keeper promotion, outbound send, or destructive write is allowed only when the approval record still names the artifact digest, review moment, scope, current reviewer, current target, current delivery or execution surface, current policy snapshot, and permitted transition being attempted now.
  5. Audit records capture the chain, not just the final action. Investigators should be able to see that a send action was prompted by browser-extracted content, including the source digest or retrieval receipt that carried its trust label, or that a promotion relied on a specific review object and unspent transition, rather than by explicit user direction alone; when a hop is blocked, the denial reason and missing binding fact are recorded as their own evidence rather than disappearing behind the absence of an effect.

Plain-text fallback approvals should be logged the same way: the token is evidence for one named artifact version and review transition, not a reusable approval phrase that later workflows can spend by resemblance.

A useful operator heuristic follows from those checks: if the downstream tool can explain its authority only by repeating upstream text—"the page told me to," "the draft carried an old recipient," or "the transcript said approved"—then the deputy is already confused. A legitimate boundary crossing should be explainable in a different vocabulary: which policy surface evaluated the hop, which target was rebound, which review object or transition was still live, which worker currently owns the route, which grant ledger entry was spent or rejected, which consequence class was authorized now, and which confirmation path will close the effect. If the tool cannot name a current policy decision without quoting the payload that requested the action, the request should be downgraded to evidence and re-evaluated by the coordinator. Mere textual continuity is evidence about workflow history; it is not a substitute for current authority.

These measures turn tool composition into a series of narrow contracts rather than a single expanding envelope of trust. The result is not friction for its own sake. It is the minimum structure required to let agents combine search, files, messaging, browsers, and external APIs without collapsing back into ambient authority.

The practical test is what the system does when the chain becomes ambiguous. If provenance is incomplete, the recipient no longer matches, recipient canonicalization fails or resolves to a different stable destination, the artifact hash changed, the schema contract no longer fits, the policy epoch moved, the grant nonce is already spent, or the approval evidence could describe more than one live next step, the runtime should not guess which intent was "probably" meant. It should deliberately fall back to the less dangerous truth: untrusted input remains untrusted, the downstream action is blocked, and a fresh review or rebinding step is required. That fail-closed posture is what keeps a deputy from laundering uncertainty into authority. When rebinding is required, the prompt should expose the competing live candidates and the missing binding fact without selecting a default, so operator review resolves the ambiguity rather than merely confirming the runtime's guess.

Just as important, this structure gives responders a concrete proof obligation after an incident: they must show not only which final action was blocked, but which intermediate reclassification or approval-binding step never became authorized, and they must preserve that missing authorization as a recorded safety fact rather than overwrite it with a later success summary.

Chapter 3’s broader isolation argument depends on this point. Containers, microVMs, and seccomp reduce the consequences of code execution, but they do not by themselves define what an agent should be allowed to do. Tool capability boundaries supply that missing layer. They convert least privilege from a slogan into a runtime discipline that is specific, inspectable, and revocable.

3.6 State Management and Persistence

Isolation is not only a question of where code runs. It is also a question of where state survives, who may promote it into durable truth, and whether a later worker can resume it without silently inheriting stale authority. A runtime can be heavily sandboxed and still create a serious security failure if scratch notes, checkpoints, approvals, or task records collapse into one writable bucket.

OpenClaw’s safer pattern is to keep execution disposable while making durable state explicit. Scratch space exists for local reasoning and intermediate artifacts. Working artifacts exist for drafts, diffs, renders, and other task products. Operational truth is narrower and more carefully owned: task ownership, approval state, chapter state, review decisions, and audit evidence. The persistence layer should preserve those distinctions instead of erasing them for convenience.

3.6.1 Partitioned memory and durable-state boundaries

Not all memory belongs to the same trust domain. OpenClaw works best when at least four classes stay distinct:

  • private human context, which should remain bound to the sessions explicitly allowed to carry it
  • task or workspace context, which may be shared across cooperating agents but only within a named objective and bounded file or state scope
  • retrieved external material, which may be useful but should retain provenance and lower trust status
  • operational truth and evidence, which records ownership, approvals, outcome states, and other facts the wider system relies on

The practical question is not only how these classes are encrypted, though encryption still matters. The more important question is which runtimes may read or write them. A delegated worker rarely needs broad human memory. A research session should not be able to rewrite approval truth. A scratch export may be useful during a local pass, but it should not masquerade as canonical state.

The design test is simple: if one store is compromised, which other truths become writable, believable, or silently overridable? That question separates convenience from control. Workspace notes may help a draft continue. Retrieved material may help an argument sharpen. But ownership records, approval facts, task state, and outcome truth must remain difficult to forge from the edge of the system. Otherwise every helper runtime becomes a back door into the control plane.

In the OpenClaw and Belong operating model, this means durable book and agent state belongs in the canonical data layer, while local files remain working drafts, startup context, or clearly labeled temporary exports when the canonical path is unavailable. A failed sync should create a reconciliation task, not a quiet promotion of the fallback copy into truth. Persistence should preserve boundaries rather than quietly widening them.

3.6.2 Checkpointing, migration, and stale-authority control

Checkpointing is operationally attractive because it reduces cold-start cost and lets long-running work survive interruption. It is also risky because checkpoints can capture exactly the material a later compromised or stale worker should not inherit: in-flight prompts, pending approvals, temporary destinations, sensitive tool output, and assumptions about who still owns the task.

This is the chapter's most common persistence failure, and it deserves a name: authority residue. Authority residue is leftover approval-bearing, ownership-bearing, destination-bearing, or grant-bearing state that survives the moment when it was valid and then gets mistaken for current permission during restore, retry, or failover. A safe checkpoint should therefore capture resumable workflow state, not live authority. Useful checkpoint records include:

  • the named task or objective being resumed
  • the worker role and expected scope
  • freshness metadata such as owner, route generation, policy version, and last-verified time
  • pending approvals, unresolved blockers, and outstanding egress requests
  • consumption state for any review decision or grant, so a restored worker cannot spend the same approval twice
  • references to durable artifacts, including artifact digests where available, rather than raw copies of everything in memory

Restore is then a governed handoff, not a blind continuation. If ownership changed, policy moved, approval expired, or the destination environment is weaker than the original one, the system should stop and rebind the work instead of pretending the checkpoint is still current. A good restore path answers two questions in order: what context may be reopened, and what authority must be freshly re-issued. Put bluntly, a checkpoint may preserve sequence, but it may not preserve entitlement. A resumed worker may inherit context, but it must not inherit spendable authority until the runtime proves that the same owner, target, review object, and policy snapshot are still current.

That implies a concrete checkpoint discipline: resume tokens may point to pending decisions, but they may not silently carry those decisions forward as live permission. A stored outbound destination, half-completed approval caption, or previously scoped grant can remain evidence about what the workflow was trying to do; it cannot become the reason the workflow is still allowed to do it. On restore, the runtime should be able to sort old state into three buckets: descriptive context that explains the interrupted workflow, replay-sensitive artifacts that may need careful reopening, and authorizing context that must be freshly re-issued before any side effect. A draft excerpt or artifact pointer may survive as context. A staged message body or rendered review asset may survive only as something to inspect again. A destination binding, approval transition, or tool grant survives only as history until policy re-attests it. If the runtime cannot make those distinctions plainly, the checkpoint is too powerful. Restore logging should preserve that separation as well: reopening context, revalidating authority, and confirming a later side effect are different events, not one resumed-success badge.

Review-driven workflows make the rule especially testable because they tempt systems to confuse remembered wording with remembered permission. A plain-text keeper reply such as ..._keep, keep, approved, or a natural-language acceptance is best understood as alternate transport for locating one bounded review decision, not as a new source of authority. The runtime may honor that evidence only if it can still bind the reply to one live review request instance, one unchanged artifact digest, one current reviewer, one allowed promotion target, one still-matching policy snapshot, and one unconsumed decision window. In other words, the text may stay stable while the authority underneath it expires, narrows, or is spent. Familiar approval words alone prove almost nothing: they may have been copied from yesterday's transcript, detached from the artifact they once described, or replayed after the policy surface changed. The inverse mistake matters too. One missing button callback is not enough to prove that no approval exists if the same live review object can still attest the decision through an allowed plain-text fallback. The system should therefore prefer durable identity over visual convenience: preserve the caption for humans, preserve the digest for machines, and require both to agree with the still-pending transition before promotion. Those checks are not bureaucracy. They are the minimum discipline required to keep transport resilience from quietly turning into authority drift.

A simple migration test follows from that rule: if the worker moved to a new runtime, host, or policy epoch, which facts survived as evidence, and which facts must be re-proved before the next side effect? Systems that cannot answer that question usually let checkpoints smuggle authority across boundaries they claim to enforce.

If any of those proofs fail, the truthful status is not "close enough" or "probably approved." It is "approval must be rebound." The correct recovery path is to reopen the review, carry forward the old decision as evidence, and ask the current authority surface to issue a current yes or no. That preserves operator convenience without pretending that an old message is a perpetual grant. The transport string may survive for human continuity, but the system should only honor the still-live review object and unchanged artifact digest it names.

Until that freshness proof lands, the honest posture is a downgraded execution class—typically read-only, draining, or approval-blocked—rather than quiet continuation. Migration is safest when it behaves like re-issuing a scoped grant, not thawing a frozen process.

3.6.3 Evidence that explains decisions without hoarding secrets

Isolation also depends on evidence quality. Operators need enough information to explain what a worker proposed, what boundary it crossed, what approval or policy applied, and which outcome state followed. They do not need every log sink to become a second full copy of sensitive prompts, attachments, or private notes.

OpenClaw’s stronger pattern is structured decision evidence: record the requesting principal, the workflow or review object, the relevant artifact digest, the tool or provider boundary crossed, the target or destination class, the idempotency or replay key where one exists, the authoritative decision surface that mattered, the policy or approval reference, and the final state such as denied, queued, provider-accepted, confirmed, expired, or reconciliation-pending. If fallback transport mattered, record that too—but as transport. The point is not to archive everything. It is to preserve a legible chain of authority that can later answer a hard question: what fact actually authorized this side effect? In practice, that means every approval trail should be readable as three linked but non-interchangeable receipts: decision evidence existed, bindable authority was present at execution time, and the downstream effect was or was not confirmed. Evidence should explain why a decision was allowed, blocked, or left unresolved without turning every downstream store into a second secret-bearing control plane.

The distinction matters most when review transport is messy. A button click, callback row, durable review object, copied caption, or plain-text keeper reply may all contribute evidence about one decision, but they should not be collapsed into one vague "approved" flag. Good evidence names four things separately: which surface was authoritative, which transport merely mirrored or relayed it, whether the decision was still bindable to one unspent transition at action time, and what failure mode occurred when those facts diverged. If those answers conflict, the truthful outcome is pending or blocked, not approved by implication. A missing callback row may explain why automation stalled; it must not explain why authority survived. That separation keeps incident response anchored in proof instead of folklore. It also preserves a hard line between evidence of approval and authority to act: logs may explain the path a decision took, but they must not become the reason a stale runtime is treated as currently authorized. A keeper token in a transcript may be enough to recover operator intent; it is not, by itself, enough to prove that the token still pointed to an unspent review transition when the side effect actually ran.

A useful mental model is the receipt, not the replica. A receipt is compact but specific: it says who asked, for what object, across which boundary, under which policy or review record, with what outcome, at what time. It can point back to the sensitive material without reproducing the whole thing everywhere it lands. That makes audits easier, replay analysis sharper, and leak surfaces smaller. Systems that skip this discipline usually compensate by keeping too much raw payload in too many places, which solves short-term operator uncertainty by creating long-term secret sprawl.

When full payload capture is genuinely required, it should live behind a stronger access path, shorter retention policy, and explicit break-glass procedure with its own access receipt. Review dashboards and operator summaries should remain downstream readers of evidence, not replacement truth and not casually widened secret stores.

3.6.4 Retention and garbage collection for temporary sensitive state

Ephemeral execution loses much of its value if temporary artifacts accumulate in caches, scratch directories, downloads, rendered previews, or orphaned checkpoint rows. Sensitive-data garbage collection is therefore part of the isolation contract, not an afterthought. Deletion policy is not mere storage hygiene; it is one of the mechanisms by which a system proves that old authority does not remain lying around in a reusable form.

Common failure modes include:

  • browser downloads surviving long after the inspection step that needed them
  • model inputs, outputs, or local scratch files persisting beyond their intended retention window
  • abandoned review artifacts keeping attachments or excerpts that never needed durable storage
  • temporary local exports quietly becoming the unofficial system of record after canonical sync failed once
  • expired approval captions, callback payloads, or destination hints remaining easier to replay than the live coordinator path that should replace them
  • diagnostic bundles that preserve enough environment, route, or token context to recreate an action after the policy window has closed

OpenClaw’s safer pattern is simple: temporary state should disappear by default, while durable state should survive only because a workflow, audit, or recovery need explicitly requires it. Retention policy should follow data class, but it should also follow authority class. The right question is not only "is this sensitive," but also "could this residue still be mistaken for permission, destination knowledge, or action context." That second question catches the dangerous middle ground: artifacts that no longer matter operationally, yet still look authoritative to a hurried operator or a sloppy recovery script. Once a temporary file, rendered preview, callback payload, or plain-text keeper token is no longer the live bindable proof for an action, it should be demoted to ordinary evidence or deleted outright, with the durable receipt preserving only the digest, decision reference, and retirement reason needed to explain why reuse is no longer valid.

A practical rule is to retire temporary state at the same boundary that retires the authority it described, and to name the actor or policy event that made reuse invalid. If a review object expires, its convenience mirrors should expire with it. If a worker is replaced, its local caches and send-ready payloads should not outlive the worker merely because cleaning them up is annoying. If canonical storage returns after a fallback export, the fallback should be reconciled and then removed rather than left nearby as a tempting shadow source of truth. The broader principle is that revocation should be legible in storage, not only in policy. Expired approval artifacts should never be easier to find and reuse than the narrower path that would recreate approval correctly.

The durable record should usually keep the smallest authoritative facts—a digest, decision reference, retiring actor, timestamp, expiry context, retirement reason, and outcome—while oversized payload copies, mirrored review transports, and local fallback exports age out quickly unless a stronger forensic requirement says otherwise. Garbage collection should record that retirement before it deletes the convenience copy, using a monotonically ordered retirement receipt so later recovery can prove reuse was invalid without preserving the reusable object itself. When full payload retention is justified, that should be a conscious escalation with a shorter list of readers, a separate expiry path, and an explicit reason for why compact receipts were insufficient. Otherwise the platform quietly trains operators to trust residue instead of re-establishing authority.

3.7 Observability Without Compromise

Operators cannot secure what they cannot see, but indiscriminate visibility breaks the very boundaries isolation is supposed to enforce. OpenClaw therefore needs observability that is rich in control-plane meaning while restrained in content exposure. The point is not to make every prompt, file, or attachment easy for operators to read. The point is to make boundary crossings, ownership, approvals, and outcome states easy to reconstruct without casually turning the telemetry stack into a second ambient-authority system.

3.7.1 Structured tracing across isolation boundaries

A useful trace should show the lifecycle of an action across boundaries: user or workflow intent, route or session identity, policy epoch, policy evaluation, capability grant, tool invocation, external dependency, completion state, and non-authorizing audit correlation. The trace should not require an operator to inspect raw secret-bearing payloads merely to understand control flow. In OpenClaw terms, an investigator should be able to answer questions such as these from structured fields alone:

  • which worker or session held current ownership when the action ran,
  • which tool boundary was crossed,
  • whether the worker acted from direct user intent, durable workflow state, or lower-trust retrieved content,
  • whether an approval or escalation record was required and satisfied,
  • whether policy denied, narrowed, or expired the request before execution,
  • and whether the result was proposed, blocked, queued, provider-accepted, effect-confirmed, or still reconciliation-pending.

Structured events should also keep tool-local execution truth separate from downstream effect truth. A command that exited zero, a provider that accepted a request, a reviewer who approved one pending transition, a policy gate that denied or narrowed a request, and a destination that later confirmed the effect are five different facts, not one flattened success state. Good traces should make those receipts readable in order, with monotonic sequence identifiers rather than timestamp guesswork: who asked, which policy or review surface granted authority, what the runtime actually attempted, what verifier observed the result, and what the outside world later confirmed. They should name the artifact or proposal under review, preserve whether that approval was still bindable when execution began, and point to immutable identifiers rather than embed replayable payloads or live credentials. Correlation handles should join evidence, not become evidence, and should not be accepted as selectors that can replay the action they help investigate. Evidence should explain why authority existed without turning the logging plane into a second execution path or approval source.

That discipline matters most in multi-tool chains, where causality is otherwise easy to flatten. If a browser fetch leads to a file read, which stages a draft, which then proposes a message send, the trace should preserve that sequence instead of collapsing everything into sent or approved. Operators need to see whether the outbound step flowed from direct user intent, trusted workflow state, or lower-trust retrieved content, and whether the final side effect actually closed. Without that chain of custody, post-incident analysis becomes guesswork, and a runtime that merely looked authorized because an old review event existed in the logs can be mistaken for one that truly held current authority.

3.7.2 Privacy-aware monitoring and metrics

Metrics are often treated as harmless because they are aggregated, but repeated low-level measurements can still reveal usage patterns, tenant activity, private document identity, or the existence of sensitive escalations. In shared or semi-shared agent deployments, privacy-preserving telemetry is therefore a real isolation control, not just a research nicety.

The safest pattern is to export what operators need for reliability and abuse detection while refusing to let dashboards turn into transcript browsers by accumulation. That usually means aggregating by role, lane, boundary class, or outcome state rather than by human identity or artifact title. It also means being careful with labels: a metric named after a chapter slug, customer record, recipient handle, approval object, or destination address can leak almost as much as the payload it avoided storing. Once those labels are easy to join across dashboards, traces, and alert payloads, the monitoring stack quietly becomes a shadow transcript system and, worse, an index into private work.

OpenClaw benefits from keeping high-cardinality identifiers in the evidence layer and low-cardinality health signals in the monitoring layer. A useful rule is that operators should be able to answer "Is something wrong, where is it wrong, and which authority boundary is involved?" from metrics alone, but not "Which private draft, recipient, source document, or pending approval is this?" When deeper diagnosis is required, operators should pivot from aggregate telemetry into a narrower audited evidence view rather than treating Prometheus-style labels, tracing tags, or log search as a standing entitlement to private context.

This distinction matters most during incidents, when teams are tempted to widen visibility in the name of speed. A safer design gives alerting systems stable opaque correlation handles and counts of affected lanes, then requires an explicit authorized step before an investigator can resolve those handles into human-facing titles or content-bearing artifacts. Alert tickets and webhook payloads should carry the same opaque handles, not expand them into the private names, approval tokens, or destinations that dashboards were deliberately denied. The same rule should apply to approvals and escalations: telemetry may say that a review queue is backing up or that a policy gate failed, but it should not expose the approval token, review payload, reviewer identity, or exact private artifact that would let an observer shortcut into action. In other words, the monitoring plane may identify the failing boundary, but it should not by default reveal the private work product that happened to cross it—or the live authority object still waiting on the other side.

3.7.3 Operator access controls and break-glass procedures

Observability systems themselves become privileged targets. Access to traces, logs, and forensic artifacts therefore needs the same least-privilege discipline applied to agent tools. Routine operators may need queue depth, failure counts, stale-owner alerts, and policy freshness signals. Investigators may need deeper evidence under explicit authorization. Very few people should have broad standing access to raw captured content, attachments, or prompt bodies.

A useful operating rule is that break-glass may widen visibility, but it does not widen authority to act. Seeing a private draft, a recipient handle, or a pending review object during an incident must not by itself permit resend, promotion, deletion, or policy override. Just as importantly, any forensic export, screenshot, copied payload, or recovered transcript fragment produced under break-glass should be treated as evidence, not as a spendable input that can be replayed downstream. If incident response needs a state-changing action, that action should still cross its own live approval boundary with fresh justification rather than piggybacking on forensic access.

Break-glass procedures are essential here because incident response sometimes requires exceptional visibility. But “exceptional” must be real: time-bounded elevation, explicit justification, strong audit trails, and post-incident review. OpenClaw should also record the break-glass act itself as security evidence, including who elevated, which case or incident it served, what scope was unlocked, and what data class was exposed. Just as importantly, the elevation should expire back to ordinary operator scope without leaving behind cached exports, durable session residue, or silently broadened standing roles. Otherwise the debugging path quietly becomes a permanent backdoor around isolation.

After break-glass closes, any copied handles, reconstructed payloads, or investigator notes that helped explain the incident should be reviewed as residue before normal work resumes. The platform should either retire them as evidence or rebind them through the ordinary approval path; it should not let an emergency view become tomorrow's convenient selector.

3.8 Performance Optimization

Isolation controls that are too expensive will be weakened in production. The practical security question is therefore not whether overhead exists, but whether the platform can absorb it without pressuring operators to bypass the boundary. Performance tuning becomes a security topic the moment a team starts saying things like “we disabled the fresh worker spawn because it was slow” or “we let the same runtime keep the broad credential because re-auth was annoying.” OpenClaw should optimize for cheaper honest paths, not for hidden authority shortcuts.

3.8.1 Startup latency reduction through pre-warmed pools

Pre-warmed sandbox pools can reduce tail latency, but they should warm trusted base images and policy scaffolding rather than preserve prior tenant state. Reuse should accelerate clean initialization, not reintroduce cross-session residue. The simplest design test is this: a warm slot may inherit prepared capacity, but it may not inherit remembered legitimacy.

In practice, a reusable pool entry should be thought of as a blank lane with cached infrastructure, not as a half-alive prior worker waiting for a new prompt. Before reassignment, OpenClaw should invalidate old grants, clear task-local scratch space, reset route or ownership bindings, and confirm that any cached tool adapters or provider sessions are still within current policy. Any state that answers "who am I allowed to act for right now?" or "where may I send this next?" must be re-attested at assignment time, not trusted because the slot was already warm.

The dangerous ambiguity is usually not in obvious secrets but in warm-start conveniences that feel too operational to count as authority. A retained browser login, pre-open outbound session, remembered review-object handle, or provider adapter that silently resumes the last scoped grant can all compress the exact pause where policy was supposed to ask a fresh question. Once reassignment skips that pause, the pool is no longer only saving startup time. It is carrying forward a conclusion about identity, destination, or approval that the next job never independently earned.

A stronger pool discipline therefore treats warm capacity and live authority as different resource classes. Capacity may be reused eagerly; authority must be re-minted or rebound deliberately. One practical way to state the rule is that a pool may remember how to start, but it may not remember whom it still serves. Cached binaries, dependency layers, and sealed base images are good warm-state candidates because they are impersonal. Session cookies, recipient handles, pending review transitions, and tool grants are bad candidates because they answer the next job's most security-sensitive questions before the coordinator or policy layer has had a chance to do so.

Pool health checks should therefore prove absence as well as readiness: not only that the slot can accept work, but that no previous owner, destination, approval handle, or outbound session remains bindable.

Otherwise performance work quietly becomes authority residue: the platform starts treating old grants, remembered destinations, stale provider sessions, or previously approved targets as if they were fresh permission. Warmth is valuable, but only if the boundary between prepared infrastructure and spendable legitimacy stays bright enough that operators can explain exactly what was accelerated and exactly what had to be freshly re-authorized.

3.8.2 Density optimizations and shared-memory risk

Density improvements are valuable, but they should be judged against the actual blast radius they widen. Shared-page deduplication, common caches, pooled browser profiles, shared temp directories, or merged telemetry buffers can all look operationally efficient while recreating cross-worker observation or residue paths that isolation was supposed to remove.

The right question is not whether a workload is technically multi-tenant. It is whether two jobs with different trust or authority levels can influence one another through shared optimization state. A practical design test is this: after the densest safe packing you can justify, can one worker still learn, revive, or steer another worker's identity, approval, or destination facts? If the answer is yes, the optimization is not merely efficient; it is authority-carrying.

That test exposes a common operational self-deception: teams often describe dense packing as harmless because the shared layer is "only metadata" or "only a performance cache." In practice, metadata is exactly where remembered legitimacy hides. A reused browser profile that remembers the last tenant's handles, a placement heuristic that keeps sending the same sensitive jobs back to the same lane, or a telemetry buffer that preserves artifact names and pending review IDs can all answer the question a fresh boundary was supposed to force back through policy: what was this worker already on its way to doing? Once shared density state can answer that question, it is no longer background infrastructure. It has become part of the authority story.

The cleaner editorial distinction is not simply shared versus unshared. It is whether an optimization is anonymous, single-epoch, or authority-shaped. Anonymous acceleration helps every worker in the same impersonal way: a base image, a read-only dependency cache, a precomputed model weight, a generic font atlas. Single-epoch state may exist briefly for one worker or one narrowly bound task, but it must be torn down or re-proved before a different tenant can benefit from it. Authority-shaped state is the dangerous category: pooled browser profiles, destination-affinity heuristics, review thumbnail caches, prompt-shaped temp stores, or any routing metadata that becomes more useful precisely because it remembers who the last job was serving.

That taxonomy matters because teams routinely misclassify authority-shaped residue as performance infrastructure. The moment a shared layer can preserve browser cookies, review-object hints, destination handles, prompt residue, rendered attachment previews, or task-shaped placement affinity, it has stopped being neutral acceleration and started acting like a shadow authority store. Operators need a firmer accounting rule here: every shared optimization surface should be classed either as anonymous acceleration, tightly bounded single-epoch state, or per-job evidence. If a team cannot name the class honestly, the surface should be treated as authority-shaped until it is redesigned or partitioned. Nothing in between should be allowed to float ambiguously as "just cache," because ambiguous cache is exactly how authority residue survives architectural review.

The design consequence is sharper than "avoid leakage." Co-tenancy signals must never become routing hints for future authority. If the platform learns that a worker recently handled a privileged reviewer, a sensitive destination, or a high-trust tool surface, that fact must not make it easier to place the next similar job into the same warm neighborhood. Otherwise the density system quietly starts clustering authority by memory rather than re-establishing it by policy.

Any exception should be recorded as a bounded placement decision with a reason, expiry, and reviewer-visible evidence, not left embedded in a scheduler heuristic that future runs cannot distinguish from ordinary capacity planning.

A useful operator check is to ask what survives a forced reassignment drill. If one worker is torn down mid-queue and its pending work lands on a different lane, the replacement lane may inherit compute budget and public base artifacts, but it should not inherit remembered browser state, destination affinity, pending approval context, or speculative routing hints about what this job was likely to do next. The same test should be applied to lower-level density features such as same-page merging, shared object caches, or host-level memory deduplication: if the optimization makes one tenant's recent secrets, prompts, artifact fragments, or task shape cheaper for another tenant to probe or reconstruct, then the platform has traded memory efficiency for a cross-boundary evidence leak. When operators cannot prove those mechanisms stay anonymous across mixed-authority pools, the honest default is to disable or partition them there rather than keep them on behind "best-effort scrubbing" language. Any optimization that fails that drill is not only a privacy problem; it is a policy-bypass rehearsal.

In OpenClaw, it is often reasonable to share low-risk base artifacts while refusing to share scratch outputs, downloaded content, browser profiles, approval state, or locally rendered review material across workers. Shared optimization state is acceptable only when operators can state plainly what survives reuse and why none of it can answer the dangerous questions: who may this runtime act for, what pending decision may it spend, and which target was it already leaning toward. The honest density goal is therefore narrower than "maximize reuse": maximize reuse only up to the point where adjacency never becomes evidence of shared trust. When teams cannot prove that property, they should spend a little more memory or a little more startup time rather than let density tuning become a covert channel for cross-worker trust leakage.

3.8.3 Accelerators and other privileged execution surfaces

GPU acceleration, shared inference servers, and other privileged execution surfaces complicate isolation because device drivers, shared memory, and scheduler behavior often expose weaker boundaries than CPU-only microVM paths. If agents need accelerator access, the deployment should treat the accelerator as a privileged tool surface with its own admission policy, queue isolation, and evidentiary expectations. The safe default is to describe the fast lane as borrowed capability, not as a place where authority can live.

The useful operator test is not merely "is the GPU shared?" It is whether accelerator reuse can carry authority-shaped residue across jobs: model-side caches that preserve private prompts, pinned memory that keeps rendered artifacts available to the next tenant, scheduler hints that preferentially reconnect a worker to the same privileged lane, or inference gateways that continue honoring an old session as if it were a fresh grant. If the fastest lane can preserve who a worker was serving, what it last saw, or which destination or approval context it was preparing to act on, then the accelerator path is functioning as an authority carrier rather than as neutral compute. At that point the platform is no longer just renting compute cycles; it is letting performance infrastructure remember who should be trusted next.

Batch coalescing deserves the same suspicion: combining jobs for throughput must not let one request's destination, reviewer, prompt residue, or side-effect callback become scheduling context for another request that never earned those facts. If mixed-priority requests share a batch, the batch boundary should carry the least authority of its members, not the most convenient callback or destination among them.

Batch receipts should also stay per-request: a shared accelerator success can prove that a batch ran, but it should not imply that every member retained the same approval, destination binding, or effect authority after coalescing.

For high-consequence work, the honest answer may be that a slower CPU-bound lane is safer than a denser accelerator lane whose boundary semantics are harder to prove. That tradeoff is not theoretical. Many teams discover that their fastest path is also the path with the weakest tenant separation, least transparent scheduling, or broadest shared cache behavior. In OpenClaw, that should usually mean reserving accelerator lanes for narrowly scoped transforms and forcing any approval-bearing, destination-bearing, or identity-bearing step back through a fresher, more inspectable boundary before side effects are allowed to close. A useful design rule is to make accelerators produce intermediate results, never final authority: embeddings, summaries, classifications, or render outputs may return from the fast lane, but approval state, destination binding, token attachment, and irreversible tool execution should re-enter a boundary whose trust story operators can actually explain. Even when the accelerator only emits a rendered artifact or model result, any attached callback handle, signed upload URL, or resumable provider session should be stripped or reissued before downstream action resumes; otherwise the fast lane has smuggled authority back under the cover of output. Device attestation can help prove which accelerator lane produced the result and what software state it booted, but it does not prove that the current owner, approval window, or side-effect target is still valid; those authority facts still have to be rebound at the control plane before the result can spend anything. Attestation may reduce who can inspect the lane, but it must not create an opaque shortcut around the same approval, destination, and freshness checks.

3.8.4 Balancing security granularity with resource efficiency

The goal is not maximal compartmentalization at any cost. It is to spend isolation where consequence concentrates. High-risk actions should cross explicit gates, while low-risk internal steps should not pay orchestration costs merely to create the appearance of rigor. Good security architecture does not count containers; it maps boundaries to blast radius.

For OpenClaw, that usually means allowing cheap clean lanes for local reads, drafting, and bounded analysis; using stronger isolated runtimes for tool-dense or attacker-exposed work; and preserving the strongest gates for irreversible egress, destructive mutation, elevated execution, and authority transfer. The key design question is not "how many boundaries can we afford?" but "which step would become hardest to explain after an incident if we fused it with its neighbors?" A useful operating rule is simple: under stress, drop convenience before you drop separation. Merge queue classes, shorten speculative prefetch, or skip nonessential previews first; do not merge browser profiles, let workers inherit broad credentials, or treat expired approvals as reusable merely because the system is busy.

Just as important, overload handling should preserve that ordering. Under queue pressure or latency spikes, the platform may defer, shed, or downgrade non-critical work, but it should not silently collapse approval, freshness, or tool-boundary checks in the name of throughput. A degraded mode is only honest if it remains legible about which authority boundaries are still intact, which work is being refused until those boundaries can be re-established, and which shortcuts were consciously not taken. Refusals during overload should remain durable negative evidence rather than disappearing as queue noise, because later recovery depends on knowing which action was delayed and which action was never authorized. Resource efficiency is real, but the cheapest architecture after an incident is usually the one whose operators can still reconstruct why a sensitive action was allowed at all.

Degraded-mode receipts should also name the boundary that was preserved, not only the service objective that was missed, so recovery does not reinterpret a timeout, queue shed, or delayed render as an implicit approval to take the faster path next time.

When the system must choose between a missed service objective and an unexplained authority shortcut, the missed objective is the safer failure. Latency can be retried, rescheduled, or explained to an operator; a fused boundary that leaves no clear proof of why a side effect was allowed cannot be repaired after the fact.

3.9 Case Study: Containing a Compromised Background Worker

A more representative OpenClaw failure case is not a fictional megaplatform breach. It is a narrower but realistic governance problem: a background worker that was spawned for useful drafting or coding work begins operating from stale assumptions or untrusted content and starts proposing actions outside its lane. The value of isolation is that this should be inconvenient, not catastrophic.

3.9.1 Requirements: drafting, repository access, and outbound messaging

Assume a main session delegates a documentation fix to a coding runtime while a separate worker gathers reference material from the web. The coding runtime needs repository access and test execution. The research worker needs retrieval and summarization. Those are already different authority classes, and the distinction matters: the ability to modify a working tree or run tests is not the ability to publish, notify, or spend human intent outside the machine.

A safe design therefore keeps each grant narrow enough to name its object and its closure. The coding runtime may edit the repository and produce local artifacts, but it does not own release channels, recipient identities, or durable approval state. The research worker may retrieve and condense source material, but it should hand back citations, notes, or candidate excerpts rather than live destinations or send-ready payloads. Neither worker should hold blanket authority to message external recipients, publish results, or reuse the other worker's context as if it were approval.

3.9.2 Isolation topology: coordinator, coding runtime, and approval gate

A safe topology keeps the main session as coordinator, places implementation work in a specialist runtime, keeps research in a narrower worker, and routes any external send or elevated execution request back through an explicit approval boundary. Just as important, workers must be unable to promote one another's outputs by implication. A research worker may attach context to a draft, and a coding runtime may render a figure or produce a diff, but neither act upgrades the result beyond proposal status. Promotion happens only when the coordinator deliberately rebinds that output to the current task step, artifact version, destination, and allowed next transition. Workers may manufacture candidate work; only the coordinator may mint spendable authority over what happens next.

That is why the coordinator, not the worker, owns the live review object and the human-facing caption that projects it. The exact ..._review label and the matching ..._keep, keep, approved, or send-authorization reply are not magical strings; they are lookup handles into a still-live decision record. In a serious implementation, that record binds at least the artifact identity, the destination class or exact recipient, the side-effect class, the approving principal, the current task step, and an expiry window. The plain-text word approved is therefore evidence that a bound decision may exist, not the decision itself and never a portable permission slip. The line that matters is control over meaning, not control over syntax: the worker may prepare what is being judged, but it must never also decide that a human utterance, button press, or reaction now counts as spendable authority. If the coordinator is replaced or resumed after an outage, the first act should be to rebind any pending review object from durable state before accepting worker claims about what was already approved. Until that rebind succeeds, worker-supplied approval summaries should remain incident notes, not spendable state.

Seen this way, the approval gate is not just a prompt for human confirmation. It is a one-way membrane between candidate work and executable consequence. Workers can push proposals toward the membrane, but they cannot pull authority back through it by quoting the reviewer to themselves, replaying a button event out of context, or attaching an old keep token to a newly rendered asset that merely resembles the last one. The coordinator is the only component allowed to answer the security question in full: approved for what, by whom, against which exact object, for which next transition, and before what expiry.

Buttons, reactions, and free-text replies are therefore transport surfaces for one decision, not separate wells of permission. If a UI control fails and a reviewer answers in plain text instead, the runtime should accept that fallback only by proving that the reply still names the same pending review object, the same artifact digest or keeper identity, the same requested transition, and the same live expiry window. A token that bound v2 must fail closed against v3 even when the caption wording still looks familiar. The important discipline is that acceptance vocabulary remains a decode table, not an authority source: ..._keep, keep, approved, or a natural-language acceptance may all count, but only as alternate ways of locating one still-live bounded decision. Put more sharply: plain text is a recovery path for an existing decision record, not a shortcut around one.

Durable task state should preserve that chain of custody in terms responders can actually audit: which worker owned the step, which artifact version was under review, which caption exposed it, which reply token or natural-language acceptance mapped to which transition, and whether that transition was still live or had already been spent. The audit burden cuts both ways. A system should not claim approval merely because it found a familiar token, but it also should not claim no approval merely because one button callback went missing if the same decision could still be proven through the review object or an allowed plain-text fallback. It should also preserve the system's current authority state with enough precision to stop wishful thinking: proposal, bindable approval, executed request, and confirmed effect are different operational facts, not cosmetic labels. A proposal may still be awaiting review. A bindable approval may still fail at execution time. An executed request may still lack downstream confirmation. Once those states blur together, transport resilience stops being a reliability feature and starts becoming authority drift: a helpful fallback channel quietly turns into a shadow approval plane the architecture never meant to create.

3.9.3 Incident response: revoke egress, preserve evidence, and respawn narrowly

If the research worker or coding runtime begins drifting—for example, by trying to turn scraped content into an outbound send, by attempting to spend a stale approved reply against a newer artifact, or by requesting broader execution than the task requires—the platform should first revoke the suspect egress path, freeze the worker's recent evidence trail, and only then respawn a narrower replacement from durable state. Revocation has to break meaning, not just transport: close the outbound channel, invalidate the live destination binding, retire the pending review handle, and cancel any pre-open provider session or queued side-effect request that could let the same intent reappear through a different surface. The sequence matters because incident response is often a race. If teardown happens before destination, session, and approval state are actually voided at the control plane, the replacement worker may wake up clean while the old authority is still spendable somewhere else. Containment comes before convenience, because a fast restart that inherits half-trusted state is just a cleaner-looking compromise.

The replacement worker should begin in a downgraded execution class, not in a quietly re-authorized one. It may inspect the checkpoint, restage the artifact, or surface the blocker, but it should remain read-only or approval-blocked until fresh grants and a live review binding exist again. Recovered drafts, cached destinations, browser sessions, and prior approval captions may help responders reconstruct the failure, but they must not silently repopulate the new worker's outbound authority. In incident handling, evidence should survive the reset; permission should not. The reset should therefore preserve a forensics-grade account of what the worker attempted while deliberately destroying anything that still behaves like a reusable send path.

Just as important, recovery needs a restart contract that operators can apply under pressure. A fresh worker should inherit content and diagnostics selectively, not ambient continuity. It may receive the draft that was in progress, the trace that showed where policy objected, and the exact artifact digest that was under review. It should not inherit open sockets, browser identity, remembered recipient picks, half-consumed approvals, or background assumptions about which side effect was "probably" next. A clean restart is not merely a new process; it is a deliberate narrowing of what the new process is allowed to presume. In practical terms, the restart bundle should answer only three questions: what work survived, what proof failed, and what fresh approval or grant is now required before anything can leave the box again.

The scheduler should treat that restart bundle as quarantined input, not as a ready-to-run continuation. Its job is to place the replacement in a lane whose authority is no wider than the surviving proof, even if the old lane still has warm capacity, cached context, or a tempting partially completed request. If the bundle includes a denial or revocation receipt, that receipt should constrain the replacement's first action rather than merely explain why the previous worker stopped. If revocation cancelled a pre-open provider session or queued side-effect request, the receipt should name that cancelled handle so the replacement can prove it is not resuming a still-spendable path. If only part of the restart bundle validates, the scheduler should preserve the surviving content as input while forcing every missing authority field back through the coordinator. If the restart bundle names a destination but lacks a fresh destination binding, the replacement may describe the intended recipient in evidence, but it must not reopen that route as the next send target. If the replacement needs to ask for approval again, it should expose a new review handle rather than recycling the compromised worker's caption, so responders can distinguish resumed work from resurrected authority.

The preserved evidence should say exactly which proof line failed, and it should say so in a form responders can keep separate from restart inputs. Did policy deny the widened send? Did bindability fail because the surviving reply named v2 while the worker tried to promote v3? Did the review binding fail because the artifact digest changed even though the caption still looked familiar? Did the tool run but stop before any side effect closed? Did a provider accept the request while destination confirmation remained absent? Those are not cosmetic distinctions. "The worker stopped," "the request executed," and "the wrong destination was confirmed" are different incident states with different containment obligations. The clean operating pattern is to maintain two explicit bundles. The evidence bundle keeps logs, traces, screenshots, artifact digests, and failed decision bindings so responders can reconstruct what happened. The restart bundle carries only the minimum safe continuation inputs: the surviving draft, the current artifact identity, the blocker explanation, and nothing that still behaves like permission. Once those bundles blur together, the handiest forensic clue becomes the next worker's implicit authority, and recovery quietly recreates the very confusion containment was meant to break.

Recovery should therefore treat stale approval text, cached browser profiles, pre-open provider sessions, restored checkpoint hints, and surviving plain-text keeper tokens as authority residue: useful for forensics, but not valid permission for the next action. Even an incident-era keep that survives in logs belongs to the evidence trail, not to the next authority window unless the coordinator deliberately rebinds it to one still-live pending transition. Resemblance is not rebinding: a reply that looks semantically right but cannot be attached to the current review object must fail closed, even when a human operator can infer the likely intent.

That distinction becomes especially important when teams are under delivery pressure and the human remembers exactly what they meant. A remembered intention and a live authorization are not the same operational fact. The transcript may prove that the reviewer once preferred this artifact, but after containment it does not prove that the same artifact, destination, and next side effect should still proceed automatically. If responders decide the work should continue, they should mint a fresh review object from the preserved artifact and ask for a new plain-text approval tied to that object, rather than replaying remembered intent from the compromised path. That is the payoff of layered isolation in OpenClaw: the system can keep the work, discard the authority, and resume from a legible checkpoint without pretending that old meaning survived the reset.

3.10 Future Directions

OpenClaw’s current model is already stronger than the ambient-authority patterns common in agent systems, but the design space is still moving. The next improvements matter less because they sound advanced than because they could make boundary claims easier to prove, easier to exchange, and harder to erode under operational pressure.

3.10.1 Formal verification of isolation properties

Policy engines, tool adapters, and sandbox launchers increasingly deserve machine-checkable guarantees. Formal methods are most useful where the system must prove negative claims, not merely exhibit happy-path success: that a capability can only attenuate as it crosses tool boundaries, that a review-scoped action cannot outlive the artifact and decision object that authorized it, and that recovery paths fail closed when policy evidence is absent, stale, or merely phrased like the real thing. The goal is not mathematical prestige. It is to replace architectural confidence with a correspondence claim the runtime can actually defend: this reviewed artifact may authorize only this transition, within this scope, before this expiry, through this relay path, and only while the authoritative approval surface for that decision window still says the decision is live.

That proof line matters because modern agent failures often happen less in obviously broken sandboxes than in translation layers that quietly rewrite meaning. The dangerous move is semantic widening: observation becomes permission, mirrored approval text becomes authoritative issuance, or a remembered checkpoint becomes a live grant. Those are not cosmetic mistakes. They are category errors in which descriptive evidence is silently upgraded into executable authority. A useful verifier would therefore do more than prove a component behaved locally correctly. It would prove that policy meaning survives serialization, relay, caption changes, and adapter hops without acquiring authority the source decision never granted.

In practice, the strongest verified property may be the one that sounds almost plain: every action that crosses a trust boundary should remain explainable as the unique consequence of an earlier bounded decision, with no hidden reclassification step in between. If the runtime cannot show which policy object minted the grant, which artifact or target it named, which transition it allowed, whether that grant was still live, and why no later transport rewrite or approval paraphrase changed its meaning, then the isolation proof is incomplete. The sandbox may still hold, but the authority story has already leaked.

3.10.2 Confidential computing for agent model weights

Where model prompts, weights, or sensitive context require stronger infrastructure trust assumptions, confidential-computing primitives may reduce operator visibility into raw execution state. They are not a complete answer, but they can narrow who must be trusted. Their real promise for agent systems is selective concealment without surrendering control-plane proof: operators may need attestation that the right policy bundle, runtime identity, and measurement were present even when they cannot inspect every token the model saw.

That benefit only matters if attestation remains an admission check rather than becoming a substitute for authority review. An enclave measurement can help prove what launched, but it does not by itself decide what that runtime may spend or whether exported output is still bound to the same reviewed artifact. OpenClaw-style systems would still need separate evidence for tool scope, destination binding, approval freshness, and effect closure. Otherwise the platform simply trades one opaque trust surface for another: instead of blindly trusting operators, it starts blindly trusting a quote.

The research opportunity is therefore not “put the model in an enclave and declare victory.” It is to combine concealed execution with legible control-plane boundaries so a later auditor can still answer the questions that matter: which measured runtime held the data, which policy object scoped its tools, which approval was live at action time, and whether any exported summary, embedding, or downstream request carried more authority than the concealed computation was meant to expose. That is also the line between attestation and abdication: a quote may prove the box is genuine, but it must not become a shortcut around review, destination checks, or fresh grants. Sealed execution should make raw context harder to inspect, not make returned outputs harder to classify, bind, revoke, or refuse. Confidential computing is promising precisely when it reduces visibility without reducing accountability.

3.10.3 Standardization efforts and interoperability challenges

The industry still lacks shared standards for capability descriptions, audit semantics, provenance tags, and cross-runtime policy exchange. That gap does more than slow integration work. It forces each platform to reinterpret security verbs such as approved, scoped, revoked, read-only, or keeper at the exact moment mistakes are most expensive: the handoff where authority, not just information, is being spent across different trust models. In practice, the translation layer becomes a hidden policy engine. If its assumptions are loose, interoperability stops being a convenience feature and starts reintroducing ambient authority under a cleaner label.

The real requirement is semantic and evidentiary portability, not mere interface portability. One system may expose a button click, another a callback payload, and a third a plain-text reply such as ..._keep; those are transport surfaces, not authority by themselves. A shared caption cannot tell the receiver whether authority is fresh, mirrored, already spent, still bound to the same artifact version, already consumed by a different next action, or already narrowed into a local-only step that never authorized the broader effect now being attempted. They may all point at the same human decision, but they do not carry equal security weight unless the receiving runtime can distinguish authoritative issuance from mirrored observation, relay artifact, or reformatted transcript. The dangerous failure mode is not simple wording drift. It is lexical agreement without security agreement: two runtimes can both say approved while meaning different things. In one system, the word names a still-live review object bound to a specific artifact and transition. In another, it means only that similar text appeared somewhere in the conversation. Once that distinction collapses, interoperability stops transmitting evidence and starts laundering ambiguity.

A safe standard therefore needs something closer to a decision envelope than a shared caption. The envelope, not the caption, must be the interoperable unit. It should preserve the binding facts that must survive transport changes: which review object was live, which artifact digest was under review, which actor or role was allowed to decide, what scope the decision covered, which destination class or exact recipient that decision was allowed to reach, when it expired, whether it had already been consumed, which downstream effect was actually being attempted, and which evidence class and authoritative surface remained valid for that attempt. It should also preserve the separation between three different truths: decision evidence existed, execution was actually attempted, and the downstream effect was or was not later confirmed. Negative decisions need the same portability: a denial, revocation, narrowing, or failed freshness check must travel as a blocking fact, not disappear because the receiver only models positive approvals. The receiving side should be able to reject the handoff for one missing field without guessing the rest from a familiar token or caption shape, and it should fail just as hard when the destination class widens under the same approval words. Compatibility that preserves bytes but not those meanings is not interoperability; it is a downgrade in security semantics. Just as importantly, it should say which surfaces merely observed, mirrored, relayed, or reformatted that decision. Without that distinction, a receiver that sees a familiar token is no longer reading provenance; it is guessing that resemblance implies permission. When a fallback approval arrives as plain text, the envelope should carry the original reply and the exact object it resolved against, not merely a normalized approval label, so later receivers can audit why that text counted in one decision window and not another.

Refusal reasons belong in the same envelope. A receiver should know whether a handoff failed because the grant expired, the artifact digest changed, the destination widened, the approval had already been spent, or the authoritative surface could no longer be reached, because those cases call for different recovery behavior. The envelope should also name the only safe recovery class--refresh approval, re-render the artifact, narrow the destination, reconcile consumption, or retry the authority lookup--so a generic handoff failure cannot be treated as permission to improvise. A refused envelope should remain durable evidence of the boundary working, not vanish as an integration error that the next runtime is tempted to paper over. Any human-readable refusal caption should remain a summary of those fields, not the portable object itself, because a receiver that cannot parse the refusal envelope also cannot know which recovery path is safe. If a retry later succeeds, it should link back to the refused envelope it superseded, so recovery proves which blocking fact changed instead of making the earlier boundary decision look spurious. Envelope version negotiation should fail in the same direction: if a receiver cannot understand a required authority field, it may preserve the artifact as evidence, but it must not downgrade the envelope into a looser local approval. The same rule should apply when a receiver cannot confirm the issuer's current revocation source: preserving the envelope as provenance is safe, but spending it as present authority is not. A cached "not revoked" answer should carry the lookup time and issuer epoch that produced it, because it proves only that one earlier check passed, not that the grant remains spendable after failover, outage, or policy rotation. If the envelope crosses into a runtime that cannot refresh that issuer epoch, the receiver may keep the artifact and refusal trail as provenance, but it must not treat the cached revocation result as a transferable green light.

That is the architectural bar most cross-agent protocols still miss. They standardize message shape before they standardize decision meaning. A callback schema, webhook signature, or transcript export may prove that one runtime sent data to another, but it does not by itself prove that a live grant crossed with the same scope, freshness, and spend rules intact. A serious interoperability layer must therefore carry not just the approval artifact, but also the conditions under which that artifact still counts. If a receiver must infer which surface was truly authoritative, the protocol has already failed closed-world reasoning. If those conditions cannot be validated at receipt time, the safe behavior is refusal rather than best-effort interpretation.

The most useful standards will preserve authority semantics rather than just transport format. A portable approval should arrive with enough evidence to answer the operational questions that matter at handoff time: what artifact was reviewed, what scope was granted, what transformations or relays intervened, when the grant expires, whether it has already been consumed, which side effect was attempted, and what proof shows whether that attempted effect actually closed. Interoperability should therefore be judged by preserved security meaning—artifact, scope, expiry, attempted side effect, and evidence—not by transport compatibility alone. Put differently, portability is only real when the receiver can tell whether it has been handed a live grant, a mirrored record, or a stale transcript fragment. A standard that omits consumption state turns replay resistance into guesswork. A standard that omits revocation state turns emergency containment into local folklore, because each receiver must invent its own guess about whether yesterday's grant still blocks or still spends. Transport compatibility without spend semantics is only caption forwarding with better syntax. If a standard cannot answer those questions, it is not standardizing authority. It is standardizing a more legible way to lose it.

The same envelope should make partial recovery explicit. A receiver that can validate the artifact digest but not the destination binding may be allowed to keep the draft as evidence or input, but it should not silently preserve the old send path; partial proof should narrow the next action rather than revive the missing authority by implication. In practical terms, preserving a draft is not the same as preserving a queued side effect; the missing destination binding must remove the send affordance until a fresh destination-bound grant exists. Partial validation should also remain visible in the refusal record, so a later retry cannot mistake "some fields checked out" for a complete grant. A receiver that accepts artifact identity but cannot validate consumption state, revocation state, or authoritative surface should record exactly that partial truth instead of collapsing it into either approval or generic failure. If the receiver narrows the next action after partial validation, that narrowed action should receive its own fresh evidence line rather than inherit the envelope identifier that failed.

3.11 Chapter Summary

Agent isolation is not one mechanism. It is a layered discipline for keeping three kinds of fact from collapsing into one another: what the model proposed, what the runtime was authorized to do, and what the system can later prove actually happened. Sandboxing limits reach. Capability policy limits spend. Provenance, review objects, and effect records preserve meaning across relays, retries, and interface changes. OpenClaw’s contribution is to make those layers cooperate as one authority story rather than as a pile of unrelated hardening tricks.

For practitioners, the chapter’s checklist is straightforward:

  • choose runtime isolation strength to match consequence, not habit
  • treat every tool as its own capability surface with scoped spend rules
  • mint short-lived grants instead of inheriting ambient authority
  • bind approval-bearing actions to a live review object, current reviewer, owner freshness, artifact identity, artifact version, artifact digest, transition, destination class or exact recipient, effect-confirmation target, evidence class, authoritative approval surface, consumption state, canonical-record target, and expiry rather than to a transport surface alone
  • treat plain-text approval aliases as lookup handles into that live review object, not as portable authority
  • mark a keeper token as consumed once it has bound a specific artifact and transition, so the same reply cannot approve a later side effect by resemblance
  • preserve fallback approval text exactly enough to audit the artifact, caption, token, and binding fields it tried to resolve
  • treat keeper captions as binding evidence for the named rendered artifact, not permission for later regenerations or sibling variants
  • record approved keeper assets as immutable review outcomes until an operator explicitly opens a new versioned review
  • record orphaned approval replies as evidence with their attempted binding fields instead of attaching them to the nearest plausible pending review
  • rebind pending review objects from durable state after coordinator resume before accepting worker-supplied approval summaries
  • preserve provenance so observation, relay, and transcript reshaping cannot silently become permission
  • keep policy decision, execution attempt, and downstream confirmed effect as separate truth lines so unknown or unconfirmed outcomes are recorded as such instead of flattened into success
  • carry refusals, revocations, and failed freshness checks as durable boundary evidence rather than dropping them as transient delivery errors
  • require fallback adapters to preserve denied consequence classes as constraints, not remap them into friendlier tools or providers
  • make degraded-mode receipts name the preserved boundary, not only the missed service objective
  • treat missing revocation-source freshness as provenance-only until the issuing control plane can be checked again
  • treat cached "not revoked" answers as time-stamped evidence, not proof that a grant remains spendable after policy rotation, failover, or outage
  • preserve artifacts as evidence, not authority, when a receiver cannot understand a required envelope field
  • link any successful retry back to the refused envelope it superseded so recovery proves which blocking fact changed
  • treat over-redacted receipts as evidence failures when every binding field has been removed
  • repair mistaken audit evidence with linked append-only corrections rather than silent replacement
  • keep dashboard rollups tied to source entry IDs and freshness time instead of letting them replace authority records
  • require fresh destination-bound review before retrying a failed send whose payload has been regenerated or drifted
  • mint a new grant after later target canonicalization succeeds rather than promoting the earlier refused resolver attempt
  • derive grant expiry from the issuing or revoking control plane, not from worker-local cached time
  • bind retry idempotency to the same canonical target, artifact version, and effect class, not merely to a similar command or queue item
  • treat a retry whose canonical target cannot be revalidated as a new review problem, not as an idempotent continuation
  • make durable state explicit, partitioned, and retention-bound
  • keep evidence bundles separate from restart bundles so forensic residue cannot become the next worker's implied authority
  • name cancelled provider sessions and queued side-effect handles in revocation receipts before respawning replacement workers
  • exclude approval tokens, cached grants, and destination bindings from restart bundles unless they have been freshly rebound to the current work
  • strip or deliberately rebind authority residue before resume, retry, pool reuse, or failover
  • keep accelerator batch receipts per-request so shared success cannot imply shared approval, destination, or effect authority
  • make accelerator outputs intermediate evidence, not final authority to spend approvals, destinations, or side effects
  • treat accelerator attestation as lane evidence, not proof that owner, approval window, or side-effect target is still current
  • let partial proof narrow the next action rather than revive missing authority by implication
  • record which fields partially validated so a retry cannot mistake incomplete proof for a complete grant
  • issue fresh evidence for any narrowed action after partial validation instead of inheriting the failed envelope identifier
  • treat performance capacity as reusable only when it does not carry owner, destination, approval, or policy facts into the next job
  • make warm-pool readiness checks prove authority absence, not only process health or dependency availability
  • keep alert payloads and dashboard labels from exposing approval tokens, private artifact titles, reviewer identity, or exact destinations by default
  • design observability that supports investigation without casually puncturing the boundary

If those properties hold, an agent failure can remain a bounded event whose cause, scope, and effects stay legible under pressure. If they do not, the next escalation will probably not look like a dramatic break-in. It will look like an ordinary convenience path that still appears valid to the wrong principal even after the binding facts that once justified it—the review object, authoritative approval surface, artifact version, policy epoch, owner freshness, recipient validity, effect-confirmation target, canonical-record target, consumption state, capability scope, or expiry—have drifted or disappeared.

Chapter 3: Agent Isolation | AI Agent Harness Book