Figure 1 · the whole system
Agents write the code; thirdshift decides when it counts
An agent session can do anything your user account can, with nobody there to approve it. So every decision that matters is made outside the session, by thirdshift, before the session starts and after it ends. The Day shift is you: you shape the issues and review the pull requests.
- Pre-flight checks stop a Run before anything is created: the Issue URL must match the clone's
origin, the issue must be open, and the Base branch must be onorigin. - The Claim labels the issue
in-progress, so the issue list shows what the factory is working on. - A Worktree gives the Run its own checkout beside your clone, so yours is never touched.
- Delivery pushes the branch and checks that the pull request exists and targets the Base branch. thirdshift, not the agent, marks it ready.
- Keeping it green merges the Base branch in and watches CI. A conflict or the branch's own red check starts a Repair, at most 5 a Run.
- The Self-merge, in a Merge run only, merges exactly the head commit whose CI thirdshift watched.
- Cleaning up removes the Worktree. A Failed run pushes its work first and turns the pull request back into a draft.
Figure 2 · thirdshift <Issue URL>
A Run: one issue in, one pull request out
Work reaches a Run as a Ready issue, labelled ready-for-agent. You write most of them, but thirdshift writes some too: an Architect run publishes its plan, a Security run allowed to fix files the fix, and a Base fix files the red CI on the Base branch. One agent session writes, tests and reviews the change, then opens the pull request. A second session reviews it for security, if you ask for that. Then thirdshift checks, pushes and watches.
Figure 3 · thirdshift merge <Issue URL>
A Merge run: the Run, then thirdshift merges it
The same Run, one step further. Once the pull request is open, ready, mergeable and green, thirdshift merges it with a merge commit, on exactly the head whose CI it watched. Commits someone else pushed to the branch are reviewed first. A required human review still stops it, leaving the pull request ready for you.
- new in this workflow
Figure 4 · thirdshift <Spec URL>
A Spec run: many Merge runs, one pull request
An issue with sub-issues is a Spec, and its sub-issues are Tickets. Each Ticket gets its own Merge run, not into main but into the Spec branch, in the order GitHub's “blocked by” links allow. Independent Tickets run at once, each in its own Worktree. The Spec ends as one pull request for you to review.
- new in this workflow
Figure 5 · thirdshift pickup, architect, secure
The Passes: the factory finds its own work
A Pass takes no Issue URL, so your operating system's scheduler can start it; thirdshift never schedules itself. Only one Pass runs on a repository at a time, and a Pass with nothing to do is skipped, not failed. Architect and Security runs wait while a Ready issue is open, so work you shaped goes first.
- new in this workflow
- proposed, not built
Figure 6 · from the outside in
Containment: where the boundaries are
thirdshift draws no security boundary around its agents: every session can do what your user account can. So containment comes from where you run it. The boundary that holds is the machine: best a virtual machine with nothing from production on it. An OS sandbox inside it, for the code an agent runs, is proposed but not built.
- your machine
- enforced by the OS
- keeps things apart, not security
- proposed, not built
- Your machine
- holds · your setup Keep production data, keys and unrelated logins off it, and assume a session can read or change anything on it.
- Your user account
- enforced, but shared It separates thirdshift from other users, not from its own sessions: a session can read the
ghandgitlogins and push with them (#691). - The Worktree
- not a security boundary It keeps your checkout and other Runs apart. Every Harness runs with its own sandbox and approvals off (ADR-0013). Claude Code's auto mode screens risky actions, but enforces no boundary.
- An OS sandbox
- proposed A second wall inside the machine, for the code an agent runs: no network, writes only to scratch space, a dummy home directory. On Ubuntu 24.04, bubblewrap needs an AppArmor profile that lets it create user namespaces. Tracked in #726 (a runner), #608 (a setup check) and #398 (sandboxed Codex).
Next: what an unattended session can do, How thirdshift works step by step, or every prompt and skill the agents get.