Skip to content

Isolate Runs locally with an opt-in Run sandbox #1486

Open

Description

@JacobStephens2
No description provided.

Activity

  1. added
    enhancement
    needs-triage
    on Oct 27, 2026
  2. JacobStephens2 commented on Oct 27, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Triage notes

    Goal (from the maintainer): isolation for Runs: Ticket, Spec, Architect, Security and the rest. Not scaling them out, and not Eval Trials, which #1484 covers.

    What we've established so far:

    Next: a research note, docs/research/run-isolation.md. It compares hosted providers (Daytona, E2B and similar) with local options (reusing the Trial sandbox for Runs, rootless containers, microVMs) against what a Run needs:

    • all six Harnesses on subscription logins;
    • pushing to GitHub and gh;
    • the shared .git;
    • toolchains and caches;
    • Resume;
    • network for package registries.

    It stays needs-triage until that note is in and the shape is decided. #398 and #726 may then fold into it.

  3. JacobStephens2 commented on Oct 28, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Triage Notes

    The goal is settled: isolation for Runs. Research is in docs/research/run-isolation.md (PR #1515). A grill comes next, in docs/grill-with-docs/1486-run-isolation.md.

    What the research found:

    • Isolate locally; don't buy a hosted sandbox. thirdshift's Trial sandbox (bwrap with its own PID and network namespaces, plus an allowlisting CONNECT proxy) is the same design as Anthropic's sandbox-runtime. The seam already exists: Sessions::within_sandboxed and OnMachine's sandbox: Option<Launch>.
    • Hosted providers fail on the shared .git, not on price.
      • They work as "code in, commits out", and a Run delivers through a local Worktree over the shared .git.
      • Runloop is shutting down, with support ending 2026-11-13.
      • Cloudflare doesn't guarantee how long an instance runs, and it wipes the disk on sleep.
      • Cost runs about $0.06–0.24 per sandbox-hour.
    • Isolation can't protect the Harness login or the push credential. What it buys is a smaller blast radius: other repositories, other Runs, ~/.ssh, the Console on loopback, and sudo. A per-Run GitHub App token (one hour, one repository) is the cheapest big win, and it needs no sandbox.
    • A writable shared .git lets code run on the host. Git runs config and hooks/ as the user in every worktree. So the options are protecting those paths while the rest of .git stays writable (this needs a live bwrap test), or giving each Run its own clone.
    • Proposed staged path:
      1. Scope the token.
      2. Ship the AppArmor profile in Setup.
      3. Sandbox the Security run's proof-of-concept execution, folding in Ship a tested sandbox runner for Security review proof-of-concept execution #726.
      4. Add opt-in sandboxing for reviews.
      5. Add the implement session, off by default.
    • Related issues: A sandboxed mode for Codex sessions #398 shrinks to one live check and will likely close. consider making a Rust version of https://github.com/mattpocock/sandcastle for thirdshift factory sandbox primitives - or resaerch and use something else #838 stays closed. ADR-0013 gets an amendment.
    • Two terms questions apply to thirdshift today, sandbox or not:
      • Antigravity's clause 6 on third-party access, which affects agy.
      • Codex's rule against sharing auth.json across concurrent jobs, which affects spec.parallel with Codex.
  4. added 2 commits that reference this issue on Oct 28, 2026
  5. added
    ready-for-human
    and removed
    needs-triage
    on Nov 9, 2026
  6. JacobStephens2 commented on Nov 12, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI from a grill-with-docs session.

    Grill in progress: pick up here

    This is ready-for-human because the remaining decisions are design and terms calls, and they need the maintainer.

    Status of Round 1 (11 questions):

    • Q1.1 is answered (a): decline hosted providers for Runs. It was decided in run-capacity.md Q1.2. The issue is retitled to match.
    • Q1.2–Q1.11 are open, each with a recommendation:
      • Q1.2: a per-Run GitHub App token as its own issue.
      • Q1.3: protect config and hooks/ inside .git (a deny list) rather than a clone per Run.
      • Q1.4: start with the Security run's proof-of-concept command, folding in Ship a tested sandbox runner for Security review proof-of-concept execution #726.
      • Q1.5: if the sandbox can't start, the Run fails.
      • Q1.6: Linux only.
      • Q1.7: amend ADR-0013.
      • Q1.8: srt as a reference only.
      • Q1.9: the Antigravity terms question becomes its own issue.
      • Q1.10: the Codex auth.json question becomes its own issue.
      • Q1.11: add the glossary terms Run sandbox and Trial sandbox.

    Already checked (Research results in the file):

    • The deny list works under bwrap on thirdshift.app. Commit, push, fetch and worktree add work, writes to config and hooks/ are refused, and only git push -u breaks.
    • The local Herdr isn't Vercel's sandboxed one.

    Next:

    • Round 2, once Round 1 is answered: the network allowlist and who maintains it, whether github.com is acceptable as a way to send data out, and how many sandboxed Runs fit on the host.
    • Then /to-spec.

    To resume: answer the open *Answer:* lines in the file, then run /grill-with-docs 1486.

  7. changed the title [-]explore usage of thirdshift with a sandbox provider like Daytona or E2B[/-] [+]Isolate Runs locally with an opt-in Run sandbox[/+] on Nov 12, 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

    enhancementready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions