Tool identity and context isolation
Your backend maps business sessions to authorized platform resources; executors also need an explicit caller and execution authority boundary. Customer labels, task UUIDs, separate directories and signed credentials solve different problems. Establish what each layer actually guarantees before integrating.
Where tool identity comes from
| Layer | Current identity and checks | Trust boundary |
|---|---|---|
| Product → public API | OAuth/API Token, tenant and project permissions | Platform checks application authority; your backend authorizes its end users |
| Control Plane → Worker/Gateway | Admitted Task/Run, tool approval, execution claim and lease | Gateway builds execution metadata from the Control Plane claim |
| Gateway → HTTP Executor | Executor Bearer credential, call/execution UUIDs, tenant, Task, Run, filesystem identity and request hash | Relies on a trusted Gateway and protected service network |
| Generic bridge → provider CLI | execution_id, tool, workspace, input_digest, input | CLI v1 carries no independently verifiable Task/Run/project authorization credential |
Outer HTTP fields tenant_id, task_id, run_id, logical_workspace_id and workspace_id come from the approved Control Plane tool claim. Model arguments belong inside request.arguments. Never promote same-named model arguments into execution identity or let the model select executor URLs or mounts.
The current Executor validates its Bearer, UUID formats, execution idempotency key and outcome state. It does not independently query the Control Plane for each task or verify a per-task signature over those fields. Holders of the service credential are inside this trust boundary. request_hash correlates requests and detects conflicts; it is not a message signature. The public HTTP envelope also provides no independently verifiable policy_scope_id project claim.
Can a third-party executor prove business-session ownership?
There is currently no generic per-tool-call JWT/capability that arbitrary third-party Executors can verify, and no signed diagnostic-session claim in CLI v1. MCP OAuth authorizes access to an MCP service; it does not automatically establish this business-session proof.
Platform-managed Executors should accept only permitted Gateways through protected connections, separate service credentials and network restrictions. Keep CLI execution correlation and digest validation, and maintain business-session mappings in a trusted backend. The downloadable CLI example is not an independent task authorization protocol.
An independently operated cross-organization domain service that must verify Task/Run/project/session ownership requires an additional generic execution authorization protocol. It should bind issuer, audience, tenant, project, Task/Run, execution ID, tool/input digest, expiry and replay rules, and define revocation or lease expiry behavior. A trusted backend must register business-session correlation. These are implementation requirements, not fields available in the current interface. Do not fill the gap with customer IDs or long-lived platform tokens inside model arguments.
Choose customer and session boundaries
| Boundary | Current guarantee | Product mapping |
|---|---|---|
| Tenant | Membership, application and data authorization | Separate tenancy for customers needing independent administration and quotas |
| Project | Content and operation authorization scope | Divide by required access and grant matching application permissions |
| Workspace | Long-lived files, snapshots and associated shared context | Separate mutable customer contexts into separate Workspaces |
| Conversation | Session pinned to one Workspace; reuses its Worktree | Persist an authorized mapping for each business session; never reuse across customers |
| Task/Worktree | Execution intent and filesystem branch | Independent Tasks fork the Workspace main snapshot and can inherit existing files |
customer_id and external_subject_hash are correlation values; they do not create these boundaries. Separate Conversations do not create independent tenant authorization either. A backend with broad project access must check end-user ownership before accessing resources. Browser-supplied Task/Artifact IDs must not inherit its broader credentials without that check.
Files, tool state, artifacts and memory
The HTTP Executor namespaces files by tenant and execution workspace_id. When the Task has a Worktree, the Gateway uses its Worktree ID for this execution field and the stable Workspace ID for logical_workspace_id. Do not interchange them. A reused Conversation continues its Worktree; an independent Task may inherit main snapshot contents rather than starting empty. Filesystem branching is insufficient as a customer confidentiality boundary.
Admit only authorized Artifacts and check business ownership again when reading outputs. Artifacts, browser profiles and execution logs have independent lifecycles. Deleting a filesystem branch does not revoke Artifact access or erase the product database. Domain services must isolate their own state using trusted execution correlation, rather than accepting an arbitrary model-supplied global session key.
Shared memory has separate scopes, authorization and publication. Use distinct Workspaces/projects for sensitive customers and restrict shared-memory recall and publication. Never publish customer diagnostics into a mutually visible memory scope. An instruction to handle only the current customer cannot replace authorization.
A Worktree is a filesystem branch: it does not start a VM or provide an OS sandbox against untrusted native processes. Running untrusted code requires separate Docker/VM, mount, process-user, resource and network policies, verified against the actual Host behavior.
Minimum qualification
Before launch, use two controlled customers and sessions to verify these outcomes and retain independent evidence:
- The product backend rejects customer A supplying B's Task, Input Request or Artifact ID; the platform also denies cross-project unauthorized requests.
- A's files, browser profile, domain state and shared memory do not enter B's context. New-session baseline contents match the intended policy.
- Restarts and reconnects preserve the original business-session, Task, Run, Input Request and event-cursor mappings.
- Forged model identity fields cannot change actual execution ownership. Cross-organization verification is not qualified until a generic verifiable authorization protocol is implemented.
These are acceptance requirements, not test results established by this article. See native Tasks and recovery and domain image/tool integration for the corresponding contracts.