Skip to content

Configure the factory ​

This page tells an operator what to set, and in which order, after the installation. Read Start here: how Synth City works first. It explains the ideas and the words. The Glossary defines each term.

Each section links to the reference page that has the details. This page does not repeat them. Ports, paths, user names, labels and repository names in the examples are examples. Use your own.

Day one, in order ​

  1. Server settings. Set the operator token and the GitHub token in .env. Restart the backend. See Server settings.
  2. GitHub. Create the labels. Make sure that CI runs on pull requests (PRs) into your base branch. See GitHub: labels, branch and CI.
  3. Agent Mail. Install the Agent Mail hooks and the MCP server for each harness (the agent program) that you use. See Installation and Agent Mail.
  4. Team. Create a team, add its slots and choose the Leader. See The team and Slots.
  5. Repository scope. Add a repository scope. Save it disabled. See The repository scope.
  6. Policies. Set the delivery policy and the continuation policy. See Delivery policy and Continuation policy.
  7. Workspaces. Register one dispatch workspace for each item that may run at the same time. See Dispatch workspaces.
  8. Launch. Launch the team and check that each member is ready.
  9. Readiness. Read the activation readiness of the scope. Resolve every blocker.
  10. Review. Look at the other enabled scopes of the team, and at overlaps with other teams. Turning team autonomy on resumes every enabled scope of the team.
  11. Autonomy. Turn team autonomy on. Then enable the scope. Use low concurrency. Watch the first item from plan to merge.
  12. Ready labels. Add the ready label to the first issues.

The guided setup on the Repositories page does steps 4 to 8 for you. It saves the new scope disabled, and it keeps saving, launching and activating as separate, reviewed actions. See Turn it on.

Server settings ​

These settings live in .env. Nothing here is needed to start Synth City. They matter when you run teams and autonomy. Setting names are not case-sensitive: operator_token and OPERATOR_TOKEN are the same setting.

The backend reads .env from its working folder. Real environment variables override the file. A setting that holds a list needs a JSON value, for example GITHUB_COORDINATION_HOLD_PATHS=["/path/to/HOLD.json"].

SettingDefaultExampleWhat it decides
OPERATOR_TOKENemptythe output of openssl rand -hex 32Protects every operator change. Set it.
GITHUB_TOKENemptya token with access to the repositoryPolls issues, PRs and checks, and merges. Autonomy needs it.
GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY_PATH, GITHUB_APP_BOT_LOGINempty—Optional. Set all three to let the factory act as a GitHub App. A partial set is an error.
HOST, PORTthe local loopback address, 8000the local loopback address, 8011PORT is the port that agents use to call back (the Mail shim and the git credential helper). The address that the backend listens on comes from the command that starts it (--host, --port). Keep it on localhost.
DATABASE_URLsqlite+aiosqlite:///./synth_city.dba path in your state folderThe path is relative to the working folder. Use an absolute path on a factory.
HARNESS_AGENT_USERnoneagentuserThe user whose ~/.claude folder the Harnesses pages show as "global". Use it when the agents run as another user.
MAIL_CAPABILITY_TOKENS_REQUIREDtruetrueAgents must prove their session for Agent Mail writes. This ties a session to its terminal pane, and it works on Linux only.
GITHUB_DISPATCH_INTERVAL_SECONDS6060How often the watcher polls GitHub.
GITHUB_MIN_AVAILABLE_MEMORY_MB30003000Dispatch waits while the available memory (MemAvailable) is below this value.
GITHUB_LEADER_ACK_TIMEOUT_SECONDS, GITHUB_LEADER_ACK_MAX_WAIT_SECONDS300, 1800—How long the Leader has to answer a plan. Each team can override them. See The team.
GITHUB_OWNER_IDLE_TIMEOUT_SECONDS900—When an idle builder gets a nudge.
MAIL_REQUEST_UNANSWERED_SECONDS1200—When an unanswered Mail request counts as stalled (60 to 86400).
GITHUB_COORDINATION_HOLD_PATHSempty list["/path/to/HOLD.json"]An emergency stop. While any listed file exists, new dispatch, automatic merge, reminders and Leader coordination hold. Agents that already run keep running. Use absolute paths.
GITHUB_PUBLISH_SUMMARIES_ENABLEDfalsetrueSynth City keeps one comment on each PR that shows the head, the checks, the review verdict and the remaining work. It edits that comment in place. Each team can override this.

Why so many timers?

An agent cannot tell you that it is stuck. It stops talking. Synth City watches for silence, not for errors. Each timer means: after this long without news, do something. It nudges the builder, reminds the Leader, tells the Supervisor or escalates. Change a timer only after you have seen a real problem.

These timers and limits change rarely. The default value is in brackets.

  • GITHUB_CHECK_SIGNAL_GRACE_SECONDS (120), GITHUB_OWNER_REGISTRATION_GRACE_SECONDS (120), GITHUB_NUDGE_GRACE_SECONDS (180)
  • GITHUB_DESIGN_ACK_MULTIPLIER (3): design issues get this multiple of the Leader windows.
  • GITHUB_TEAM_IDLE_TIMEOUT_SECONDS (1800), WAKE_FOLLOWUP_ENABLED (true), WAKE_FOLLOWUP_DELAY_SECONDS (120)
  • GITHUB_STALE_LEASE_BACKSTOP_SECONDS (21600), GITHUB_BRIEF_DELIVERY_MAX_NUDGES (2), GITHUB_CONTINUATION_PROPOSAL_EXPIRY_SECONDS (3600)
  • Three …_NUDGE_COOLDOWN_SECONDS settings (180 each).
  • BRIDGE_ATTACHMENT_*: where pasted images are kept, and their limits (10 MB each, 7 days, 100 for each session each day).

GitHub: labels, branch and CI ​

The factory reads labels. It does not read minds. A label is visible on the issue, it has a history, and anyone can change it from any device. You steer the factory by changing labels.

GitHub itemExampleEffect
Ready label (dispatch_label)my-project-readyAdding it queues the issue. Removing it while the item is pending or running escalates the item.
Design label (design_label)my-project-designThe issue becomes a design item. A person always reviews a design PR.
Review hold label (review_hold_label)my-project-review-holdWhile the PR or its issue has this label, automatic merge waits. The backend only reads the label. People and agents add and remove it.
Area labelsarea-core, area-uiRouting. The first enabled builder, in roster order, whose area_labels include one of the issue's labels gets the issue. The match is exact and case-sensitive. If none matches, the issue stays pending with the reason no_eligible_owner.
Difficulty labelsdifficulty:low, difficulty:medium, difficulty:highOnly builders whose capability tier allows the difficulty can get the issue. See Slots.
Priority labelspriority:1 to priority:9999Queue order. The lowest number goes first. An issue without a priority label goes after all the others.
Milestonev1.0The team's backlog_milestone. The team admits only issues in that milestone. See The team.
Base branchrelease/v1.0Where PRs go. Its CI must run on PRs into that branch. If CI does not run, no checks appear and nothing merges.
CI checksfive job namesThe checks that the delivery policy names in required_checks. See Delivery policy.

Lanes

Give each builder its own area label, and give each issue one area label and one priority. Two builders then rarely work on the same part of the code, and the queue stays clear. An issue without an area label is never picked up. That keeps tracking issues out of the queue.

Never hold a queue by removing ready labels, because that escalates items. Give an item a higher priority number instead, or turn autonomy off. See Autonomous GitHub Dispatch.

Which GitHub account the factory uses ​

Every action on GitHub is done as some account. The factory has three kinds of actor. You choose the account for each of them.

GitHub actionDone byAs which account
Read issues, PRs and checksThe backendThe owner of GITHUB_TOKEN
Merge, and close an issue after a mergeThe backendThe owner of GITHUB_TOKEN, also in App mode
Push the branchThe builderAmbient mode: the agent user's own git and gh login. App mode: a short-lived App token from a credential helper. The helper works only while the builder holds the lease of its workspace.
Open the draft PRThe builder (ambient mode), or the backend (App mode)Ambient mode: the agent's login. App mode: the App's bot.
Add or remove labels, and commentThe builder or the verifier, with ghThe agent user's gh login
Author of a commitThe builderNot a GitHub account. It is the slot identity that the backend writes into the workspace.

The mode is a field of the repository scope: github_auth_mode is unknown (the default), ambient or app. It is not a server setting. With unknown, the first dispatch uses app when the App settings are complete and the App is installed on the repository. Otherwise it uses ambient.

Three choices work, from simple to strong:

Your own accountA machine userA GitHub App
What it isYour own login, for the agents and for GITHUB_TOKENA separate GitHub account for the factory, invited to the factory's repositories onlyAn App that you create and install on the repositories. Synth City makes short-lived tokens from its private key.
SetupNoneA new account, an invitation with Write access (not Admin), and a fine-grained tokenCreate the App, keep its key, install it, and set the three GITHUB_APP_* settings
If it is misusedEverything that you can doOnly the factory's repositoriesOnly the installed repositories, and pushes only while a lease is held
Who did what on GitHubYou cannot tell your actions from the factory'sThe factory's account and yours are separateThe bot and people are separate
Good forA trial on a test repositoryA first real factoryA long-running factory, or several teams

Recommendation

Use a machine user for a dedicated factory from the first day. Give its fine-grained token only these permissions, and only on the factory's repositories:

PermissionAccessWhy
ContentsRead and writePush branches, and merge
Pull requestsRead and writeOpen PRs, mark them ready, and merge
IssuesRead and writeLabels, comments, and closing issues
Checks, Commit statuses, ActionsReadRequired checks and their jobs
MetadataReadRequired by GitHub

Log the agent user in as that account (gh auth login, as the agent user). Use a token of the same account for GITHUB_TOKEN. Never give the agents an Owner or an Admin token. Keep branch protection with required checks on your main branch as a safety net.

In App mode the backend still uses GITHUB_TOKEN for polling and for the merge call. With Auto merge policy it needs write access to contents, pull requests and issues. A read-only token works only with Human merge policy, and then the backend cannot close issues.

The team ​

A team is a preset: a roster of slots with one Leader, and the campaign settings. One team for each campaign is a good habit.

FieldDefaultExampleWhat it decides
namenonemy-project-v1Unique.
descriptionnone"the first release"Shown on the Teams page and to agents.
backlog_milestonenonev1.0The team admits only issues in this GitHub milestone. An issue in another milestone is deferred. Overview shows the progress of the milestone. Two teams on one repository must not claim the same milestone: neither would dispatch.
parent_issue_urlnonethe URL of a tracking issueA fallback for progress: the backlog reader uses the milestone of that issue. It must be an HTTPS GitHub issue URL.
planned_decisionsnoneup to 12 entries, each with a text and a state (later, now or done)Your own list of decisions for the campaign. Overview shows it.
leader_ack_timeout_seconds, leader_ack_max_wait_secondsthe server default (300, 1800)300, 1800How long the Leader has to answer a plan request (30 to 86400). The maximum must not be below the timeout.
Leader (PUT …/presets/{id}/leader)nonethe Leader slotThe Leader approves plans. It never owns an issue. You can change it only while autonomy is off and the team is quiet (no dispatched item, pending approval or leased workspace).
autonomy_enabledfalsefalse until launchThe master switch for dispatch. Turning it on needs an enabled Leader slot.

The UI shows the milestone, the planned decisions and the Leader timers, but it does not edit them. Change them with PATCH /api/v1/agent-teams/presets/{preset_id} and the operator token. See the Agent Teams API.

Why a Leader, and why a deadline?

Builders are good at doing, but not at judging scope. They tend to do too much. The Leader reads each plan before any code exists, when a correction is cheap. It never builds, so it never approves its own work.

A plan request blocks a builder. After leader_ack_timeout_seconds the Leader gets a reminder, and a bound Supervisor gets a notice. After leader_ack_max_wait_seconds an inactive Leader's request can end, so a busy or broken Leader cannot hold builders for ever.

Duplicate a team

Duplicate the last team for a new campaign. POST /api/v1/agent-teams/presets/{preset_id}/duplicate copies the description, the milestone, the planned decisions, the Leader timers and every slot with its charter and launch options. It maps the Leader to the new slot. It does not copy autonomy (the copy is off), the Supervisor binding or any repository scope. It also keeps each session_id. Clear every copied session_id, so that each member starts a new conversation.

Slots: one per team member ​

A slot is one seat in the team. The agent in it is the member. Add the slots on the Teams page or in the guided setup. See Teams.

FieldDefaultExampleWhat it decides
display_namerequiredBuilder 1 (core)Shown everywhere. Name the role and the model.
providercodex-cliclaude-codeThe harness: claude-code, codex-cli, copilot-cli, opencode-cli, pi-cli, muse-cli or antigravity-cli.
rolenonecoordinator, implementer, verifierFree text. Two values have a meaning in the code. A coordinator slot never gets routed work. A verifier slot can accept a head for automatic merge. The Leader is chosen with the Leader field, not with the role.
repo_pathrequired/home/agentuser/work/build-1The member's own folder. It must be an absolute path under the home folder. Keep it in the same repository as the scope.
area_labelsnone["area-core"]Routing: which issues this builder takes.
capability_tierunset (counts as high)mediumlow, medium or high. With difficulty labels, only slots whose tier allows the difficulty get the issue. Otherwise the issue stays pending with difficulty_above_tier.
charternonethe member's rules, in plain sentencesThe most important field. See Recommended charter practices.
bootstrap_promptnone"Read your charter, then the open issues."When set, it replaces the default first message. The Leader instructions and the delivery defaults are still added.
launch_modeplainplain, then resumeplain starts a new conversation. resume continues a saved one. See below.
launch_options{}see the next tableFlags for the harness.
controlled_language_enabledtruetrueAsks the agent to write short ASD-STE100 sentences.
expertisenone—Stored. It does not route work. Use area labels.
enabledtruetrueA disabled slot gets no work and cannot accept a review. You cannot disable the Leader slot.
ui_color, positionnoneblueDisplay only. The color is one of blue, purple, green, amber, red, cyan or slate.

Why must a different agent verify the work?

An agent that reviews its own work sees what it meant to write, not what it wrote. So the owner of an item and the Leader can never accept a PR. Only an enabled slot with the role verifier, in the same team, can. The acceptance is tied to one exact commit (the head), because a push after the review could add code that nobody reviewed. After a push, the item shows "Head changed since acceptance", and automatic merge waits until a verifier accepts the new head.

Plain or resume? ​

plain starts a new conversation. The agent knows only its charter and its first message. resume continues a saved conversation (session_id) with everything that the agent learned.

  • Claude Code: the modes are plain, worktree (needs launch_options.worktree_name) and resume. After a plain launch, Synth City writes the new session_id into the slot and switches the slot to resume.
  • Codex CLI: the modes are plain, resume and fork. A plain launch stays plain. You switch to resume yourself. Synth City can see the activity of a Codex member only in resume mode with an explicit session id. Before that, the activity shows as unknown.
  • Other harnesses: plain and resume.

Launch options ​

A key that belongs to the other harness is refused with Unsupported launch_options for <provider>. A model must be a concrete model id.

OptionClaude CodeCodex CLIExample
model--model--modela concrete model id
reasoning_effort--effort: low, medium, high, xhigh, maxmodel_reasoning_effort: low, medium, high, xhighhigh
skip_permissions--dangerously-skip-permissionsnot acceptedtrue for unattended members
dangerously_bypass_approvals_and_sandboxnot acceptedbypass approvals and sandboxtrue for unattended members
sandbox, approval_policynot accepted--sandbox, --ask-for-approvallimits instead of the bypass
no_alt_screen—--no-alt-screentrue (keeps the pane readable)
session_id--resume <id> in resume moderesumes that session (fork <id> in fork mode)set after the first launch
use_last—resume --lastfalse for team members
profile—--profilea Codex profile name
promptthe last argumentthe last argumentoptional

Unattended members

An unattended member must never wait for a person to answer a permission prompt. A member that stops at a prompt waits for no one.

  • Claude Code: set skip_permissions. It removes the permission prompts.
  • Codex CLI: you have two choices. dangerously_bypass_approvals_and_sandbox removes both the prompts and the sandbox. Or set sandbox and approval_policy instead. The sandbox limits what the member can touch, and the approval policy decides when Codex asks. Synth City passes both values to Codex and does not check them. Use the values that the Codex CLI help lists. Choose an approval policy that never asks, and a sandbox that still lets the member write in its workspace and reach GitHub.

A sandbox that blocks a needed action stops the member, so test one item before you leave the team unattended. With the bypass, the charter, the review hold and the verifier carry the safety. With a sandbox, the sandbox carries part of it.

Synth City ships charter templates for the Leader, the builders and the reviewers. Guided setup offers them with Start from a template. See Charter templates. These practices have worked in earlier campaigns.

PracticeWhy
Keep a plan to about 60 active minutes. The scope enforces its plan limit, and a plan over the limit is refused with plan_estimate_exceeds_limit.Big plans fail review and stall. Split them.
Run focused tests locally. Run the full suites on CI.Builders do not wait for the full suites. CI runs them while the verifier reviews.
Put a test evidence block in every handoff.The verifier trusts the run without repeating it.
Put the review hold label on every PR. The accepting verifier removes it.The backend blocks automatic merge while the label is on the PR or the issue. Who removes it is a team rule.
Never use interactive question tools.No one answers, and the agent waits for hours.
Send each question to the right place: plans to the Leader, incidents to the Supervisor, roster, model, budget and release questions to the Director.A question goes to whoever can decide.
Never use pkill or pattern kills.All members can share one operating system user.
PRs target the release branch, never the main branch.Nothing reaches the main branch before the release.

The repository scope ​

A repository scope is one team's watch on one GitHub repository. Add it on the Repositories page (guided setup), or with POST /api/v1/agent-teams/presets/{preset_id}/github-scopes. A team has one scope for each exact owner and name of a repository. See Repositories for the definition.

FieldDefaultExampleWhat it decides
repo_owner, repo_namerequiredexample-org, example-repoThe GitHub repository. Use the same spelling every time.
repo_pathrequired/home/agentuser/work/main-cloneAn existing main clone (the primary checkout). The dispatch workspaces are created beside it.
base_reforigin/HEADorigin/release/v1.0What each item branches from, and where its PR goes.
dispatch_labelalbiex-synth-city-readymy-project-readyThe ready label.
design_labelalbiex-synth-city-designmy-project-designThe design label.
review_hold_labelnonemy-project-review-holdBlocks automatic merge while it is on the PR or the issue.
merge_policyhumanautohuman: PRs wait for a person. auto: the backend merges when the required checks are green, a verifier accepted the exact head and no hold label is on.
max_auto_merges_per_day510A cap on automatic merges in 24 hours.
merge_check_wait_minutes6030Minutes a pending check may delay automatic merge before human fallback (1 to 1440).
max_concurrent_dispatched32Items that run at the same time. Each one needs its own workspace.
max_item_effort_minutes120120The effort ceiling of an item (15 to 1440). See below.
effort_extension_cap_minutes3015Minutes one extension may add (0 to 1440).
effort_extension_cap_percent2520Percentage of the original effort limit one extension may add (0 to 100).
max_plan_estimate_minutes60 (never above the ceiling)60The largest estimate that a first plan may state (15 to 1440). Set it by API.
initial_paths_requiredfalsefalseWhen true, a first plan must list its files.
max_approval_rounds33Plan rounds before the item escalates.
max_verification_retries22Review or CI retries before the item escalates.
github_auth_modeunknownambientambient uses the host's login. app uses the GitHub App. See Which GitHub account the factory uses.
builds_out_of_tree, build_dir_template, build_command_hint, max_build_parallelismfalse, build, none, 4defaultsFor compiled projects that build outside the source folder.
enabledtrue by APIfalse until launchWhether the watcher polls this scope. Guided setup saves a new scope disabled, with lower limits (one concurrent item, one verification retry, and no automatic merges under Human policy).

The Repositories page edits the review hold label, the effort ceiling and initial_paths_required (the Review hold and effort limit dialog), and the continuation policy. The other fields change with PATCH /api/v1/agent-teams/github-scopes/{scope_id} and the Director key. See the Agent Teams API.

The Review hold and effort limit dialog also includes the four amendment safety bounds. It shows what each increase permits before asking the Director to type safety_bounds. Decreases save with the Director key alone.

Why limits on the scope?

Each limit stops a different kind of runaway.

LimitWithout itExample
max_concurrent_dispatchedBuilders pile up items that they cannot finish, and the CI queue grows.2 is one item for each builder.
max_approval_roundsA builder and a Leader argue about a plan for ever.After 3 rejected plans the item escalates. The issue probably needs a split.
max_verification_retriesA PR keeps failing CI, and the builder keeps trying.With 2, the third failed round escalates.
max_plan_estimate_minutes and max_item_effort_minutesHuge plans get approved.A plan that states 90 minutes is refused with the defaults. Split the issue.
max_auto_merges_per_dayA bad rule or a broken check merges many PRs before you notice.Use a low number while you build trust.

Effort. The estimate in the approved plan becomes the effort limit of the item. Reaching it stops nothing. The Leader and the builder each get one message. The Leader can then extend the limit in steps. Each step is bounded by the smaller of the scope's minutes cap and its percentage of the original limit. Setting either cap to zero disables extensions. An extension never goes past max_item_effort_minutes. It is a speedometer, not a brake. A plan with no estimate gets the ceiling as its limit.

Merge policy. Start with human while you learn how your team works. Nothing reaches your branch without your click. Move to auto when you trust the verifier and the checks. Design work always waits for a person, whatever the policy.

Delivery policy ​

The delivery policy holds the rules of your project for "delivered". It makes Synth City work with any repository and any CI. It belongs to the repository scope. It has a revision number and a history. The Required checks dialog on the Repositories page edits the list of required checks. The Delivery policy dialog on the same page edits the other fields. The API does the same work.

FieldDefaultExampleWhat it decides
required_checks[] (up to 32 entries)five job names, each with app_slug github-actionsThe CI jobs that must succeed on the exact head. A head with no check runs is not green.
broad_checkslocalhostedhosted: the full suites run on CI, and builders run focused tests. It needs required_checks.
accepted_base_updatedisabledmergeAllows an operator integration update (fast_forward or merge). See below.
owner_contactreportsnativenative: Synth City reads the builder's own session activity. reports: it waits for progress reports.
owner_idle_secondsunset (server: 900)1800Idle time before an owner nudge (60 to 86400).
owner_nudge_grace_secondsunset (server: 180)120Grace after a nudge (30 to 3600).
owner_observation_wait_secondsunset60A short wait when native evidence is unknown (30 to 1800). It needs native.
owner_observation_resume_seconds900900Native observation timing (60 to 3600).
checkpoint_delay_report_seconds1800600When a slow checkpoint is reported (60 to 86400).
caller_inventory_required, regression_proof_requiredfalsefalseAsk builders for extra evidence.

Change the policy with PATCH /api/v1/agent-teams/github-scopes/{scope_id}/delivery-policy. The body has expected_revision, policy and a reason. A stale revision returns 409. GET …/delivery-policy/history lists the latest 100 changes. A change reaches a running attempt only after PATCH /api/v1/agent-teams/github-work-items/{item_id}/delivery-policy. See the Agent Teams API.

  • required_checks. Your CI can run many jobs. Name the ones that must pass. Other jobs, such as a slow nightly analysis, do not block a merge by themselves. Name each check exactly as GitHub shows it. Write each one as an object with name and app_slug, for example {"name": "Unit tests", "app_slug": "github-actions"}. If a required job is renamed on GitHub, its old name has no run. The policy then shows a missing check, and nothing merges until you update required_checks with the new name.
  • broad_checks: hosted. The full suites can take 10 to 20 minutes. With hosted, they run on CI while the verifier reviews, so builders do not wait for them.
  • accepted_base_update. While an item runs, other PRs merge into the base branch. Sometimes the builder needs one of them. This setting allows an integration update: the operator command scripts/factory-maintenance.py integration-update brings the workspace of the running item up to date with the base, after a checkpoint. The merged PR must be accepted and have every required check. The builder keeps its approval, lease and counters. With disabled, use GitHub's Update branch on the PR by hand. See the Supervised Factory Playbook.
  • owner_contact: native. A builder that is busy thinking is not nudged for being silent. Claude Code transcripts and Codex session files show its activity.

Continuation policy ​

An item can stop. Synth City then calls it escalated. CI can fail twice, a check can never appear, or the effort can run far over the plan. You have two supported ways to go on.

OptionWhat you keep or lose
Retry from the startPossible only when the item has no PR. With a PR, the retry is refused (pr_preserved).
ContinuationThe same builder keeps the same branch, PR and workspace. It asks for a new, small, approved revision of the work item scope.

Letting a builder go on outside its approved plan is not a supported way. Work outside the plan needs a new approval: an amendment (healthy item), a continuation (escalated item) or a new issue.

A continuation is possible when the item is escalated, has a PR, and stopped for one of these reasons: retry_count_exhausted, plan_blocked, owner_idle_timeout, owner_offline, leader_offline, leader_ack_timeout, continuation_revision_exhausted or amendment_budget_exhausted. The Leader approves the revision as it approved the first plan.

Enforced by Synth City

When the builder reports a continuation complete, Synth City compares every changed file with the approved list (allowed_paths). A file outside the list is refused with continuation_paths_out_of_scope. A file that came from the base branch, or from a recorded integration update, is not refused. A first plan gets a comparison only when it names files (see initial_paths_required). Then a file outside the list holds automatic merge (initial_paths_out_of_scope). A first plan without a file list has no automatic comparison, and the verifier is the safeguard.

The revision has a phase:

PhaseForRule
diagnosticFinding out what is wrongTemporary changes only. They are reverted before the item goes on.
implementationFixing itThe changes stay in the PR. They are reviewed and tested again.

Without limits, an item could loop for ever. Each limit stops one kind of loop. Set them with PATCH /api/v1/agent-teams/github-scopes/{scope_id}/continuation-policy, which needs all six fields, or with the Recovery section of the repository settings. The limits count for each attempt.

SettingDefaultCountsStops this loop
continuation_enabledfalse—When off, an escalated item can only be retried (without a PR) or ended.
max_continuation_revisions6Continuation revisions"One more try" without end.
max_continuation_failed_heads8Pushes whose checks failed, across all revisionsPushing guesses until something passes.
max_failed_heads_per_revision2Failed pushes inside one revision (not above the total)A revision that keeps failing. Ask for a better one.
max_scope_paths32Files and folders that one revision listsA "small" continuation that becomes a rewrite.
max_scope_commands16Commands that one revision listsThe same, for commands.

When a limit runs out, the item stays escalated. The Leader or the operator then ends it, or files a follow-up issue.

SituationUseWhy
The item is healthy, and the builder needs one more fileAmendment: the Leader approves the extra files.Nothing failed. The plan grows a little. Each attempt has fixed limits: 3 approved amendments, 8 requests and 16 added files.
The item is escalated, and the next step is small and clearContinuationIt keeps the branch, the PR and the review history.
The work is a different or much bigger problemA new issueA new plan, a new review and honest counts.
A review asks for corrections inside the approved filesNone of these, while the initial approval is active and the item is not escalated. The builder fixes and pushes to the same PR.The plan already covers it. If a revision was submitted or settled, or the item is escalated, the builder waits for the route that the Leader gives before it edits.

See Autonomous GitHub Dispatch for the details.

Coordination policy ​

This policy is optional. The Leader reviews a list of issues and records, for each one, whether it can start. Labels say what is ready. They do not say what depends on what.

FieldDefaultWhat it decides
enabledfalseTurns the policy on. It needs at least one issue.
issue_numbersnoneUp to 32 issues.
fallback_seconds1800 (300 to 86400)How long to wait before the Leader gets a new request, if nothing changed.
max_daily_requests12 (1 to 48)A cap on Leader requests in 24 hours.

The Leader records one of these results for each issue: eligible, dependency_blocked, human_decision_blocked, resource_blocked, needs_scope_clarification, completed or standing. Builders then do not get work that cannot finish yet. Set the policy with PUT /api/v1/agent-teams/github-scopes/{scope_id}/coordination-policy (it needs expected_version), or in the Autonomy panel of the Teams page. Most teams leave it off. They add ready labels in the order of their dependencies.

Dispatch workspaces ​

Each item that runs at the same time needs its own folder: a dispatch workspace. Two builders in one folder would overwrite each other's files. Each workspace is leased to one item. Nobody else writes there until the item ends.

  • When you enable a scope, Synth City creates up to max_concurrent_dispatched workspaces, named dispatch-1, dispatch-2 and so on, beside the primary checkout.
  • To add one by hand, call POST /api/v1/agent-teams/github-scopes/{scope_id}/workspaces with {"path": "/home/agentuser/work/dispatch-1"}. The path must be a direct sibling of the primary checkout. The checkout itself is refused.
  • With no workspace, the item stays pending (queued_no_workspace). The Work page shows the reason, and GET …/workspaces/readiness explains it.
  • The owner releases the workspace when the item is merged. If an item ends badly, the lease can stay. POST …/workspaces/{workspace_id}/force-release frees it. It needs the operator credential and a JSON body with force set to true, expected_leased_at and a reason. It shows the unpushed work that it discards. See the Agent Teams API.

When the controller and the agents run as different operating-system users, you need one sudoers rule and a safe.directory entry for each checkout. See Installation and the Supervised Factory Playbook.

The supervisor ​

A supervisor is optional. It is recommended for teams that run without a person at the keyboard. The Leader is inside the team. It cannot restart a crashed member, upgrade the factory or notice that it is stuck itself. The Supervisor watches from outside. It checks in on a schedule, reads the state of the team and its Mail, and handles incidents. It can be a person or an agent. You then decide only what only you can decide: the roster, the models, the budget and the releases. See the Factory Operating Model.

  1. Create an external actor. Call POST /api/v1/external/agent-mail/actors with an actor_key, a display_name and a kind. The call works from the same machine only. When an operator token is configured, send it in the header X-Synth-City-Operator-Token. The call returns an actor token, and it shows that token once. The actor token is a different credential: the Supervisor sends it as a bearer token in later calls. Keep it in a file that only that user can read. Calling it again with the same actor_key rotates the token.
  2. Bind the actor to the team. Call PUT /api/v1/agent-teams/presets/{preset_id}/supervisor with actor_id and, if you want, grace_seconds. Or use Edit in the supervisor section of the team page. One team has one supervisor.
  3. Check in. The Supervisor calls POST /api/v1/external/agent-mail/supervisor-checkin with the preset_id and the time of its next check-in (next_check_at, at most 24 hours ahead). It gets the supervisor observation back. It reads its Mail with the supervisor inbox.

After next_check_at passes, the supervision status is late. After the grace period it is absent. The default grace period is the larger of 30 minutes and twice the last check-in interval. Nothing restarts anyone for you: the status is a signal. Write the escalation order in every charter: plans to the Leader, incidents to the Supervisor, and decisions about the roster, the models, the budget and the releases to the Director.

Turn it on ​

An item goes through these states. The Work page shows each one.

StateMeaning
pendingThe ready label is on. The issue waits for an eligible builder and a free workspace.
dispatchedA builder has the item. It plans, the Leader approves, and it builds.
verifyingThe PR is open. Checks run, and a verifier reviews.
ready_for_reviewThe PR is ready for the final gates. This state is not proof that a verifier accepted the head, and it does not mean a merge is near. Under Auto policy the backend merges only when the required checks succeeded on the exact head, a verifier accepted that head and no hold label is on. Under Human policy a person merges. Design PRs wait in awaiting_human_review.
mergedThe PR is merged.
escalatedThe item stopped and waits for a decision.

What escalated means. Nothing is lost. The branch, the PR and the workspace are kept. The Work page shows the reason. Common reasons: a budget ran out (approval_rounds_exhausted, retry_count_exhausted), the ready label was removed (dispatch_label_removed), the Leader did not answer in time (leader_ack_timeout), or the owner went quiet (owner_idle_timeout). The usual next steps are a continuation, a retry (only without a PR) or ending the item and filing a follow-up.

