Skip to the figures

Reference architecture · six figures

Architecture

thirdshift turns a GitHub issue into a pull request by running unattended agent sessions against it. The agents write and review the code. Everything else is thirdshift, one deterministic program: it decides what an agent works on, checks its work, and never lets an agent mark its own work ready. These figures show what runs where, who does each step, and where the boundaries are.

Drawn from the manual for the source on main; an installed release may differ. For the same process told step by step, read How thirdshift works.

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.

The factory and this machine’s ConsoleThe Day shift files issues on GitHub and starts thirdshift, or the operating system’s scheduler starts a Pass. On your machine, thirdshift runs seven deterministic stages: pre-flight checks, the Claim, a Worktree, Delivery, keeping the pull request green, the Self-merge in a Ticket run that Self-merges, and cleaning up or failing safely. Inside the Worktree, an agent session on the chosen Harness writes and reviews the code, with Repair sessions when the branch needs work. The pull request goes back to the Day shift for review. Commands write their records, Session traces and logs on this machine. Its Console reads them into an Inbox with stages and logs; a signed-in account can Stop or Requeue a live Command. DAY SHIFT you Shape the work /grill-with-docs, /to-spec, /to-tickets Run notification Console and optional email each Ticket run ends Review the PR or ask for Self-merge on the watched head YOUR MACHINE ideally a VM with nothing from production on it thirdshift <Issue URL> or merge, architect, pickup … OS scheduler cron or launchd starts Passes pickup · architect · secure thirdshift one Rust binary, deterministic: everything outside the agent’s loop WORKTREE <repo>-issue-<n> Agent session on the Harness: claude, codex, agy, grok, muse, opencode or kimi Prompt Session prompt Skills Factory skills Repair · Resume new sessions, same Harness; ≤ 5 Repairs unattended: all your user’s permissions, nobody approves Pre-flight checks Origin match, open issue 1 Claim label the issue in-progress 2 Worktree own checkout, skills in 3 Delivery push, verify PR, ready it 4 Keep it green merge base in, CI, Repair 5 Self-merge when asked: watched head 6 Clean up, or fail safely Failed ticket run: push, draft 7 GITHUB the shared record Issue or Spec ready-for-agent → in-progress sub-issues: Tickets Issue branch issue-<n> on origin CI checks GitHub Actions Pull request ready for review, merged, or a draft after a Failed ticket run files issues, marks them ready-for-agent pull request, ready for review Commands Command records, Session traces and logs Console Inbox · stages and logs Stop / Requeue (signed in) does only what the CLI does reads
Figure 1 The factory. The numbered stages are thirdshift's; only the magenta boxes are agents.

Each saved Run notification's subject and body appears in Command details, thirdshift show <command> and its JSON/API view, including live Fleet reads. Email can be off. Security notifications stay behind the security scope; notification files stay outside the Logs inventory.

The deterministic orchestrator outside the agent loop is written in Rust (ADR-0001). Its statically linked binary embeds the Factory skills, so target machines need neither a language runtime nor a checkout of thirdshift, unlike an interpreted script.

thirdshift-verify-ui composes within implementation, diagnosis and PR sessions across all seven Harnesses, with shell/CLI browser tools and no MCP configuration. It adds no Built-in process Step; Custom processes and Experiment Arms can use it as a standalone skill Step. Captures publish as repository-scoped GitHub attachments after local file validation.

Rust's data-carrying enums represent the unattended Ticket run, Claim and CI states. Exhaustive match means adding a state fails compilation until every match handles it. Pickup's reservation protocol across competing hosts is model-checked with stateright inside cargo test (ADR-0017). These checks matter when nobody is watching the control flow.

Console and host resources

Each Command owns private scratch under ~/.thirdshift/scratch/ for its sessions' TMPDIR and Factory skills. Sandboxes see separate temporary subdirectories. Completion removes scratch; a Paused Command or failure with Recovery retains it until successful continuation or Dismissal. Startup logs cleanup of dead local owners and verified legacy Factory skills older than two days. Command logs and Session traces remain in their recorded locations. Host storage.

Inbox Ticket progress comes from typed Ticket records: merged Tickets over all recorded Tickets, including those closed before the Spec run. It updates with existing record notifications, uses the owning machine's records for Fleet, and stays visible on a Pass that dispatched a Spec. Empty accounting has no counter; completing Tickets does not finish Spec review or Delivery.

Fleet starts and administration call the owning machine's API. Start choices and cron Passes come from its /api/v1/start-options, gated by run or admin and filtered to what those scopes may start; User config and Update require admin. Controls use live whoami scopes for the signed-in person. Page forwarding names that person; the owner intersects their scopes with the token's, starts the Command and records the person and calling Console. CLI start, config and update --machine use the token holder. API endpoints stay local and cannot borrow another Console's Fleet credentials.

Cron jobs' explicit Fleet schedules page and cronjobs --fleet [--json] share request-owned aggregation of local and owning-machine inventories. Repository metadata and nullable Command kinds come from each owner; the client groups by repository and machine without resolving remote paths or converting cron time zones. On the page, native disclosures for each repository and Other start closed on every load, expand independently without JavaScript and save no expansion choices; machine statuses stay visible. Independent bounded reads preserve healthy results alongside unavailable, refused, incompatible and link-only states; link-only entries receive no requests. Page reads forward the signed-in person and require effective read access. /api/v1/cronjobs stays local and refuses Fleet selection, and Run now keeps its separate authorization.

Fleet metrics follow the same pattern: metrics --fleet, metrics --machine <name> and the Metrics page's Fleet view read each paired machine's local /api/v1/metrics in bounded parallel requests and merge outcome buckets, comparison tallies and Where runs failed, each Command counted on its owning machine. Each successful read atomically replaces that machine's summary under the watching account's logs/fleet-metrics/; an unreachable or retired machine shows its saved summary for the same view, badged cached with its last-seen time, while a refusal shows none. /api/v1/metrics stays local and refuses fleet and machine. A machine that cannot be reached inbound pushes its summary instead to POST /api/v1/metrics/report under a report token, the one scope a person never holds: the Console saves it only in the token holder's own reported slot beside the per-reader snapshots, refuses a report naming another machine, and shows it read-only with its pushed_at age. metrics --push and a bounded, best-effort push after each top-level Command send it, from destinations kept under console.report with their tokens in Credentials.

Fleet Plan usage reuses those slots under logs/fleet-plan-usage/. plan-usage and /api/v1/plan-usage default to the Fleet once a machine is paired or saved, reading each peer's /api/v1/plan-usage?local=true so no read relays further, and group rows into one per subscription login by the identity each Harness reports: Claude's organization and email, Codex's account id, Muse's account label. Agy and Grok name no account, so their rows stay per machine. A peer's view is refused whole if any of its text is long or holds a control character. The push after each Command adds this machine's saved view to POST /api/v1/plan-usage/report without running a non-billed read. Routing never reads any of it (ADR 0031).

The Console's Plan usage page projects those same scoped Logins into a compact By Harness summary above the machine details: all five subscription Harnesses, separate account identities and the freshest unidentified observation, without machine names or additional reads. CLI and API JSON keep their existing per-Login view.

The Inbox polls live Fleet entries every 15 seconds only while a page subscription is open. Each request runs independently off the async executor with its own three-second timeout, so a bad machine never holds up a good one or a page request. Last good rows and the last error stay in memory only. Rows carry machine tags; each machine shows its answer age and active-run count. After 60 seconds without a good answer it is unreachable, with grey rows. Refused tokens and older Consoles have distinct diagnostics and links. ?machine=<name> filters the Inbox; its absence includes the Fleet in every group, the tab's Needs you count and browser notifications. Remote details use a request-owned client to fetch the owning machine's /api/v1 and render with the local Peek, Waterfall and log templates (fetching remote command details best-effort when rendering a remote Command log's GitHub target and title). Nothing is cached beyond the request or written to disk. The owning machine enforces security for Security run details and findings; the caller renders its refusal. Detail links retain the Fleet entry, and each row and view also links to the owning Console. The CLI's show and logs use the same remote reader with --machine <name>, returning the owner's JSON.

console fleet add pairs another machine through its /api/v1/whoami, with a token supplied on standard input. The named Fleet list and saved hostname, version, scopes and last contact live in User config; tokens live in owner-only Credentials, keyed by entry name. console fleet list --json reads that saved metadata; live means a token is stored, and an entry without one is link-only. console fleet remove deletes both. These commands have no API endpoints. The header links every entry. Legacy other_consoles addresses become link-only entries and are rewritten as fleet on a settings write. Fleet.

status uses one blocking fetch-and-merge path for the Fleet: each live entry's own /api/v1/status, a three-second timeout and no redirects. It preserves the owning Inbox's groups, GitHub facts and account tags. JSON version 2 adds each Command's machine and per-machine fetch times, reachability, errors and active runs. --machine <name> selects another machine; the local hostname keeps the whole Fleet. Failed reads contribute diagnostics without failing status. The API Inbox is the twin of status --local --json, so reciprocal pairings never recurse; the Console poller reuses the validated fetch path independently for each machine.

Fleet Inbox answers and live whoami scopes are kept per signed-in person. Remote Stop, Dismiss and Undo POST to the owning machine's /api/v1 with X-Thirdshift-Person; its token/person intersection decides access and its response reaches the caller. After a successful Dismiss or Undo, the caller discards older answers for that Command and reads the owning Inbox again under each viewer’s own scopes. The acting viewer’s read completes before the Console replies to the action. Stop retains confirmation. CLI stop and dismiss --machine omit the person and use the token holder's identity. Only the owning machine signals processes, stores Dismissals or writes Activity log entries. Other-account Commands remain read-only.

The run scope allows POST /api/v1/runs to start Ticket, Spec, Architect, Pickup, Security, Review, Fix, Custom process, skill, Scoring, Triage and Experiment runs. The CLI parser checks their structured options; Passes keep cron's skip gates, and triage receives Report text through stdin. The Console resolves the repository through known Launch directories from cron and User config's launch_directories, also listed by thirdshift launch-directories --json and GET /api/v1/launch-directories. It starts the current binary with CLI arguments in a new OS session and login environment, appending output to the cron command's output path, or <logs.dir>/cron.log when none is given. It returns the recorded Command name or an early skip after a bounded wait; a skill run has no Command record and returns its process ID after preflight. Starts survive Console restarts and name the requester in the Activity log; each attempt enters the Console log (ADR-0026). Experiment starts put the CLI options in an experiment object, including candidate, baseline and the suite list; OpenAPI lists every option.

The Inbox's Start work form and Cron jobs' Run now controls are clients of POST /api/v1/runs. A person with run reviews the structured request and Harness before confirming a start. Cron Pass arguments are preserved; shell expressions stay display-only. The page shows the Command name or skip reason, and the Inbox reads the new Command through its usual updates. Both controls require JavaScript. Ordinary starts require run; the separate Start Release run control requires admin. Release requests name command: "release" and the thirdshift repository, with an optional version or bump (major, minor, patch). A versionless request is a Pass; omitting both fields chooses minor or patch automatically. POST /api/v1/start aliases the same handler with the same scope checks.

The CLI's thirdshift config [key [value]] [--json], the Console's User config page and /api/v1/config share one inventory, validator and comment-preserving writer. API reads and writes need admin; the page also offers a read-only view with read. After a page save, a redirect anchors the saved setting and a status message names its key, saved value and machine. This also works without JavaScript and preserves the Fleet machine; confirmation values come from the redacted inventory. Changes append the caller, key and old and new values to the Console log. Update uses the CLI's installer, answers after binary replacement, then drains connections and re-executes the Console. The page shows current and latest versions; updates, Theme imports and Eval replay imports require admin and record who asked. The sign-in list and address scopes remain shell-controlled; Credentials are separate and export endpoints are redacted. Machine administration.

Console accounts carry per-address scopes in console.address_scopes, all five when absent. Only the shell can set or show them with console scopes. Sessions use their address's scopes; the page hides unauthorized controls. A token's X-Thirdshift-Person header names a person on the owning machine's sign-in list, and the effective scopes are the token's intersected with that address's. Activity log entries for their Stops and Dismissals say by <person> from the Console on <holder>. No route writes the sign-in list or address scopes.

The Console's route table pairs each page with its CLI command, an /api/v1 path and a scope. Shared handlers render HTML or return the CLI's JSON. The same table generates /api/v1/openapi.json and thirdshift console openapi, with each served operation's scope, CLI twins and JSON shape; a parity test checks the description against registered routes. The read scope shows Security run rows and stages; details, findings and Security Session traces need security. The act scope permits Stop, Dismissal and Undo, eval judgments, Theme selection and hidden-section POSTs. Each attempted API change records its caller, endpoint and outcome in the Console log. Token Stops and Dismissals name by token <holder> in the Activity log. Other-account Commands stay read-only. The API accepts scoped bearer tokens, the page's sign-in session and --no-sign-in. Tokens contain 256 random bits; the machine retains only SHA-256 hashes in an owner-only file beside the Credentials. Issuing, listing and revoking them stays CLI-only. Authentication checks HTTPS forwarding or a direct connection to 127.0.0.1 before reading the token store, and route scopes gate requests. Failed tokens and passwords share an in-memory per-address slowdown and cool-down, returning 429 with a retry time. Only a proxy at 127.0.0.1 may supply the forwarded client address; restarting clears the limiter. console whoami and its API twin report machine and caller identity. Unauthenticated calls return 401 JSON; missing scopes return 403 naming the scope. Console API.

The Console reads its Fleet's Commands and opens on its Inbox. Filesystem changes wake its Inbox and log readers; process exits and elapsed-time boundaries have their own wakeups. A slow recovery check catches missed notifications and expired sessions. A signed-in account can Stop or Requeue a live Command. Its API starts work only when a person or token holder asks, using the same CLI behavior (ADR-0026).

The Inbox's batched pull request read also captures titles and the latest head commit's combined checks and status. After each owning machine evaluates its Inbox and the caller selects rows, the Console and human-readable status group Ready for review by validated repository and PR number. The Console links the grouped row to GitHub and shows the latest completion. Its expandable list keeps each Command's check and ownership facts. The status API and status --json keep the original Commands. Missing titles keep the PR link with “(title unavailable)”; rows without a PR use their issue or Command subject. Title changes wake open pages without a network read during rendering. Ready for review rows show CI green, red, pending, no checks or unknown, using the same saved answer as status. CI changes wake open pages without changing the row's Ready state; failed reads keep the last answer with the existing freshness warning.

The same query captures pull request mergeability independently of head CI. A conflicting pull request stays Ready for review with a separate Merge conflict pill beside CI, even when CI is green. Mergeability changes also wake open pages; unknown answers show no conflict pill. status --json includes github_mergeable, and show --json reads the locally kept GitHub facts and observation times without refreshing them over the network.

The Ready for review controls apply after Machine and Repository selection and pull request grouping. Oldest first sorts rows by completion time, using the start time when completion is unavailable. For a grouped pull request, the sort uses the latest visible contributing Command, the same one used for the heading. When any contributing Command reports CI red or a Merge conflict, the controls can hide the entire row or move it to the top. Sorting preserves the relative order of tied rows and the order of contributing Commands. The page URL carries the choices through live refreshes.

For green heads, the Inbox compares the captured PR head and Base commit with the GitHub REST API. It counts first-parent Base commits since the merge base and reuses the count while both commits stay the same. The Console and status show a warning when green CI predates Base changes.

The Console reads ready rows' pull requests and Needs you rows' issues and pull requests in a batched GraphQL query in the background once a minute, with blocking gh calls off its async thread. It keeps one answer per machine beside the logs. A changed answer or warning wakes open Inbox pages through the file watcher; unchanged reads update freshness without rendering or waking pages. thirdshift status uses that answer and reads GitHub itself only when it is missing or five minutes old. Failed reads retain the last facts and failure; after five minutes without a good read, both readers warn with when GitHub last answered and why the latest read failed. Both share a quota gate: fewer than 500 GraphQL points or REST requests holds off all their reads until reset, with a warning, preserving the rest for the factory. These limits and timings are not User config settings. An ended Needs you row moves to Done, Resolved or History when its issue closes or its pull request merges; a Triage row also moves when needs-triage is removed. Architect and Security runs use their dispatched Spec run's or Ticket run's issue and pull request. GitHub settlement does not move live Silent or step-2 Slow rows. A Slow run stays in Working or Landing until its stage reaches both twice the top of its Usual range and at least five minutes past it; only then does it enter Needs you, count toward notifications and use the urgent favicon. Ready rows leave on a merged or closed pull request. Resolved counts from the settlement time, and only rows GitHub cannot speak for age out while still waiting. Reopening brings back rows still in Done or Resolved. Rows in History retain the last facts without further reads, including when another row shares their issue or pull request. Dismissals hold across GitHub changes, and Undo uses the latest kept facts. These reads never write to GitHub (ADR-0023).

Local and Fleet Commands share the compact Working-row presentation, including Overview: live Fix and Review runs show a clickable PR #number beside the repository and run type on desktop and phone, for explicit and Pass-selected targets. Base branch CI repairs retain an optional base_branch in the Command record before the session starts. The row shows that exact selection before a PR exists and keeps it alongside the PR link once recorded, without deriving it from the repair branch or requesting GitHub. Older records keep their existing fallback.

Compact Needs you Review and Triage headers, including Overview, link the recorded PR first, falling back to the recorded issue, on desktop and phone and across the Fleet. Existing-issue Triage retains its explicit or Pass-selected issue when its Command record starts, before investigation can fail. Fleet subject links validate the visible repository and number against the GitHub URL. Older records and Report-based Triage without a single target retain their repository and Command fallback; failure text never supplies a target.

Security fix dispatch stores advisory metadata in the dispatched Command record’s security_fix_findings list before launch checks. Command details links each advisory with its title and severity (or “ungraded”), and the parent Security run marks the advisories it dispatched a fix for using that same list. Failed and interrupted fixes retain their links. The list is also exposed by thirdshift show <command> --json. Older records need no migration and no advisory links are inferred from issue bodies.

With permission, use Dismiss on the row for a Command in Needs you or Ready for review. In a PR group the chosen Command's existing target determines what Dismiss or Undo affects, and its owning machine checks access. With JavaScript, d dismisses the selected Command. An inline dismissal shows a temporary notice with Undo for that Command, outside the live Inbox so row replacement cannot remove it. The notice stays while hovered, focused, saving or showing an error. Without JavaScript, rows keep their full Dismiss form. Command details also offers Dismiss and Undo for a dismissed row. Command details shows each CLI form: thirdshift dismiss <command> or thirdshift dismiss <command> --undo. Both use the Console's session and CSRF checks. The browser keeps pending feedback and disables duplicate submissions through live updates; failed requests show their error and allow a retry. The dismissal lives beside the Command record and changes only the row's group; filesystem notifications update open pages, and the Activity log names the account and the Console. A live Command keeps running, and nothing is written to GitHub.

A dismissal accumulates covered kinds for the whole row, across child Ticket runs, and status --json exposes them as dismissal.kinds. An uncovered kind brings the row back, including a Finding behind a dismissed Security failure only while GitHub still shows its findings waiting. Each read adds one paginated REST list per repository with a Security run whose findings were waiting, respecting the quota reserve and using the Security run’s private-storage selection. The kept answer holds only finding URLs and waiting flags, with the first observed triage time; it retains no finding title, severity or write-up. A Finding leaves saying “findings triaged” once its records no longer wait: a draft advisory without severity or an open security-finding issue labelled needs-triage waits, and a record closed by a merged fix does not.

status --json exposes each row's kept issue, pull request and finding facts with their observation times in github. History freezes those times alongside the facts. Unchanged reads update observation times without waking pages. A dismissed row's Resolved clock stays anchored to its dismissal even if GitHub settles it later.

Before each agent session, host resource limits delay its start while available memory is too low, one-minute CPU load is too high or free disk space is too low. The memory and load limits are optional; the disk limit waits below 5120 MB free by default. thirdshift resources and the Console's Resources page show the current snapshot and configured limits. The Console header uses that same admission policy below the notification control, refreshing every ten seconds while visible and linking to Resources. Disabled limits and unavailable measurements have explicit states. Existing sessions continue; the indicator reserves no capacity.

Processes and Session traces

Review markers are read only from comments by the GitHub account thirdshift acts as. Delivery compares the base's recorded fix commits with the upper pull request and warns when it needs updating before merge. It never merges or rebases the stack; Self-merge holds while the base is another open PR.

Review Passes (review --author) and Fix Passes skip release-* pull requests targeting main, leaving their version-only heads to the Release run. Explicit thirdshift fix <pr-url> --no-merge --no-base-fix still repairs those pull requests.

The Base branch may advance during a Review run, including with --recommend-only. The captured Base commit still sets the review and CI comparison scope. Retargeting the pull request, renaming its head branch or losing eligibility stops publication; a changed head prevents pushing fixes. Delivery checks mergeability before pushing and again before reporting ready. An observed conflict requires an author update and blocks further pushes and readiness.

Review acquisition publishes paired durable ownership evidence for head-branch worktrees. Retries verify checkout, administrative and common-directory identities, the token, the captured PR head, clean tracked state and descendant history under both worktree and refs locks before adoption. Author Pass admission uses the same checks, skips unrecoverable conflicts and persists notification fingerprints under ~/.thirdshift/review-conflicts/, allowing later PRs through without repeated failure emails.

When a Review run or pull-request Custom process captures its pull request, it persists the target URL in its Command record and names it in the Command log before starting a session. thirdshift status and the Console's Working row read that URL from the live Command record.

Addressing Review Delivery gates readiness on checks and commit statuses for the exact published full head, including unchanged branches and Security-review commits. One CI watch retains re-run allowances across the delivery; at most five CI-fix Repairs address branch-owned failures, with any lower Custom-process cap respected. Repairs validate their final commits before guarded publication and another watch. An unchanged Repair gets one eligible Check re-run without repeated sessions on the same red head. Inherited failures, unreadable observations and unresolved red CI end failed with evidence in the review result and Run notification. Pending CI cannot trigger readiness. PR identity, eligibility and expected head are reobserved throughout; author changes stop publication. A final conflict requires an author update. Review owns no stack reconciliation or replacement PR, and Self-merges only when its command or [review] merge opts in; --recommend-only remains report-only.

The Review run's session owns validation after addressing findings: repository agent instructions supply final validation and review.commands_by_repo in the User config adds per-repository shell commands. Delivery posts the session's results for each command, including failures and commands it could not run. Suites invalid in worktrees are not run against the branch, never passing; no extra list still means repository final validation. Recommendation-only sessions validate after reviewing too. If a later Step commits more changes, Delivery repeats validation on the final head before pushing and reports those results. When that report includes private Security review material, the comment says the results were withheld instead of quoting the session.

thirdshift review --author <login> selects one author's lowest-numbered eligible open pull request before the Review run. Its Pass gate holds one Command-limit slot. Selection skips heads a Review-run marker names as reviewed or pushed, in-progress pull requests, and bases that are open pull requests without a reviewed current head. It pages linked closing issues and checks each for an in-progress Claim or issue reservation in that issue's repository, before and after reserving the PR, ahead of worktree inspection. A hold logs the PR, issue and observed signal, then selection continues. Once the Pass has selected a pull request, an untrusted author of a linked closing issue, or any title or body edit by an account that is not a Trusted account, stops the Review run before the issue is used and does not take the next candidate. Failed observations cannot admit a PR. Holds cover direct and reserved Ticket and Spec Delivery across machines; Pass startup releases locally owned reservations on proof of process death, with an observed-SHA lease. Untestable reservations that skipped work and have been held over a day appear in Needs you with owner, age, blocked work and an exact release command; observation refresh clears gone or replaced refs, while Dismissal records the Day shift’s judgment. No timer releases a reservation. This read-only guard does not exclude Delivery started after selection, so captured-head checks remain necessary. Explicit PR URLs keep their existing behavior. An origin reservation serializes Review runs on each pull request; in-progress spans the run and is removed on ending. The Sweep clears the label from closed pull requests.

The admission guard also resolves an Issue-branch base to its Spec issue using the canonical branch naming rule, including numbered continuations, and checks its Claim and origin reservation. Its skip line names the base Spec. If GitHub's closing-issue list is empty, local closing references in the PR body (Closes #7, Fixes #7, Resolves #7) receive the same hold checks. Both sources are checked again after PR reservation; unreadable observations still fail closed.

Add merge or --merge to thirdshift review <PR URL> or review --author <login> for a Self-merge after Delivery. [review] merge = true opts this machine in; the default is false, no-merge overrides it, and merge.always does not apply. Self-merge uses the Fix run’s exact reviewed-head and CI gates and merge-time Repair loop. Required reviews, open PR bases and failed or incomplete Security reviews leave the PR ready with a logged hold: an author Pass exits 0, a targeted merge request exits non-zero. Successful merges report merged, close linked closing issues and delete the branch. --recommend-only with merge is an argument error. Review Self-merge.

The review-run Built-in process starts on a pull request: review-and-address → security-review → delivery → opt-in self-merge, on a pull-request worktree at its captured head branch. thirdshift review <PR URL> filters input to the body, linked closing issues and Trusted-account comments, reviews against the PR's own base and addresses findings with the Ticket run's shared rules. The Security review runs only with security-review or [security] review = true, after findings are addressed, on security.harness with the usual fallback. no-security-review overrides the setting and --recommend-only skips it. Delivery pushes its fixes with the others without force and posts one comment listing fixes and every Unaddressed finding, including unfixed introduced Security findings, with a hidden marker naming the reviewed head and the head after a push. A linked Spec departure explained only by the PR body stays unaddressed with that reason and no triage issue. If the branch moves before the push, Delivery posts the findings and proposed fixes, says the branch moved and leaves it alone. --recommend-only posts findings without changing the branch. Eligibility is checked before sessions and again before publication, and every linked closing issue (including any linked earlier in the run) is checked for untrusted title or body edits before writing .thirdshift-review-input.md, around each Step, session, Repair and Resume, before Delivery pushes fixes or posts its comment, and through any Self-merge, without converting the pull request to a draft. It also stops before using a linked closing issue, including when started as a Pass, unless that issue's author is a Trusted account and no account that is not one has edited its title or body. The Command record, Activity log, notification and Inbox name the Review run. Copy its file with thirdshift process show review-run for a Custom process started with pull-request <PR URL>.

Every session Step gets one Resume for killed background work, in Custom processes as in Ticket runs. Killed background work after a Resume is named in progress while following Steps decide the outcome. If the Process fails later, its cause names that work first. A Resume does not spend the Process's Repair budget.

With [harness] routes in the User config and no Harness, Model or Effort on the command, the Command's Harness is its first route and a Router walks the routes per session Step on machine-local Plan usage alone, never a Fleet peer: proactively past a route in cooldown or at its max_utilization, holding included Plan windows ahead of Codex credits and agy's Google AI credits (--settings '{"useG1Credits":false}') unless the route sets allow_credits; and reactively when a session stops on a structured Plan-usage limit, starting the Step again as a fresh session on the next untried route, never a cross-Harness Resume. A session that stopped after work keeps its commits; git reset --hard and git clean -fd discard the rest, a conflict Repair's pinned merge is made again, and an implement session that committed starts again on the Continuation prompt, with no added prompt text. Security sessions walk [security] routes, else [harness] routes, else fall back to harness.default. Command, Step, Experiment and Scoring Harnesses stay pinned, and a safeguard refusal never routes (ADR 0031). Routing by Plan usage.

Every Harness session stops its process tree and sweeps for survivors when it ends, fails or is stopped. Linux sessions use their own systemd user scopes where a user manager is reachable, catching detached and reparented work. Linux without a user manager uses a unique THIRDSHIFT_SESSION environment marker and signals only the same OS user's matching processes. This fallback is best effort: clearing the environment escapes it. Cleanup reports survivors killed, warns on sweep failures and preserves the Command's outcome. What sessions leave behind.

Command records retain process_name, process_kind (built-in or custom) and process_hash (SHA-256 of the exact file bytes). Session traces carry the same facts as thirdshift.process.* attributes. A Custom process hashes the source loaded for execution; a Ticket run hashes the compiled-in ticket-run file by default. Dispatched runs and child Ticket runs keep their own Process identity within the shared Trace. Runs without a Process file retain their run-type name with no hash, and older records need no migration. Displayed run types stay unchanged.

Ticket runs, including those started by Spec, Architect and Security runs, default to the compiled processes/ticket-run.toml: implement → security-review → delivery → self-merge, inheriting the Command's Harness, Model and Effort, Child asks and Limits. A run-published-issue Step may select a different Ticket Process with process = "<name>"; process check requires that it exists and declares an Issue-branch worktree. Spec dispatch and Claim-before-worktree ordering stay in front of the file. The Command retains its Ticket run identity and Session-trace names. thirdshift process show ticket-run prints a copyable file; thirdshift process check ticket-run issue <issue> validates it.

Architect runs execute processes/architect-run.toml: architecture-review → run-published-issue. The Command limit, the lock of its kind and the open-plan, waiting-idea and Ready-or-settling-issue gates remain before the file. The first Step owns the session, conclusion and labels and ends successfully on an idea in the repository at origin, or with --plan-only. An idea outside that repository is refused before it is viewed or labelled. Otherwise the next Step runs the plan. The Architect run keeps its name, progress, logs, endings, Run notification, Console view and Recovery, and records the compiled file's hash. thirdshift process show architect-run prints the file and thirdshift process check architect-run validates it. A copy under a new Custom process name follows the Command limit without a lock of a kind.

A Custom process's spec-branch worktree shares the Spec run's land-tickets loop: push, dependency scheduling, Trusted-account checks, draft Spec PR and checklist, and Failed spec run accounting. Its process setting selects every Ticket's Process, defaulting to ticket-run. A file declares one Issue-branch or one Spec-branch worktree, never both; dispatch refuses the wrong issue shape before any session and makes the Claim before the worktree.

The following spec-review catalogue Step uses the Spec run's whole-Spec prompt and report contract on that worktree. security-review, delivery and self-merge share the existing Delivery and Failed-run path for its Spec PR, restoring the Tickets checklist before readiness and removing the Claim after Delivery. Security review and Self-merge keep the command and User config gates. A refused or incomplete Security review leaves the PR ready and holds the merge. Each Custom process Step resolves its own Harness, Model and Effort.

Spec runs execute the compiled-in spec-run file: land-tickets → spec-review → security-review → delivery → self-merge, on a spec-branch worktree. Every starter uses it: an Issue URL, Pickup, Architect and Security runs, and run-published-issue. Dispatch, the Claim, Child asks and Limits stay in front of the file. The run keeps its sessions, progress lines and Spec run name, and records the compiled file's hash. Inspect it with thirdshift process show spec-run or validate it with thirdshift process check spec-run issue <spec>; its name is reserved against Custom processes.

Security runs execute the compiled-in security-run file: security-audit → reproduce-findings → fix-findings → close-findings. The Command limit, the lock of its kind and Ready-issue, failed-fix and unchanged-Base skip gates stay before the file, followed by a check that the repository has Issues turned on: with Issues off, the run fails before any session and says to turn them on or remove its Security schedule. An earlier reproduced finding awaiting an allowed fix makes the first two Steps skip. The run fixes at most one finding and closes only that finding after its fix merges and its proof passes. Sessions, progress, logs, Run notifications and the Security run name stay the same, with the compiled file's hash recorded. Inspect it with thirdshift process show security-run or validate it with thirdshift process check security-run; its name is reserved against Custom processes. A copy under a new name follows the Command limit without a lock of a kind and can fix several findings.

Pickup has no Built-in process file. It selects and reserves a Ready issue, then dispatches ticket-run or spec-run.

Ticket runs and Custom processes share the security-review catalogue Step. A Custom process places it on the Issue branch after editing and before delivery, outside parallel groups. The command or User config decides whether it runs. Harness fallback, private pre-existing findings and holds on Self-merge follow the Ticket run's rules; a Harness explicitly named in the file must start at preflight.

The architecture-review catalogue Step owns a fresh Architecture review worktree at the Base branch, its conclusion, plan checks and plan-or-idea labels. A following run-published-issue starts the child run on a Strong plan. An idea in the repository at origin, or the command's --plan-only, ends the Process successfully, skips later Steps and records the reason in progress and the Ending. An idea outside that repository is refused before it is viewed or labelled. The Step runs outside parallel groups and takes no Architect skip gates; those remain in front of an Architect run.

A Custom process can run security-audit → reproduce-findings to audit the Base branch and reproduce each finding at its audited commit. Both required Steps use throwaway worktrees outside parallel groups, take their own Harness, Model and Effort, preserve private records and completed reproductions, and keep their traces out of OTLP export. With security-fix or the User config allowing fixes, both skip themselves when a recorded finding is eligible for an unattended fix, unless the repository has issues turned off and so cannot hold one. The Security run executes security-run after its existing skip gates.

A Custom process can use fix-findings → close-findings to fix reproduced Security findings and close only merged fixes whose proof-of-concept passes against the merged Base branch. The Steps keep private records and the Security run’s fixing and closing permissions. fix-findings can select a child Ticket Process with process; it defaults to ticket-run. Failed fixes and failed rechecks stay with the Day shift. Their sessions and the Ticket runs they start stay off any configured OTLP endpoint, as a Security run's do. The Built-in Security run still fixes at most one finding per invocation.

A Session trace records each agent session. A Command's whole Trace includes its child Ticket runs and stages; export it with thirdshift logs <command> --export <dir>. Logs and Trace export.

Experiments and Scores

A Custom-runner Arm freezes an outside workflow's argv manifest, scripts and mapped HOME skill trees, recording their SHA-256 hashes and Git origin, HEAD and dirty state. --baseline-runner and --candidate-runner require explicit process suites; two Custom runners bypass thirdshift builds. Preparation pins declared Harness paths and versions. Setup identity uses the runner digest with nullable commit and Harness. Console start forwards runner selection through the CLI parser; its OpenAPI and Experiment JSON share format 13. Experiment comparisons and Trial Peek render frozen runner provenance and declared roles, and pairwise JSON puts runner details only in the post-preference revealed object. One Trial-wide bwrap sandbox and memory scope enclose the runner and its children. Fresh HOME holds mapped files and declared Harness logins; declared provider keys come from Trials-only Credentials. One provider-only HTTPS proxy and PATH wrappers disable Harness web search. Missing credentials void the Trial as session_unavailable, and declared provider families count in Grader panel voting and stand-in checks. Each unattended Trial receives request.json, commits HEAD and returns result.json. Code Graders and Pair evidence ignore uncommitted scratch; protocol failures and committed git_exclude paths fail one Trial. Custom runner sessions stream live through record_command --role or import from output_dir/sessions.json into standard OTLP traces, priced from frozen Experiment prices and available in Trial Peek and Waterfall. Quota warnings pause the Experiment; web-search tool calls and missing session accounting void the Trial. evals check-runner freezes the manifest in report mode, collecting every problem, checks each declared login in a throwaway home and roles against the price table, and can run one Trial through the Experiment execution in a temporary directory outside Experiment storage; its Console twin runs that CLI as a subprocess.

Custom process and home-skill content hashes enter Arm identity and cost-estimate history. Changing either starts a new Experiment; unchanged inputs resume their frozen Experiment. Process grading shares one Bar deadline across snapshot preparation and all test selectors.

A factory Command whose every allowed route has no Plan usage records a Paused Command too, and exits 75; a Spec run reads that exit code from each child Ticket run, the one fact of its pause no agent could write. The pause comes only from structured Harness wire frames and the machine's saved Plan usage, never from session text. Its Claim is released without agent-failed, and a record whose Claim put ready-for-agent back is marked handed_back_for_pickup, so the Inbox puts it in Done rather than Needs you. Passes read the same Plan usage before any other GitHub work and skip when every route is held.

An Experiment or Scoring run stopped by a plan limit records a Paused Command. Needs you and Command details name its stopping Harness, window, utilization and reset time when reported, with a resume command to copy. Starting the same work clears that pause from Needs you, keeping finished Trials and Scores. Pauses count as neither success nor failure.

thirdshift score also creates a Command: a Scoring run with a machine-wide lock, sampling merged factory work across configured GitHub owners. Samples, seeds and blind packets stay under ~/.thirdshift/evals/scoring/; thirdshift scores --json lists them by week. A packet holds historical issue text, the merged diff, pull request and CI conclusions, plus merge-time repository files without Git metadata. An independent Grader runs in the Experiment sandbox and checkpoints five criterion Scores per pull request, with its Harness and Model and a local Command-record link when available. A Claude or Codex quota window at 85%, or a Claude rejection, leaves unscored packets for the next Scoring run; a Claude warning with no readable utilization also stops grading. Its record and logs belong to thirdshift's own repository, and the Inbox and Stop read them through the same Command interface. Closed bugs also get proposed Bug origins through the shared Eval sandbox: fix and earlier history → introducing commit or none → GitHub pull requests → local Command record or Built-with line. The first proposal run backfills all closed bugs; Security fixes are excluded. thirdshift bug-origins [issue] --json reads the retained evidence and settlement; --confirm, --correct <pull request> and --none share Scoring’s writer lock. Confirmed origins contribute to their exact retained Ticket run’s show --json metrics and atomically publish proposed code-review Eval task folders. Each pins the PR head and its historical merge-base, keeps historical issue text (or the PR body when no issue was linked) and a draft catch criterion, and requires explicit Eval approval before running. Rejecting or correcting withdraws an old unapproved proposal. The same quota stop during Bug-origin analysis advances no window; a failed Bug-origin session records that bug with no commit, keeps its artifacts, and lets the window carry on.

Scoring samples, Bug-origin proposals and settlements, and Run metrics share retained pull-request attribution. Matching ignores ASCII letter case and trailing slashes. Latest means chronological RFC 3339 time, including UTC offsets, then greatest lexical record path and Command name for ties; invalid times sort before valid ones. Saved local record-path/name pairs select that exact Command under the matching pull request. Missing or mismatched local identities count for nothing; only absent or cross-host attribution selects the latest local Command, so Continuations never multiply a count.

The first sample adds a historical draw of 20 for human calibration; later weeks mark two for you. thirdshift scores <pull request> --mine --json takes the same writer lock and saves your five Scores atomically before returning them beside the model's as JSON. Ordinary CLI and Console reads share a view that withholds model Scores until human Scores exist. Calibration uses the stored assessments before withholding them, taking the latest 20 distinct paired pull requests separately for each criterion, with 18 agreements required.

The Experiments list and live Experiment page read the same retained view as thirdshift experiments [id] --json. The grid opens Trial and Eval task Peeks with Scores and Grader reasons. Session links and thirdshift experiments <id> --session <session-id> share the Experiment's confined Session evidence reader. It validates saved Experiment metadata and reads the selected contents independently of Trial metadata, usage accounting and legacy Verdict upgrades, so unrelated corruption does not hide healthy evidence. Session IDs survive conversion from raw logs to Session traces. Rechecks remain CLI commands, and their updated Verdict appears on the page.

Process Trial completion checks Session traces for the real fix's identifiers before publishing the result. Immutable hits stay beside the original Trial evidence. Console and CLI leak decisions share the Experiment lock and one atomic metadata write with the recalculated Verdict. Pending hits hold the Verdict; confirmed leaks overlay a Void Trial, while dismissals remain on an auditable false-positive list. Each decision records its reviewer, time and reason.

These pages also read proposed Eval tasks from the private suites listed by thirdshift evals list. Their approval action shares thirdshift evals approve <suite> <task> --json's manifest update, behind the Console's sign-in and CSRF checks. Approval changes only the state and starts no work. Future Experiments may select the task; existing Experiments retain their fixed inputs on resume.

The Console's Scores and Bug origins pages read the CLI's retained weekly samples and origin views. Human Scores use the same validation, machine lock and atomic checkpoint write as scores <pull request> --mine; model Scores are withheld from the form response until all five human Scores are saved. Bug-origin Confirm, Correct and Reject call the CLI settlement operation, including its Eval-task proposals and withdrawals. Both pages keep the Console's sign-in, CSRF checks and Themes, and start no work.

For Evals, the hidden --trial flag runs one Code review, Spec review or Built-in or Custom process through the same session code in a prepared repository. A Code review reviews the historical diff and keeps both axis reports without fixing or publishing anything. A process Trial runs its Steps through the local Ticket source, stopping before its first publishing Step. Its Arm names a Process or .toml file, defaulting to ticket-run; Processes needing GitHub before publication are refused at start. Preparation freezes each Process and its referenced home skills by SHA-256, records every Step's Harness, Model and Effort, and checks the frozen files before every Trial. Each Trial gets its own copies in its fresh home. Steps, sessions, times and usage stay under the Experiment and join its Trace. A delivered Trial passes only when its code Grader passes both fail-to-pass and pass-to-pass selectors on the final commit with the reference fix’s tests and changed shared fakes overlaid. Python selectors search the repository after the standard library, so a committed module cannot replace one. Checks run offline in bwrap under the Bar’s timeout; failed Scores retain the failing selector. Stopped-to-ask and failed do not pass, with outcome counts beside the Verdict. Its versioned JSON result and separate output folder keep Trials out of the Inbox and the Usual ranges. Trial protocol.

thirdshift experiment <candidate> owns the two Arms, the fixed Bar and an alternating Trial queue with two workers. Before building an Arm, apart from the release Baseline probe, it shows the remaining Trials, their worst case under the Bar's timeout and an estimate from earlier Experiments' completed Trials per suite and exact Arm setup: build, Harness, Model, Effort and Process. Estimates include priced dollars when that history has complete accounting. It asks on a terminal unless given --yes. Code Graders retain mechanical Scores; fresh model Graders score written criteria from shuffled blind packets on a configured Model outside both Arms when available. One retained-call module owns expected panel identities, capture, pending counts, executable work, complete report inputs and durable publication. Estimates and resume reject unreadable or malformed saved calls with pair, seat and order context before paid work, including later calls behind missing orders. A Grader panel fixed in the Bar grades each pair of process Trials with fresh sessions per seat and presentation order, and reports each seat's calls and the family or per-Model majority beside the Verdict, or counts its merge calls when the Bar does; its estimate per seat and its spend, priced from the frozen table, stay apart from the Arms' cost, and its optional per-run spending limit pauses grading; the Bar's people setting can count readers' blind merge calls on seeded queues instead, with the panel standing in on unread pairs when both are counted. Scores retain reasons, wrong findings and borderline marks. The Verdict module computes paired suite intervals, with borderline counts, Arm minutes, tokens by Model, reported cost and Void counts and causes shown beside the Experiment's Verdict. Trial and model Grader Session traces and code Grader spans share its Command's Trace. Void Trials retry fresh up to twice under the Bar's cause rules, exhausted tasks leave both Arms, and more than a tenth dropped makes the Verdict inconclusive. Repeated Trial-only memory-cap stops produce an Arm finding. Its Command outcome puts a pass in Done and a fail or inconclusive Verdict in Needs you. Its Command record and logs live under thirdshift's repository; private Trial results and Grader artifacts stay under ~/.thirdshift/evals/experiments/. Both workers stop scheduling at a Claude or Codex quota window at 85%, or a Claude rejection, and a Trial cut short is void. A Claude warning with no readable utilization also pauses the Experiment. It supports resume after that pause or interruption, Inbox observation and Stop. Experiments.

Every Pass checks for a live Experiment of the same OS account on this machine before its Command limit and before work. It skips with the Experiment named in its Activity log, including while the Experiment waits for existing Commands across repositories to end. Manually targeted Commands still run with a warning. The Experiment publishes its live record before waiting, names the remaining Commands in its log, status and Console, and starts Arm builds and Trials after they end. Stop interrupts this wait cleanly. --no-wait bypasses it and saves the competing Command count beside the Verdict. Existing Runs and other machines carry on.

Each Experiment freezes a dated token price table, using the bundled standard rates or --prices <file.json>. Every session is priced by observed Model and attributed to its starting Step, including Resumes and fallbacks. Missing usage or a missing price makes the Trial Void with an accounting-gap cause. Retained accounting reports Trial, role and Arm costs and times, with paired median Candidate-to-Baseline ratios from complete, non-Void Trials. Trials spanning Suspended time are marked suspended and excluded from timing summaries, comparisons, ceilings and future timing estimates; outcomes and costs still count. Reports name how many Trials were excluded, and suspension never reruns a Trial. Process evals follow the same rule. Usage-limit pauses between invocations add no Trial time. Frozen comparison prices remain separate from Harness-reported costs.

evals propose-process <repository> retains merged Ticket fixes as private proposed process Eval tasks. Separate test overlays, shared fakes and command-vector selectors stay with each manifest. Host preparation screens fail-to-pass selectors against disposable base and merge checkouts with network access and refuses changed inline Rust tests. Trial preparation exposes neither the fix nor its tests. The process suite declares three Trials and dependencies on its five Factory skills, Built-in processes and the shared Session prompt, Harness, Model and Effort sources.

A prepared Trial runner owns retries, pauses and ordered publication; the two workers submit an Eval task, Arm and Trial index. Fresh execution and recovery follow the saved Bar's cause list and remaining retry budget. Recovery publishes already terminal pending history without another attempt, including after a publication failure, and never replays a retained pause. Attempt results, pending history and terminal results publish while the Trial's execution evidence remains live.

Before either Arm is built, Experiments report approved Eval tasks missing Trial inputs, including in release mode. Spec review Trials keep the production prompt, with no PR service: gh calls fail inside the sandbox and only the reports are graded.

The Verdict module derives intervals at the Bar's pass level and fail level from one set of paired draws, and shares its decision with the additional-task prediction. The pass level defaults to 70% and the fail level to 95%. The Bar records --pass-level and --fail-level before the first Trial and refuses changes afterwards. A pass needs only the pass-level lower bound above the margin (ADR-0025), and a pass wholly below zero is annotated as worse, within the margin. New Verdicts use paired-dirichlet-v4; readers preserve the Bar, Verdict and rule of saved paired-dirichlet-v3, paired-dirichlet-v2 and single-level Experiments. At today's suite sizes no pass level from 70% to 95% lets an A/A Experiment pass 80% of the time, so the default stays at the 70% floor; that needs about 20 code-review and about 80 Spec-review Eval tasks.

The Experiment separately applies optional --cost-ceiling and --time-ceiling ratios fixed in the Bar. Both default off. Paired median Candidate/Baseline ratios above a set ceiling fail; missing measurements cannot pass a set ceiling. A task-clustered Bayesian bootstrap at the pass level reports credibly cheaper or faster Candidates when its interval is wholly below 1; a median above 1 reports higher cost or time. JSON, text and the Console share the Verdict line, retaining the quality decision and any worse-within-margin annotation.

An A/A Experiment uses the same commit and Harness, Model and Effort choices in both Arms, with suites selected explicitly by --suite. It follows the same build, separate Trial, Grader and Verdict path to measure variation when nothing differs. thirdshift experiments <id> --record-difficulty pools its retained non-void Trials into each Eval task's optional Difficulty table, replacing earlier readings atomically per manifest under the suite lock shared with approval. It refuses unfinished Experiments and differing Arms. thirdshift evals lists Difficulty and whether the Eval task is discriminating: 0.15–0.95 inclusive, over at least 6 Trials. Fewer Trials or no table means unmeasured. A/A command example.

The Bar fixes each suite's discriminating list from recorded Difficulty under the suite locks before the first Trial. paired-dirichlet-v4 judges only listed tasks, including for predictions, the Void dropout guard and required rechecks. Other approved tasks run and are graded as measurement, reported per task beneath each suite. CLI text and JSON show judged, measurement-only, void-dropped and other-setup counts. Empty judged lists are inconclusive. Changed lists or changed Difficulty for retained tasks refuse resume after the first Trial, including readings that stay inside the band; older Experiments retain their stored method and Verdict.

The Bar also saves min_discriminating_tasks, defaulting to 20, before the first Trial. --min-discriminating-tasks sets it for one Experiment; a changed minimum refuses resume. A shorter fixed discriminating list makes an Advisory suite, still shown with its Verdict and intervals. Overall aggregation, the Void dropout guard and required rechecks use only suites that are not advisory. All suites advisory gives inconclusive. CLI text, JSON and the Console mark Advisory suites and show judged and measurement counts. The Experiment result lists their Verdicts. With --with-experiment, a Release run requires a terminal override on fail or inconclusive. Saved Experiments without the minimum keep their original Bar and Verdict.

Trial integrity protects the issue text, declared inputs and commits under review. Review commits, local-origin pushes and report files are allowed. Review code Graders receive a private copy of the prepared repository captured before the session, so session edits cannot change the code its checks grade. Process code Graders export the final commit and replace the declared test files and shared fakes from the private reference fix before running the task’s selectors. After the Trials, the same export and overlay run each Arm's new test files on the base and on the other Arm's final commit; the results are kept per pair under the Experiment, apart from the Scores.

Trial completion removes Harness caches from each attempt's Session home, retaining native transcripts and Session evidence. Once grading and all rechecks finish, the Experiment removes every attempt's repository copy. Paused and interrupted Experiments retain repositories for resume. Requests, results, traces, reports, Grader packets and Scores stay readable; pruning failures only warn.

Each Trial, code Grader and model Grader gets its own systemd-run --user --scope with MemoryHigh, MemoryMax, MemorySwapMax and OOMPolicy=kill. Its process raises oom_score_adj before starting work. The wrapper uses the owning Experiment process's /proc/<pid>/exe link, so Trials and Graders keep its original wrapper after an update replaces or removes the install path, including scopes prepared before the update. The requested Arm programs, arguments, environment and caps stay the same. The User config defaults are 1 GiB, 2 GiB and 1 GiB; scopes require a reachable user manager with lingering enabled for logged-out work.

Ordinary Harness sessions use uncapped scopes with OOMPolicy=continue: a child tool's kernel OOM kill leaves the Harness running so it can observe the tool's failure and recover. If the Harness itself fails, its cause names the Unix signal when present and adds (scope OOM-killed) when scope evidence confirms an OOM kill.

The Experiment owns recheck history beside its immutable Grader Scores. thirdshift experiments <id> --json exposes pending borderline and decisive Scores, naming each decisive flip and its resulting provisional Verdict. thirdshift recheck <id> <trial> pass|fail --reason '…' takes the Experiment's exclusive lock and atomically saves the history, recalculated Verdict and pending list. thirdshift recheck <id> --pending lists the pending Scores and their fingerprint; thirdshift recheck <id> --batch <fingerprint> pass|fail --reason '…' checks that list under the same lock and records every listed Score in one atomic save. A stale fingerprint changes nothing. Rechecks stay in the CLI. They also update the latest invocation's Command outcome and Inbox group, preserving its completion time. The Verdict waits until the list is empty; flipping either pass/fail or a wrong-finding flag can make a Score decisive. Waiting rechecks place that invocation in Needs you; a confirmed pass moves it to Done.

A Release run, thirdshift release [<version> | --major | --minor | --patch] [--with-experiment] [--review], owns publication as a Command. With no version it is a Pass: Experiment and Quota gates precede its own locks, and it selects the newest green main commit with shipped changes since the last tag. One tool-less Session in a fresh-home sandbox chooses minor or patch and writes the summary; explicit bump flags pin the version level. It reads fetched Git objects and works in temporary detached worktrees. Its machine-local lock and atomic origin reservation are independent of the Command limit. It waits for bump PR checks, tags the validated head, waits for the release workflow and merges the bump PR. Skips are quiet, deduplicated in the Activity log, and keep Cron jobs' last-fired time. Console starts require admin scope. Discovery adopts unfinished exact-bump releases after publication verification, while human blockers skip quietly. One in-process targeted Fix run may repair the bump PR; its entire tree is revalidated before tagging. --with-experiment pins content and runs the Experiment engine in-process against the prior published tag. A moved content base refreshes the Experiment and summary; terminal-only --review offers acceptance, editing or cancellation.

Schedule a Release Pass with thirdshift release from this repository, using cron or a systemd timer. It quietly skips when nothing shipped or release work waits on the Day shift. For an on-demand Command, use thirdshift release 0.4.0 to cut or resume that version, or pin the bump with --major, --minor or --patch. One fresh-home sandboxed Session chooses minor or patch and writes the summary when no bump is pinned. The Release run selects green shipped content, validates the bump PR, publishes its tag, waits for the release workflow and merges the PR. It leaves the Launch directory alone and never updates the installed binary. Releasing.

Experiments are off by default. Add --with-experiment on each invocation to run or resume the Experiment against the previous release. Pending rechecks and decisions wait; fail or inconclusive requires a terminal override. --review also requires a terminal and offers accept, edit or cancel before pushing. Unfinished exact-bump releases resume; unpublished failed tags can be recovered, while published tags never move. Live Release runs appear in Working, merged ones in Done, and failures in Needs you, including a published release whose bump PR could not merge. Once published, a Release run records its Release URL, links both the bump PR and Release v<version> on its Inbox row, and lists the Release URL after the PR URL in its Run notification. Run notifications follow the same outcomes. thirdshift stop releases the locks and live label.

While waiting for release PR checks, a Merge conflict or completed failing CI starts at most one targeted thirdshift fix <PR URL> --no-merge --no-base-fix. Missing workflows have a five-minute startup grace period, as does GitHub's mergeability report after checks pass; queued and running CI keep waiting. A repaired or externally updated head must still be an exact version bump. A changed content base refreshes the requested Experiment, summary and version diff. A failed Fix, another blockage or more than five head changes stops before tagging with recovery instructions. The Release run owns tagging, publication and merging.

Run metrics and Command details

Fleet metrics preserve each machine's unreadable OS accounts through live reads, saved snapshots and pushed summaries. JSON exposes machines[].unavailable_accounts; text and the Console's Machines list name the accounts omitted from the totals. Older summaries that omit the field supply an empty list.

Every Command compares wall-clock time with host uptime at least every 30 seconds. A gap of at least one minute is Suspended time: it updates the current stage's suspended_seconds in the Command record while live and writes one Command log line. Older stages without the field read as zero. thirdshift show, timed stages in status, and the Console's Command details, Lanes and Stages keep a stage's full wall-clock time and add its Suspended time beside it; show --json includes the seconds and the annotated time. Stages with any recorded Suspended time supply no Usual range sample; other stages, including legacy records, still count. Run metrics retain wall-clock stage times.

Slow compares the stage's age without Suspended time with its Usual range; Silent leaves out suspensions since the logs last grew. Work before suspension still counts, including during CI watch. These rules are shared by status and the Console's Inbox and Needs you; a suspension creates no row or Dismissal target of its own.

Each Ticket run's own process saves its Run metrics at completion in its Command record, including Ticket runs and Base fixes: outcome, Repairs, CI rounds, Unaddressed findings by Standards, Spec and Security, stage times against their Usual ranges, and minutes by stage and in total. Unaddressed findings counts retain Delivery's final PR body and the Security review's count, so later edits do not change them. Each Session stage keeps the review's Standards and Spec finding counts from its summary, with missing counts left missing. thirdshift show <command> --json includes these retained facts. The Console reads the same details, showing each Ticket run's available metrics and marking unavailable signals as Missing. thirdshift metrics <command> [--json] reads a Ticket run with its children; without a Command it groups daily or weekly trends by repository, Harness, requested Model and Effort, Ticket run kind and session kind, and stacks each work Command kind's outcomes as Succeeded, Failed (died records included), Paused or Stopped, leaving out pass-through Pickup runs and skipped Passes. It reads readable Other-account Commands through the same account discovery as the Inbox, tagging each row by OS account. Window presets, dates, repository, Command kind, Harness, Model, thirdshift version and account filters narrow that view, and a bounded window is compared with the preceding one of equal length. Its four signal groups read only local files: Command records, the kept GitHub answer in github-inbox.json without a quota check, and Scoring checkpoints. The Console's Metrics page renders the same document as server-side tables, static SVG bars and sparklines. Historical metrics are computed from Command records without writing back, and missing signals stay missing: an older record's thirdshift version comes from its Session trace's service.version through the retained Session-signals cache, and a failure without a recorded stopped_at and failure_category falls back to its last stage before any trailing cleanup and died or failed. No combined score is produced.

Run metrics and Experiments share one Session usage module for tokens by observed Model and Harness-reported cost. Its normalized-event and retained-span readers resolve call amendments and partial totals, retaining fields a total omits. Input includes cache reads and writes. Reported Session cost wins; otherwise each Model's reported cost replaces its call costs. The metrics reader separately counts tool errors, permission denials, killed work and repeated tool calls within that session. Completion metrics sum these by session kind, and weekly Session trends split by the Harness version from each trace's resource. Saved completion metrics stay fixed. Historical metrics also read converted Session traces, leaving missing traces and unreported measurements missing.

Inbox groups share native disclosure headings across every Theme. They start open, except Done and Resolved, which Overview renders folded below Working, with or without JavaScript, and their own folders open. Each browser keeps only the groups it folded or opened, through live morphs and, when storage is available, reloads; an unchanged group follows the current folder's default, and Overview keeps its Done and Resolved choices apart from those folders'. Folding leaves headings, counts and active-run totals visible and changes no Command state. Folder navigation and keyboard selection skip folded rows.

Every Console page title includes the serving OS hostname, including account pages. Live Inbox and Experiment updates preserve it as their counts and names change.

The Inbox page filters rows and Landing references by repository=<owner/name> after selecting and merging Machine rows. Repository choices come from those rows; section links keep both filters, and section counts follow the filtered rows. The active-runs count remains the selected Machine or Fleet's count across repositories. The status CLI and API keep their existing behavior.

The shared Console header links the serving machine's name to /?section=overview, returning to Overview and clearing any page, Machine or Repository filter.

Console and CLI readers share the User config's [console] other_accounts choice: "none" by default, "readable", or named local accounts. Discovery uses passwd home directories and readable logs.dir overrides, limited by filesystem permissions or ACLs. A directory whose canonical path leaves that account's home is left out, and a file is read only when its canonical path stays under the accepted directory. show and the Console print a Process's Steps from its Command log, and for an Other-account Command they read that log only when its canonical path stays under the accepted directory. An Other-account Command's Session trace is read only when its log records and its spans are regular files whose canonical paths stay inside the directory that holds that Command record. Other-account Commands carry their owner through Inbox grouping, Needs you counts and log readers. Shared Stop and Dismissal checks refuse them before any write or signal; the page offers those controls only for the serving account's own Commands. thirdshift console other-accounts shows or changes the setting.

Command details opens with the Command's issue subject and title, before Stop and Dismiss. The subject links to the issue and long titles wrap. Unknown titles say “(title unavailable)”; Commands without an issue show only their Command subject. The recorded issue title comes from the same details JSON as thirdshift show <command> --json.

Command details reconstruct Session signals only for the selected Command and its nested Ticket runs and dispatches; all records still contribute to Usual ranges and health. Weekly metrics read signals for every Command. A bounded memory cache retains derived signals by the resolved Session trace's path, length, modification time and file identity, checking the identity again after parsing. Disposable *.signals-cache.json files beside each Session trace also retain them across CLI processes and Console restarts. Per-trace locks coordinate readers. Appends, replacements and a different binary invalidate the saved signals; an unwritable cache falls back to parsing. Historical Command records are never rewritten.

Confirmed Bug origins are joined when metrics are read, from local Scoring checkpoints under ~/.thirdshift/evals/scoring/. The latest window's decision for each bug wins. Its retained local Ticket run identity selects the exact Ticket run; cross-host pull-request attribution selects the latest local Ticket run for that URL, as in Scoring, so Continuations never multiply a count. The Scoring data covers both hosts; metrics read no remote records. Late confirmations count in the Ticket run's start week, corrections move the count to the settled pull request, and rejected or unsettled origins count for nothing. Command details in show --json and the Console share this projection and reconstruct available historical metrics. Command records are never rewritten.

Command details reads at most 4 KiB from the end of the selected Command log and shows its last five lines above Full Command log. It uses the confined log reader and the page's existing Command-change connection to refresh the preview as output arrives. Empty or unavailable logs leave the rest of the details readable.

The same reader checks each session's shell commands against one code-owned destructive-command pattern list. Force pushes, shared-branch history rewrites and recursive deletes outside the Worktree are retained with their commands in Run metrics, with flag counts in weekly Session trends. This check is advisory: it never blocks or fails a Ticket run.

  1. Pre-flight checks stop a Ticket 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 on origin.
  2. The Claim labels the issue in-progress while the run is live, so the issue list shows what the factory is working on. It comes off when the run ends: with nothing put back at ready for review, swapped for agent-failed when the run fails with work on origin, with the failure's Recovery posted on the issue as a generated comment except for a Security fix, released with ready-for-agent back and no comment, even with work on origin, when the host ran out of disk space or the run ended as a Paused Command with no route's Plan usage left (leaving needs-triage after an untrusted edit, and agent-failed for a Security fix), and swapped for ready-for-agent when a Spec run is only waiting on gated, blocked or out-of-repository Tickets, so Pickup continues the Spec once a Ticket can start, with a comment naming each undone Ticket and what it waits on.
  3. A Worktree gives the Ticket run its own checkout beside your clone, so yours is never touched.
  4. Implementation runs the implement session, also available to a Custom process as the implement catalogue Step on its Issue-branch worktree. On issues labelled bug, diagnosis comes first: a reproduced bug gets a failing regression test and fix; a Continuation whose Issue branch is ahead of the Base branch reproduces at their merge base, and a fix already on the branch goes on to review and the pull request; an unreproduced bug ends successfully with triage notes and needs-info, skipping later Steps and cleaning up the Claim and worktree. Flaky-test Tickets use the recorded CI failure as evidence and go straight to implementation. Security fixes and Base fixes keep their own flow. Delivery then pushes the branch and checks that the pull request exists and targets the Base branch. thirdshift, not the agent, marks it ready.
  5. PR evidence includes actual failing-before and passing-after execution output. For rendered UI changes, the Factory skills verify the app in the Worktree and capture matching Before and After .png screenshots and H.264 .mp4 interactive walkthrough recordings, attaching them directly on GitHub with gh >= 2.103.2 --attach instead of repository commits so media inherits repository read permissions. Every image or recording has a visible Before or After label immediately above it, naming its flow and viewport; unavailable capture tools or app blockers leave an explicit limitation under ## Evidence. thirdshift setup checks host readiness, and follow-up sessions refresh stale UI captures via gh pr edit --attach.
  6. 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 Ticket run.
  7. The Self-merge, when asked, merges exactly the head commit whose CI thirdshift watched.
  8. Cleaning up removes the Worktree. A Failed ticket run pushes its work first and turns the pull request back into a draft.

Figure 2 · thirdshift <Issue URL>

A Ticket run: one issue in, one pull request out

Work reaches a Ticket 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.

Ready issues come from the Day shift by hand, or from thirdshift itself: an Architect run publishes a plan, a Security run allowed to fix files a fix issue, and a Base fix files an issue for red CI on the Base branch. You, a Pickup run or the run that filed the issue starts a Ticket run on it. thirdshift prepares the Ticket run with checks, the Claim and a Worktree; an agent session implements, tests, reviews and opens the pull request; thirdshift then delivers it and watches CI. Red CI or a conflict starts a Repair session, at most five per Ticket run; out of Repairs, the Ticket run fails with its work pushed and the pull request back to draft. Otherwise the pull request is left ready for review. YOUR MACHINE ideally a VM with nothing from production on it Day shift you, by hand Architect run publishes a plan Security run files a fix, if allowed Base fix files “CI red on base” file issues, labelled ready-for-agent files one Ready issue labelled ready-for-agent Started by you, a Pickup run, or the run that filed it Prepare checks · Claim · Worktree 1 Agent session /thirdshift-implement /thirdshift-tdd /thirdshift-code-review /thirdshift-pr → PR Deliver push, gh pr ready, merge base in 2 Watch CI own failure or Inherited 3 Repair session conflict or red CI; one Check re-run if unchanged red ≤ 5 Failed ticket run out of Repairs: push work, PR to draft, agent-failed PR ready for review
Figure 2 A Ticket run. The agent writes and reviews the code, but only thirdshift decides the pull request is ready.

Figure 3 · thirdshift merge <Issue URL>

A Ticket run that Self-merges

The same Ticket run, one step further. Before each merge request, thirdshift checks that the watched head contains the current Base. When the previous head had checks, bringing in Base changes requires green CI on the new head. A Base branch with a merge queue can use the queue's combined checks. Commits someone else pushed to the branch are reviewed first. A required human review leaves the pull request ready for you.

A Ticket run that Self-merges goes one step further. If someone else pushed commits to the Issue branch, a review Repair looks at them first. Once the pull request is open, ready, mergeable and green, thirdshift checks the review decision and merges it with a merge commit on exactly the head whose CI it watched. The issue is closed and its Claim removed. YOUR MACHINE ideally a VM with nothing from production on it Day shift you, by hand Architect run publishes a plan Security run files a fix, if allowed Base fix files “CI red on base” file issues, labelled ready-for-agent files one Ready issue labelled ready-for-agent Started by you, a Pickup run, or the run that filed it Prepare checks · Claim · Worktree 1 Agent session /thirdshift-implement /thirdshift-tdd /thirdshift-code-review /thirdshift-pr → PR Deliver push, gh pr ready, merge base in 2 Watch CI own failure or Inherited 3 Repair session conflict or red CI; one Check re-run if unchanged red ≤ 5 Failed ticket run out of Repairs: push work, PR to draft, agent-failed Foreign commits someone else pushed: a review Repair new Self-merge review gate, --merge --match-head- commit 4 new Merged issue closed, Claim gone
  • new in this workflow
Figure 3 A Ticket run that Self-merges. thirdshift merges only code an agent wrote or reviewed, never through GitHub's auto-merge.

Figure 4 · thirdshift <Spec URL>

A Spec run: many Ticket runs, one pull request

An issue with sub-issues is a Spec, and its sub-issues are Tickets. Each Ticket gets its own Ticket run that Self-merges, 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. Child Ticket runs keep UI verification local without uploading attachments, while Spec review attaches unified Before and After Visual evidence to the Spec PR, which ends ready for you to review.

A Spec is an issue whose sub-issues are Tickets. Each Ticket gets its own Ticket run that Self-merges into the Spec branch, in the order its blocked-by links allow. One session then reviews the whole Spec branch against the Spec, thirdshift delivers it and watches CI, and the Spec ends as one Spec PR ready for review. YOUR MACHINE ideally a VM with nothing from production on it Spec an issue with sub-issues Ticket a · Self-merge blocked by nothing new Ticket b · Self-merge blocked by a Ticket c · Self-merge blocked by a and b Spec branch each Ticket’s PR merged in; draft Spec PR, checklist Spec review one session reviews the whole branch against the Spec new Deliver + CI Spec PR ready A failed Ticket stops the Tickets that depend on it. The Spec carries the Claim; its Tickets make none.
  • new in this workflow
Figure 4 A Spec run. Many Ticket runs that Self-merge land on a Spec branch, and one Spec PR reaches the Day shift.

Figure 5 · thirdshift pickup, architect, secure

The Passes: the factory finds its own work

Quota admission precedes every Pass's other GitHub work and Command-limit slot: consult the machine's Quota wait record, then gh api rate_limit. Either a current wait or fewer than 500 REST requests or GraphQL points skips the Pass; a low resource records a wait until reset. Non-quota probe failures let work proceed. This applies to Pickup, Architect, Security, Triage without input, Review with --author, Fix without a pull request and issue-less Custom processes, from cron or by hand. Skips exit zero without stdout or notifications and deduplicate the Activity log reason per kind. The Inbox and status show the wait beside last-fired Passes until reset. Frequency is a budget per GitHub user across hosts and repositories sharing that quota. Plan usage admission follows, from this machine's own Plan usage, refreshing a stale Codex or Muse snapshot with its non-billed read and never asking a Fleet peer: when every route the Pass's sessions may take is in cooldown or at its ceiling, it skips the same way, and the Inbox and status show a banner naming the held routes and the earliest reset.

Before selecting a Ready issue, Pickup immediately requests one re-run of failed jobs in the Base branch's latest push CI. Green on re-run files a Flaky-test Ticket with the recorded failure as evidence; its Ticket run goes straight to implementation. Red again files an ordinary bug Ticket after 30 minutes from that attempt's completion. That ticket's title, body and comments leave job names and log lines out, and it waits until you write the task and apply ready-for-agent. A CI-red Ticket in needs-info does not block new reports; another open CI-red Ticket receives new failing commits as comments, once per commit. Concurrent hosts reserve evidence reads, re-running, filing and commenting on origin. CI read failures warn and leave Pickup running; this check does not hold Self-merges.

Once a Pickup run, an Architect run or a Security run knows its repository, it replaces that kind's last-fired time under the repository's log folder, before launch checks or the Command limit. Repeated skips update the time without adding Activity log lines. thirdshift status, thirdshift cronjobs and their Console views read the same per-repository times; no reader starts work. A Custom process started with no issue, and neither an Issue-branch nor a Spec-branch worktree, counts toward the Command limit, runs beside other Passes up to it, takes no lock of a kind, and does not record a last-fired time. A file that declares either branch worktree is refused when no issue is given, before the Command limit.

A Pass takes no Issue URL, so your operating system's scheduler can start it; thirdshift never schedules itself. A Pass is skipped while its repository is at its Command limit, [pass] command_limit, 1 by default: every live Command on the repository on the machine counts, a Ticket run started on an Issue URL included, but only a Pass is skipped. Passes of different kinds share a repository up to the limit, but never two Architect runs or two Security runs at once: each of those holds a lock of its kind and a review worktree of its own, and reserves the plan or fix it dispatches on origin, as a Pickup run reserves its Ready issue. 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. A Custom process started with no issue is a Pass for that rule and does not wait on a Ready issue or an Architect idea, unless the file declares either branch worktree: that is refused before any session, rather than skipped. One started with an issue is not a Pass. Your scheduler can start Architect runs every few minutes and Security runs on a schedule, with fixing allowed.

A Fix run, thirdshift fix <PR URL or number>, targets an explicit PR; with no PR target it is a Pass sharing the repository up to its Command limit. Without --author, it first checks the Base branch's origin tip. A failed first push attempt gets one failed-jobs re-run, then PR selection continues without waiting. Persistent or non-rerunnable failures get a CI-fix session on fix-<base>-<short-sha> and a repair PR targeting the Base branch; that Fix run ends the Pass. All red checks are its own, existing repair PRs prevent duplicates, and merge and email policy apply. Self-merge closes the Base branch's CI-red reports and Base fix issues.

The Pass otherwise searches open, non-draft, same-repository PRs by Trusted accounts with a Merge conflict or current-head CI red, in ascending order. Optional base <branch> and --author <login> scope that search. Selection skips in-progress PRs and pending CI without a conflict, and passes over head branches checked out locally, naming the PR and occupying path on stderr. When none can be taken, the Activity log skip includes those reasons without recording a failed Fix run. Occupied checkouts remain intact; an explicit PR target still fails and names the occupying path. Selection reserves and rechecks candidates before dispatch. Busy reservations pass through to the next candidate. Its fix-run Built-in process is delivery → self-merge, using the existing PR's head branch and Base branch without implementation or initial code review. It holds an origin reservation and in-progress through Repair and failure preservation, and records its own Command log and Run notification. Self-merge requires recorded agent authorship or review of the exact adopted head by thirdshift's GitHub account; completed Ticket, Spec and Base CI Deliveries record their delivered heads too. Absent that evidence, the repaired PR stays ready for review, preserving ADR 0004. Skips record an Activity log reason when it changes and send no notification. Later Passes skip PRs left as drafts. A closing-issue trust stop keeps unpublished Repair work local and leaves the PR in its current state.

The Fix-Pass-only word merge-base-fix grants Self-merge only to a repair newly authored by the Base branch CI step, through the usual Delivery and Self-merge gates. Selected PRs keep the ordinary merge / no-merge and merge.always policy. Thus thirdshift fix base master no-merge merge-base-fix merges a new Base branch repair and leaves selected feature PRs ready for review even when merge.always = true. Existing repair PRs selected later or retried gain no permission from this word or their branch name; merging one requires the usual merge policy, such as targeted fix <PR> merge. Omission, --author scoping and Ticket-run base-fix behavior are unchanged.

A Fix Pass checks every linked closing issue before and after reserving the PR. An in-progress Claim on a Spec or standalone Ticket run's issue, including on another host, makes it skip the PR and name the claimed issue on stderr. It can adopt the PR on a later Pass after the Claim ends. Unreadable links or labels fail closed; explicit PR targets keep their existing behavior. Once the Pass has selected a pull request, an untrusted author of a linked closing issue, or any title or body edit by an account that is not a Trusted account, stops the Fix run before the issue is used and does not take the next candidate.

Pending or re-running Base branch checks, an occupied CI reservation, or an existing repair branch or PR skip only Base branch maintenance and leave PR selection available. Stderr and the Activity log record the reason, including when no eligible PR is found. Failed opening Base CI sessions publish preserved work as draft repair PRs with a Fix Recovery command. An existing repair branch prevents another attempt if PR creation failed.

When the adopted head has no recorded agent authorship or review, a Fix Pass, including one asked to merge, repairs the PR and finishes successfully Ready for review (exit 0), logging why Self-merge was held. A targeted Fix run asked to merge only by merge.always does the same. An explicit thirdshift fix <PR> merge still fails with the hold and leaves the repaired PR ready. A later Pass skips the mergeable, green PR, allowing a Review Pass to take it.

Before publication, Base branch maintenance compares the head before and after its CI-fix session. An unchanged head ends successfully with no repair branch push, PR or further Check re-run; stderr and the Activity log record that it found nothing to change on that Base branch at that commit. A local Git ref in the Launch repository records the Base branch and full commit while the CI reservation is held. Later Passes there skip that CI-fix and leave PR selection available.

The Inbox reads a later Command's pull request URL as well as its issue number to take up earlier rows waiting in Ready for review or Needs you. A Fix run therefore takes over an earlier waiting row even without a linked issue; the row records “taken up by a later Command started at <time>”. Ready for review rows with CI red or Merge conflict offer Start Fix run when the destination currently permits run and knows the repository's Launch directory. The existing confirmation submits the PR identity to /api/v1/runs locally or the Fleet forwarding route for its owning machine, using that machine's User config and CLI defaults. Other-account Commands stay read-only. Copy fix command, thirdshift fix <PR URL>, remains on the row and in Command details.

The three PassesThe operating system’s scheduler starts three kinds of Pass, each taking no Issue URL. A Pickup run sweeps closed issues, respects the Failure limit and runs the lowest-numbered Ready issue by default. An Architect run reviews the architecture and either publishes a plan, which it builds with a Ticket run or Spec run, or files an idea for the Day shift to triage. A Security run audits the Base branch, reproduces findings, records each privately and, when fixing is allowed, files a fix issue and runs it. Its target code may run only inside an OS-enforced sandbox, as the Security audit skill requires. YOUR MACHINE results leave only as GitHub issues, PRs and private advisories OS scheduler cron, launchd new Pickup run Sweep, Failure limit, then lowest Ready issue by default Ticket run Figure 2 Architect run an Architecture review finds the top idea Architect plan ready-for-agent Architect idea needs-triage, for you Ticket run or Spec run · Fig. 2–4 target code: OS sandbox required Security run audits the Base branch; runs code to reproduce Security finding recorded privately: advisory or issue Security fix if allowed: files an issue and runs it Security runs on a schedule, with fixing allowed
  • new in this workflow
Figure 5 The Passes. The factory finds Ready issues, architecture plans and vulnerabilities by itself.

thirdshift triage

A Triage run: investigate a Report or an existing issue

Every input mode accepts base <branch>, including piped Reports and --file; it defaults to the checked-out Base branch. When the existing issue carries security-finding, its Run notification contains only the recorded title and link, even on failure. The private investigation, questionnaire and failure diagnostics remain in the issue or local output and logs.

Existing-issue triage prepares images on the host before launching the session: up to ten unique HTTPS images from the trusted body and comments on github.com or *.githubusercontent.com, each limited to 20 MiB and 30 seconds. Successful downloads live under .thirdshift-issue-images/ in the throwaway worktree and are listed by original URL and local path in .thirdshift-issue.md. The session inspects these local files, including with --read-machine; failed downloads warn and leave the issue text available.

thirdshift triage <Issue URL or number> [base <branch>] updates an existing open issue in place. It checks the repository, Trusted-account author and title/body edit history, then supplies only Trusted-account comments to the session. The Base branch defaults to the checked-out branch. Unless --recommend-only is set, an origin reservation spans its Claim, publication and cleanup. The Claim replaces prior triage state and agent-failed with in-progress; one AI-attributed comment and the resulting state complete it, preserving category labels and closing wontfix. Readiness without permission becomes ready-for-human. Failure uses ready-for-human and agent-failed; Stop uses ready-for-human, or needs-triage with --requeue, without a failure label. Recommendation-only mode validates without reserving or writing to GitHub. An issue cannot be combined with --file.

Report and existing-issue sessions receive the repository's available category labels, using the same factory-label exclusions as publication. A valid recommended category is required even when an existing category will be preserved; any other category gets the one correction turn. A Security finding keeps its security-finding label and gains the recommended repository category when it has none.

With no issue or --file, thirdshift triage [base <branch>] is a Pass when stdin is a terminal or empty at EOF, including cron. Command-limit admission precedes the Sweep and pickup.failure_limit. The search takes one open needs-triage issue in pickup.order, passing over contradictory triage states, Claims, failures, parent Specs with sub-issues and untrusted authors or edits. It reserves on origin and rechecks state and trust before in-place triage, continuing to the next candidate if reserved or stale. Skips exit zero without notification and deduplicate their Activity log reason, honouring activity.quiet_skips.

A Triage run, thirdshift triage, takes a Report from stdin or --file. A Report is work already given, so it always takes a Command slot, even at the Command limit, and is never skipped. The embedded thirdshift-triage skill investigates read-only in a unique throwaway worktree and searches the repository's open issues before proposing new issues. It returns category, state, proposed issues, existing-issue comments and investigation as JSON. thirdshift comments on an open issue already covering the Report, quoting the Report and source with new evidence, and keeps its labels. It files new issues with a disclaimer, collapsed verbatim Report and source, exactly one category and state, and cross-links between separate problems. thirdshift owns readiness: ready-for-agent becomes needs-triage unless --allow-ready-for-agent or the User config permits it. thirdshift setup asks whether Triage runs may file ready-for-agent issues by default; the initial answer is No, and rerunning Setup keeps the saved answer as the default. Confirmation needing credentials or production access becomes ready-for-human with a reason, and a wontfix issue is closed once filed. With --recommend-only, it publishes nothing and names any issue it would comment on, but still makes filing's checks against GitHub, so it fails wherever filing would. Its full JSON result goes to stdout. The Run notification summarizes the investigation, issue titles with category and state, and comment target URLs as readable text, omitting the full JSON and issue and comment bodies. Every filed or commented-on issue link reaches stdout and the Run notification. The session uses the ordinary trusted Harness with instructions to stay within its worktree, preserve code and write nothing to GitHub; it starts no implementation.

A Triage run's needs-info issue carries a questionnaire written with the embedded thirdshift-to-questionnaire skill for whoever has the answer. thirdshift includes it in the issue body and as readable text in the Run notification for the Day shift to forward. Other outcomes, including ready-for-human, get none; the issue body describes any needed decision or operator action. Empty or whitespace-only questionnaires count as absent before state validation. Publication stays in the repository; thirdshift never contacts the reporter outside it. With --recommend-only, the questionnaire stays in the proposal and notification.

The opt-in --read-machine, or the repository named in the User config's triage.read_machine, wraps that Harness invocation, including a Resume, in Bubblewrap. The host filesystem is mounted read-only and only the throwaway worktree and a private Command scratch subdirectory are writable; the session can read outside it with the account's normal permissions. Unix-domain sockets are refused, so a host service cannot write for the session. TCP stays available. Sandbox startup failures fail the Triage run with their diagnostics, without an unsandboxed fallback. This requires bwrap and working Linux user namespaces. Without either, the ordinary launch and worktree-only prompt remain.

Figure 6 · from the outside in

Containment: where the boundaries are

Ticket run, Spec run and Security sessions 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. Security sessions may run target code only inside an OS-enforced sandbox, as the Security audit skill requires. thirdshift ships a sandbox runner for Trials and Graders; Ticket run, Spec run and Security sessions run unsandboxed.

Containment, Trusted accounts and the sandbox probeNested boundaries around an agent session: your machine, ideally a virtual machine with nothing from production on it; your user account, whose permissions and logins every session has; and the Worktree, which keeps checkouts apart but is not a security boundary. Setup probes bubblewrap when security is enabled, checking network isolation, a read-only host home and scratch writes. Security target code requires an OS sandbox; thirdshift’s bwrap runner covers Trials and Graders, while Ticket run, Spec run and Security sessions are unsandboxed. The dotted runner is proposed. Trusted accounts gate Pickup’s authors and ready labels, and which issue comments sessions receive. Work leaves through GitHub and the model provider. YOUR MACHINE ideally a VM with nothing from production on it YOUR USER ACCOUNT every session has all its permissions, sudo too thirdshift starts every session Logins gh, git, Harness: any session can read and use them Setup Security enabled: bubblewrap probe Network, home and scratch checks WORKTREE keeps checkouts apart; not a boundary Agent session Harness sandbox and approvals off (ADR-0013); Claude Code’s auto mode screens risky actions OS SANDBOX RUNNER required for Security target code not shipped · #726 no target-code runner yet Ticket run, Spec run and Security sessions are unsandboxed #398: sandboxed Codex still open required for target code GitHub pushes, PRs, labels, private advisories: the work leaves here Trusted accounts Pickup: author and ready label Sessions: only their comments Model provider API prompts, and the code quoted in them, leave the machine here git, gh HTTPS
  • your machine
  • enforced by the OS
  • keeps things apart, not security
  • proposed, not built
Figure 6 Containment. Setup's probe is shipped; thirdshift's sandbox runner covers Trials and Graders. The host prepares each Trial repository's pinned Rust toolchain before its session, sharing preparation across Trials with the same pin; the sandbox's network allowlist stays unchanged. Trusted accounts limit the issue material handed to a session, not what the session can do.
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 gh and git logins and push with them (#691).
The Worktree
not a security boundary It keeps your checkout and other Ticket 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.
Setup's sandbox probe
shipped · capability check With security.review or security.fix on, Setup checks this machine's bubblewrap sandbox: network isolation, a read-only host home and scratch writes with a dummy home directory. Before running target code, each Security session must enforce no external network; an empty environment populated from an explicit allowlist with safe values, with scratch-local HOME, temporary directories and caches; a read-only target and toolchain, with writes only inside scratch; and explicit low CPU, memory, process, file-size, disk and wall-clock limits. If it cannot enforce every control, Security runs and Security reviews on this machine report findings as needs-validation instead of reproducing them. The probe result does not stop Setup. Passing the probe is a capability check, not isolation for later sessions. Setup and User config.
An OS sandbox
required for Security target code · runner not shipped The Security audit skill requires an OS-enforced sandbox before running target code, with network, credential, write and resource isolation. If those controls cannot be enforced, the session must leave execution for validation. thirdshift ships no runner for Security target code yet (#726). Trials and model Graders run in bwrap sandboxes with provider-only networks; Code Graders run offline. Graders see their packets and, for Code Graders, a private grading repository; raw Trial logs and Arm mappings stay hidden. Ticket run, Spec run and Security sessions run unsandboxed; sandboxed Codex sessions remain open work (#398, ADR-0013).
Trusted accounts
issue input, not process isolation The repository's owner, organization members and collaborators. A session gets its issue's title, body and only these accounts' comments. Pickup takes only issues a Trusted account wrote and whose latest ready-for-agent label a Trusted account applied, with no later title or body edit by another account. Pickup and Triage Passes can further exclude named authors with repeatable skip-author <login> words, matching case-insensitively. Pickup excludes a skipped author's whole Spec and stops its dispatched Spec run before any skipped author's Ticket. Explicit Issue URL runs keep the usual trust checks. Ticket runs check their issue before each session (including a Resume) against untrusted edits since the run started; Fix runs, Review runs and pull-request Custom processes apply that same check to every linked closing issue (retaining previously linked ones) around Repair, Resume, pushing and merging; Review runs also enforce it before writing .thirdshift-review-input.md, around every Step, session and Delivery, and through Self-merge without drafting the pull request. A Review run, a Fix run, or a pull-request Custom process, including one started as a Pass, also stops before using a linked closing issue unless that issue's author is a Trusted account and no account that is not one has edited its title or body. Pickup's trust checks.

Next: what an unattended session can do, How thirdshift works step by step, or every prompt and skill the agents get.