How processes, paths, credentials and dispatches are confined or recorded while a kit runs.
D1Verify commands run inside an OS sandbox
Stopsa check writing outside the workspace, reaching the network or reading credentials
On macOS the kit drivers run each check under sandbox-exec: writes only to the workspace and a run scratch directory, network denied, credential stores unreadable, and the environment reduced to an allowlist. It refuses rather than falling back when no backend exists, and --exec-mode trusted-host is the named opt-out that reports itself.
Coderun_confined, verify_runner, _CONFIDENTIAL_HOME_PATHS and DEFAULT_ENV_ALLOWLIST in bin/exec_policy.py
Proved bytests/test_exec_policy.py FailClosedTests, EnforcementTests, ProfileRenderingTests; tests/test_proc_runner_wiring.py DriverVerifyWiringTests
The enforcement tests run only where a sandbox is available. Linux and Windows have no backend.
D2Every external process is bounded
Stopsa hung or noisy process, or children that outlive the run
Each process gets a validated working directory, a wall-clock limit, an output ceiling that keeps draining, and a session of its own, so ending it ends its whole process group.
Coderun, validate_workdir and _terminate_tree in bin/proc_runner.py
Proved bytests/test_proc_runner.py WorkdirTests, TimeoutAndTreeCleanupTests, OutputBoundTests
D3A dispatch carries only its provider's credentials
Stopsone provider's agent receiving another provider's keys
The environment handed to a harness CLI is a base set plus that provider's own variables.
Codedispatch_env and PROVIDER_ENV_PREFIXES in bin/proc_runner.py
Proved bytests/test_proc_runner.py DispatchEnvironmentTests; tests/test_proc_runner_wiring.py DriverDispatchTests
D4Paths are contained without a race
Stopsa symlink swapped in mid-operation redirecting a write
Every store, marker and install destination is reached directory-relative with O_NOFOLLOW. Where the runtime lacks directory-relative operations, it refuses instead of using the racy form.
Code_descend and _require_dir_fd in bin/safe_paths.py
Proved bytests/test_safe_paths.py ContainmentTests
The refusal on a host without directory-relative operations has no test.
D5Every dispatch is recorded before and after
Stopsa crash losing track of what ran, or a dead attempt counted as a success
An append-only ledger outside the tree. An attempt with no result is closed as unknown, never as success, and never replayed; a task is claimed with O_EXCL; prior attempts count against the budget. A logged-out CLI or a missing binary stops the run instead of escalating.
Codeclaim, record_started and reconcile_open in bin/attempt_ledger.py
Proved bytests/test_attempt_ledger.py LedgerRecordTests, ClaimTests, CrashAfterDispatchTests, BudgetCarriesAcrossRunsTests
D6Codex review and acceptance are read-only
Stopsa reviewer changing the code it is reviewing
bin/codex_execute.py forces --sandbox read-only on review and acceptance, and refuses extra arguments that would override it or displace the selected model.
Codecmd_review and cmd_accept in bin/codex_execute.py
Proved bytests/test_codex_execute.py EndToEndRunHappyPathTests
The review path is tested; acceptance and the override refusal have no test.
D7Cursor is identified before it is trusted
Stopsdispatching to some other binary that happens to be named agent
--version or about --format json must identify Cursor before any claim, ledger entry or write. Review runs under --mode ask, and arguments that would change the mode, model, workspace or session are refused.
Coderequire_cursor, READ_ONLY_MODE and BLOCKED_EXTRA_ARGS in bin/cursor_adapter.py
Proved bytests/test_cursor_adapter.py IdentityTests, DispatchArgvTests; tests/test_cursor_execute.py IdentityRefusalTests
D8Reviewers get no blanket permission grant
Stopsa review dispatch running with every tool pre-approved
Review carries no blanket grant by default. Claude turns the reviewer's declared tool pin into --allowedTools, and --review-permissions bypass is the named opt-out.
Coderole_permission_profile and allowed_tools_arg in bin/claude_execute.py
Proved bytests/test_claude_execute.py RolePermissionTests; tests/test_copilot_execute.py ReviewPermissionTests
A pin that includes Bash still reaches everything a shell reaches (see Part 4).
D9Concurrent work cannot collide silently
Stopstwo workers' writes merging into a broken tree
Sequential by default. With --max-parallel, each task runs in its own copy outside the workspace, writes are measured rather than declared, a conflicting write applies nothing from that task, a worker that edits the kit is recorded as a violation, and the merged tree is verified again.
CodeDEFAULT_MAX_PARALLEL and snapshot_tree in bin/kit_scheduler.py
Proved bytests/test_kit_scheduler.py SequentialDefaultTests, ConflictTests, MergedTreeTests, SecurityTests
D10A code graph is read as untrusted evidence
Stopsa crafted graph steering reads outside the repository or walking without bound
A graph's source_file must be relative and traversal-free; the graph has a byte ceiling; walks and searches are bounded; git is reached only with read-only verbs.
CodeMAX_GRAPH_BYTES in bin/graph_ground.py
Proved bytests/test_graph_ground.py StampTests, FreshnessTests, ImpactTests