Before you turn autonomy on, follow these steps in this order:

  1. Save and launch. Save the scope disabled. Launch the team, and check that each member is ready. Guided setup keeps saving, launching and activating as separate actions.
  2. Read readiness. Read GET /api/v1/agent-teams/github-scopes/{scope_id}/activation-readiness. It must report no blockers: a bound Leader, one distinct owner for each slot, and a ready Agent Mail session for each member. Read …/workspaces/readiness too.
  3. Review the neighbors. List the other enabled scopes of the team, and the scopes of other teams that watch the same repository with the same ready label. Turning team autonomy on resumes every enabled scope of the team. An overlap does not stop a dispatch, so acknowledge each one on purpose.
  4. Turn team autonomy on. Call PATCH /api/v1/agent-teams/presets/{preset_id} with {"autonomy_enabled": true}. It needs an enabled Leader slot.
  5. Enable the scope. Call PATCH /api/v1/agent-teams/github-scopes/{scope_id} with {"enabled": true}. Check that last_polled_at moves. The watcher polls a scope only when the scope is enabled and the team's autonomy is on.
  6. Start small. Use low concurrency. Watch the first item from plan to PR, review and merge. Then raise the limit.

Steer a running campaign ​

You want toDo thisAvoid
Start an issueAdd the ready label, an area label and a priority label.—
Change the orderChange priority:N.Removing ready labels.
Pause everythingTurn team autonomy off.Killing terminal sessions.
Stop nowCreate a file that GITHUB_COORDINATION_HOLD_PATHS lists, or send Mail with a stop word in the subject.pkill
Split a big itemThe Leader proposes the parts. You file them and remove the ready label from the original.Closing an issue whose item is not finished.
Upgrade the factoryFollow the upgrade steps in the Supervised Factory Playbook.Upgrading with items that are mid-flight.
Unstick a merged itemPOST /api/v1/agent-teams/presets/{preset_id}/work-items/{item_id}/finalize-merged. Run it first with dry_run.Editing the database.
End a stopped itemPOST /api/v1/agent-teams/presets/{preset_id}/work-items/{item_id}/end-stopped—
Free a stale workspacePOST …/github-scopes/{scope_id}/workspaces/{workspace_id}/force-releaseDeleting the folder.
Change a model or the rosterTurn autonomy off, edit the slot and relaunch that member.Changes in the middle of an item.

The Leader has matching routes for recovery under /api/v1/agent-teams/github-work-items/{item_id}/leader-recovery/. See the Agent Teams API.

There are three ways to stop, from gentle to firm:

Autonomy offStop MailHold file
New workStops.Not affected.Stops.
Work in progressThe builders keep running in their panes. Synth City stops dispatching, verifying and merging that scope.The member stops editing until it reads the message.Dispatch, merge and coordination hold. Running agents are not stopped.
Use it whenYou want an orderly pause, for an upgrade or the end of the day.One member must stop now.The whole factory must stop, even if the UI is down.

A stop Mail has one of these words in its subject: stop, hold, pause, halt, cancel, revoke or defer. It works when the Leader, the bound Supervisor or Synth City sends it. It applies to Claude Code members. The hold file is any path in GITHUB_COORDINATION_HOLD_PATHS. See Agent Mail and Server settings.

A complete example setup ​

This example shows the values of a small factory. Names, labels and paths are examples.

yaml
team:
  name: my-project-v1
  backlog_milestone: v1.0
  autonomy_enabled: false        # on at launch
  leader: leader
  slots:
    - {name: leader,    provider: codex-cli,   role: coordinator, effort: high}
    - {name: builder-1, provider: codex-cli,   role: implementer, effort: xhigh, areas: [area-core]}
    - {name: builder-2, provider: claude-code, role: implementer, effort: high,  areas: [area-ui]}
    - {name: verifier-1, provider: codex-cli,  role: verifier,    effort: high}
    - {name: verifier-2, provider: claude-code, role: verifier,   effort: high}
scope:
  repo: example-org/example-repo
  base_ref: origin/release/v1.0
  labels: {ready: my-project-ready, design: my-project-design, hold: my-project-review-hold}
  merge_policy: human            # change to auto when you trust the checks
  max_auto_merges_per_day: 5
  max_concurrent_dispatched: 2
  max_item_effort_minutes: 120
  enabled: false                 # on at launch
  delivery_policy:
    required_checks:
      - {name: Unit tests, app_slug: github-actions}
      - {name: Lint, app_slug: github-actions}
      - {name: End-to-end tests, app_slug: github-actions}
    broad_checks: hosted
    accepted_base_update: merge
    owner_contact: native
  continuation: {enabled: true, revisions: 6, failed_heads: 8, paths: 32, commands: 16}
  workspaces: [dispatch-1, dispatch-2]
supervisor: an external actor, bound with a grace period

Then follow Day one, in order. Read Supervised Factory Playbook before you run a campaign.

Released under the MIT License.