Skip to content

pstack-runner: allow full-access sandbox for Codex writer lanes so they can self-verify #80

Closed

Description

@vacq-am

Current scope (maintainer, 2026-10-13)

Registry unit U7. The decisions are settled: Eric 2026-10-01 (an explicit opt-in, Codex isolated-write lanes only, never enabled automatically), the registry design (an Access sandbox field, --writer-sandbox, receipt writerSandbox), and Eric 2026-10-13 (the sheet setting line). The design-pass comment below has the accepted and rejected points.

Acceptance criteria

  • Given a model sheet with the line codex writer sandbox: full-access, when a parent dispatches an external Codex isolated-write lane, then it passes --writer-sandbox full-access. The Codex argv carries --sandbox danger-full-access, and the receipt records writerSandbox: "full-access".
  • Given no such line, or codex writer sandbox: bounded, when the same lane runs, then argv keeps --sandbox workspace-write and the receipt records writerSandbox: "bounded". Bounded argv never contains a token from the adapter suite's bypass deny list.
  • Given --writer-sandbox full-access on a read-only lane or a provider without that capability, when the runner resolves it, then it refuses before launch. Nothing sets the opt-in after a sandbox failure.
  • Given a native writer (Claude Agent, or Codex spawn_agent on a Codex parent), when the setting is present, then the native route is unchanged. The setting never moves a native lane to the runner.
  • Given setup on a sheet with the setting line, when it reruns, then it keeps the line and does not drop it as a retired role. Setup asks once when the line is absent, and writes codex writer sandbox: bounded after a decline.
  • Bun tests, strict typecheck, static invariants and plugin validation pass.

Live checks

Both harnesses, from the candidate head, with --self-test.

  • runner, Claude parent: an opted-in Codex writer writes a fixture nonce under .agents/ in its cwd, and reads a second nonce by loading a fixture page in headless Chrome. The receipt records full-access. Docker is not required.
  • catalog: from a sheet with feature, refactoring: codex:gpt-6.1-sol@max and the setting line, the parent reports the writer sandbox it would pass: full-access on a Claude parent, which uses the external runner, and none on a Codex parent, which uses native spawn_agent.
  • setup: a rerun keeps the setting line.

Original request

Problem

skills/poteto-mode/scripts/runner/commands.ts maps isolated-write to codex exec --sandbox workspace-write. On macOS that sandbox blocks launching a browser (Playwright/Chromium fails with bootstrap_check_in ... Permission denied), reaching the Docker socket, and writing into dot-folders such as .agents/. A Codex builder lane therefore cannot run the browser or database checks that prove its own work, which the Feature playbook's step 5 ("verify on the matching surface") expects. The user's own Codex config (sandbox_mode = "danger-full-access") is ignored because the flag on the command line wins.

Observed

A poteto-mode Feature run on 2026-09-21: builders reported EPERM on node_modules/.tmp and .vite-temp inside a symlinked worktree, "operation not permitted" writing under .agents/, Chromium launch denied, and Docker unreachable. The orchestrator had to run all browser and database verification itself, and four fixer rounds followed for assumptions the lane could not test.

Request

A configuration knob (for example an access field on the model sheet, an isolated-write-full mode, or an environment variable read by the runner) that lets a writer lane run with danger-full-access when the user opts in. The dedicated worktree already provides the isolation the runner cares about. Until then users must patch codexSandbox() locally and reapply it after every update; the uses bounded write modes without blanket bypasses test pins the current behaviour.

Activity

  1. ericlitman commented on Oct 1, 2026

    @ericlitman
    Owner

    Maintainer decision (2026-10-01): approved as an explicit opt-in. The default stays workspace-write. The opt-in is set in the model sheet, applies only to Codex isolated-write lanes, and is never turned on automatically after a sandbox failure. The configuration surface comes from the registry design in #103.

  2. Repository owner deleted a comment from mast-factory on Oct 2, 2026
  3. ericlitman commented on Oct 12, 2026

    @ericlitman
    Owner

    The #103 registry design was approved on 2026-10-11 (design, PR #154). This issue is unit U7:

    • Opt-in field: the opt-in is a field on writer access, Access = { mode: "isolated-write"; sandbox: "bounded" | "full-access" }, not a third access mode, so "read-only with full access" cannot be built.
    • Codex mapping: the Codex adapter lists isolated-write-full-access in launch.supports and maps it to --sandbox danger-full-access.
    • Runner flag: the runner gains --writer-sandbox <bounded|full-access>, default bounded, and the receipt records writerSandbox. No code path sets the opt-in after a sandbox failure.
    • Open for this issue: the model-sheet syntax for the opt-in.

    This issue now waits on #155.

  4. ericlitman commented on Oct 14, 2026

    @ericlitman
    Owner

    Maintainer decision (Eric, 2026-10-13): the opt-in is a setting line on its own in the model sheet, codex writer sandbox: full-access. With no line, Codex writer lanes stay bounded (workspace-write). Setup asks about it once and keeps the line on reruns. The descriptor grammar provider:model@effort does not change. This settles the open question from the U7 design comment above.

  5. ericlitman commented on Oct 14, 2026

    @ericlitman
    Owner

    Design pass (2026-10-13, Astra high, read-only, on the stacked #182 and #69 branch 9415e5c)

    Record: ~/projects/docs/projects/open-pstack/records/2026-10-13-batch-54/design-80.md (private docs repo).

    Accepted

    • Access = { mode: "isolated-write"; sandbox: "bounded" | "full-access" }, built by one constructor with the default bounded. isolated-write-full-access is a capability key in Codex's launch.supports, not a third --mode. resolveLane refuses full access for read-only lanes and for providers without it.
    • Codex maps only an opted-in writer to --sandbox danger-full-access. The adapter suite still forbids its whole bypass deny list in bounded argv, and asserts full-access argv separately.
    • The receipt records writerSandbox: null for read-only, bounded, or full-access, set centrally in run.ts.
    • One parent rule, in provider-dispatch.md only: read the setting once from the sheet, and append --writer-sandbox full-access only for an external Codex isolated-write route. The five playbooks already delegate through provider dispatch, so they stay unchanged.
    • Setup extracts the setting line before retired-role removal and descriptor validation, and keeps it through rendering and the integration. After a decline it writes codex writer sandbox: bounded, so a rerun does not ask again.
    • Native writers are unaffected. A native lane is never moved to the runner to get full access.
    • "The worktree provides isolation" is corrected: full access promises no filesystem confinement.

    Rejected or narrowed

    • Docker in the live check: Docker is not reachable on the operator's Mac. The .agents/ write and a headless browser cover two of the three reported failures.
    • Live native-writer routing cases and live setup decline-and-rerun cases. Native routing has no code change and is covered by the catalog case on a Codex parent. The decline path is a scripted answer.
    • Randomized role assignments in the setup case. One kept setting line is the outcome under test.
  6. added a commit that references this issue on Oct 14, 2026
  7. added 2 commits that reference this issue on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions