Expand description
Per-agent filesystem workspace isolation.
task_context isolates an agent’s state (the
key/value store). This module isolates its filesystem: when parallel
agents mutate files, giving each its own working directory prevents them from
clobbering one another — the file-level analogue of the blog’s
isolation: 'worktree'.
§What the runtime can and can’t do
CAR doesn’t own process execution — the caller’s AgentRunner runs the tools.
So the runtime provisions an isolated directory (or git worktree) and
advertises its path to the agent via AgentSpec.metadata["workspace"]; the
runner is responsible for actually running its file tools relative to that
path. The runtime guarantees provisioning and cleanup (RAII); honoring the
path is a cooperative contract with the runner. This is the honest boundary
for a runtime that validates and orchestrates but does not itself exec.
Structs§
- Agent
Workspace - An RAII handle to a provisioned per-agent workspace. The directory (or git worktree) is removed when this is dropped.
- Workspace
Config - Configuration for per-agent workspace provisioning.
Enums§
- Workspace
Mode - How to provision a per-agent workspace.
Constants§
- WORKSPACE_
METADATA_ KEY - Metadata key under which a provisioned workspace path is advertised to the agent runner.