# pi · Confinement

> Levels are per column and must not be summed, averaged or ranked. A level states which written criterion the runtime's source meets. It is not a measure of quality or task success. Higher is not always preferable.

Source: "Agent runtime comparison: ten open-source agent runtimes, source review", study of 2026-11-28. Mark notation: `3` is the level in the default deployment; `1→4 [opt: …]` is level 1 by default and level 4 in the named configuration; `s` source-verified, `d` documented or test only. Service dependencies are classes (E embedded, O on demand, R resident service, X external server required), not levels.

- Runtime: [pi](https://ai-agents-review.com/runtime/pi.md)
- Column: [Confinement](https://ai-agents-review.com/column/confinement.md) (Execution controls)
- Mark: 0→2 [alt: Docker / OpenShell / Gondolin (documented)] d
- Default deployment: 0
- Best supported configuration: 2 (alt: Docker / OpenShell / Gondolin (documented))
- Page: https://ai-agents-review.com/cell/pi/confinement

## Rationale

No approvals or OS boundary in the CLI; documented alternative deployments count at B but are capped at 2 (rule 1)

## Rubric criteria for this column

- 0: No restriction: tools run as the user with no approval or policy by default
- 1: Policy or approval layer only (allowlists, approval prompts, reviewer model). No OS boundary
- 2: An OS/container boundary exists but is opt-in, **or** is default-on only for a subset of effect paths, leaving the main shell/file tools unconfined
- 3: Default-on OS-enforced boundary for the main shell and file effects (filesystem writes restricted)
- 4: Level 3, plus network restricted by default **and** children and auxiliary processes (MCP stdio, hooks, cron) confined at least as tightly

## Review finding

None by default. Tools run with the OS user's permissions and no approval prompts; cwd only resolves relative paths. Project trust gates resource loading, not effects. Approval exists only through an extension `tool_call` hook (shipped as an example). [alt: Docker, Docker Sandboxes, OpenShell, Gondolin VM; documented/example]. Codemode scripts run in QuickJS without fs or network. [X110][X111][X112][X113][X114]

## Evidence cited by the mark

- [X110] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/docs/security.md#L1-L9 — no approval before tool calls; safety requires an OS/VM boundary — [D]
- [X111] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/src/core/tools/path-utils.ts#L48-L50 — paths resolved against cwd, not confined — [S]
- [X114] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/docs/containerization.md#L7-L16 — isolation options table (Docker, Docker Sandboxes, OpenShell, Gondolin) — [D]

## Evidence also cited by the review finding

- [X112] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/src/core/extensions/runner.ts#L1261-L1279 — tool_call hook can block — [S]
- [X113] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/examples/extensions/permission-gate.ts#L4-L22 — example permission gate extension — [S]

## Grading record

- Grader A (default / best): 0 / 0
- Grader B (default / best): 0 / 2
- Adjudication: disagreement. No approvals or OS boundary in the CLI; documented alternative deployments count at B but are capped at 2 (rule 1)
