Run autonomous, self-running Claude Code sessions
Tares runs a software factory for Claude Code: a crew of Claude Code sessions that run in the background on your machine. A watch brings back any session that stops, the orchestrator checks for work on a schedule, and builders merge reviewed pull requests, so the work continues while you are away. The crew asks you before the decisions that are yours.
Start the crew
tares factory crew upThe crew lives in a folder of its own, ~/factory. The first run offers to open Claude Code there
so you can trust the folder once, then asks how far the crew may go (below). The answers are kept
on Tares. crew up also starts the watch in the background that brings back any station that
stops.
When a project’s repo has a language Claude Code can search by symbol, and no language server is
set up for it yet, crew up lists what is missing and offers to install it. It installs only on
your yes. Troubleshooting
When more than one person is on the Tares, the first crew up also asks for a crew name, so your
stations are told apart from your teammates’. A crew per person
How far the crew may go
| Setting | Choices | What it decides |
|---|---|---|
| Autonomy | L4-ship (recommended), L3-review | At L4-ship a builder merges once the reviewer passes the pull request and CI is green. At L3-review every merge waits for your yes. |
| Releaser | off, on | Whether a releaser tags and deploys. Without one, work ends merged on main. |
| Second check | off, on | Whether a second model (Codex) checks every commit. |
| Builders at once | a number | How many builders run side by side, across every project. |
| What you allowed | your words | Things the crew may always do without asking. |
Change them under Settings, Crew in the console, or tell the orchestrator. A single project can be stricter than the crew: say so in its spec, and every merge of that project waits for your yes. On a team, each person can set their own values, as strict as the team’s or stricter.
What each station loads
A station starts lean, so its first turn does not carry everything you have installed for your own sessions. It loads:
- the Tares plugin, which holds the crew’s skills,
- Claude Code’s built-in tools,
- only the MCP servers and plugins you allow for its role, none by default,
- the project and local settings of the folder it works in. It skips your user-level settings, so your user-level MCP servers and plugins do not load, and neither do the Chrome integration or the claude.ai connectors.
Auto-memory is off for every station except the orchestrator. A helper follows the role of the station that started it, so a helper of the orchestrator keeps memory and a helper of a builder does not.
A lean start never loosens a restriction. Your deny and ask permission rules, and the auto mode
soft_deny and environment entries, in ~/.claude/settings.json are carried into every station,
after the station’s own. Your allow rules are not. If Tares cannot read that file, the station
does not start, because starting without it would drop your restrictions.
Choose what a role keeps
tares factory allow shows and sets what each role loads. The roles are orchestrator, reviewer,
releaser and builder.
tares factory allow
tares factory allow builder
tares factory allow builder mcp github
tares factory allow builder plugins feature-dev@claude-plugins-official
tares factory allow builder mcp --noneWith no word it prints one line for each role, such as builder keeps mcp github; plugins none. A
role prints its own line. Names after mcp or plugins replace the whole list, they do not add to
it, and --none empties it.
mcptakes the names of the servers in themcpServersof~/.claude.json.pluginstakes plugin ids as they appear inenabledPluginsof~/.claude/settings.json.- A name Claude Code does not have is kept, with a warning. If a server named in the list is missing when a station starts, the station skips it and says so in one line.
- Only you and the orchestrator can set a list. A builder, reviewer, releaser or helper session that tries is refused.
A station reads the lists when it starts, so restart the stations of that role to apply a change.
No command restarts a whole role. Restart one station by its name, which tares factory roster
lists (a builder’s name carries its project and slug), or every station at once:
tares factory restart <station>
tares factory crew restartTares copies the servers you allow into a file for that station, readable by you only, and never
prints or logs a server’s configuration. tares factory doctor prints one allow line for each
role and warns about a name Claude Code does not have.
Slack is read-only
Slack is not loaded unless you allow it for a role. A station whose role keeps Slack can read and search it but never write. Contacting anyone is yours to do, never the crew’s.
The crew’s guard allows only a fixed list of Slack read tools: reading a channel, a thread, a user
profile, a file or a canvas, searching messages, channels and users, listing a channel’s members,
and reading reactions. It refuses every other tool of a Slack server, in every permission mode.
That covers the Slack plugin and a third-party Slack MCP server alike, such as one with a
conversations_add_message tool, and a write tool the server adds later. The list also holds the
common third-party reads, such as conversations_history. Tares also denies the plugin’s write
tools by name and any tool named slack_ followed by a write verb, beside your own deny rules and
the station’s.
Two limits to know:
- The guard finds a Slack server by its name. A server without “slack” in its name is not held to the list, so allow one for a role only if you accept what its tools can write.
- A read tool that is not on the list is refused until it is added to Tares. A station that needs one asks the orchestrator.
See what a role has loaded with tares factory context.
Measure a launch
To see what a station carries before its first message, read it. A station’s name is the role for the
orchestrator, reviewer and releaser, and the full name from tares factory roster for a builder:
tares factory context reviewer
tares factory context <builder station>It prints the window by category first, as it always has, then one line about the launch:
launch: <n> tokens before messages; tools by server: <server> <count>, ...; skills: <n>; memory: on|offThe count is the station’s total minus its messages. The line shows counts and server names only, never a tool name, path or setting value. The reading starts Claude Code with the flags a station launches with, so a change to the lean launch shows up here without any edit. Run it before and after you change what a role keeps, to see what each server or plugin costs. The Crew page asks for the same reading.
Telemetry from stations
A station sends the OpenTelemetry settings in the env block of your ~/.claude/settings.json, and
those Tares sets for the crew, whether or not Claude Code’s background service was already running
when it started. Variables exported only in your shell do not count. The endpoint, exporters,
protocol, resource attributes and the two telemetry switches go in the station’s settings file.
A variable that may hold a secret never goes in a file. Tares holds one back when:
- its name says headers, key, token, secret, auth, password or credential,
- its value has credentials in an address, such as
https://user:pw@host, or a bareuser:pw@hostoruser@host, - its value has a
name=valuepair whose name says one of those words, in a query string, a fragment or a list such asOTEL_RESOURCE_ATTRIBUTES, for example?api_key=...orauth_token=....
A name that only contains one of those words, such as author=, is held too, to be safe. An email
address in OTEL_RESOURCE_ATTRIBUTES, such as owner=me@corp.com, is held for the same reason.
Plain queries and plain resource attributes still go in the file. Tares passes a held variable to
the launching process only and never prints its value. Monitoring headers from Tares keep working.
When a variable is held back, the start of the station prints a note with its name, never its value. A station started while the background service was already running does not send that variable.
OTEL_EXPORTER_OTLP_CLIENT_KEY holds the path of a key file, not a secret, but its name says key,
so it is held back too, and the start prints a second note about it. The client certificate path
still goes in the file.
How the sessions keep running
Claude Code stops an idle session after about an hour. Tares plans for that:
tares factory crew upstarts the crew and a watch in the background. The watch brings back any station that stops, under the same name. Its log is~/factory/watch.log.- The watch also wakes an idle station when Tares shows work for it, so an idle crew still notices a new project, a stalled ticket or a merged pull request that unblocks the next one. This is wake on events, and it is on unless you turn it off. With it off, the orchestrator wakes on a schedule every 20 minutes and checks for work instead.
- A revived session reads its notes and the project on Tares, so it carries on from where the last one stopped. Tares keeps the plan, the tickets, the reviews and your answers.
tares factory crew down stops every station. Tares keeps the projects, tickets and answers, and
tares factory crew up starts fresh sessions that carry on from them.
Keep station reports small
Every station writes a report in ~/factory/reports, named after the station. It is a short state
file, not a diary: under 4 KB and never over 8 KB, so a station that starts, restarts or comes back
reads it cheaply. It has fixed sections:
| Section | What it holds |
|---|---|
## Now | What the station is doing and what comes next. Every station. |
## Waiting on | What it still owes or waits for, one line each. Every station. |
## Desk | The desk item the orchestrator is asking you and when it last showed it. The orchestrator only. |
## Undelivered | Messages that did not reach another station. Every station. |
## Bouncing | Each ticket that keeps coming back from review and the step the orchestrator answered it with. The orchestrator only. |
## Taken | Each RELEASE the releaser took that has not shipped yet. The releaser only. |
Keep ## Undelivered as it is. The watch and the releaser read it, and a RELEASE line in it is
never reworded, because the watch tells one line from another by its text. A station never reads,
searches or appends to a report or a log with cat, tail, sed or grep, and never opens a log
with Read.
History does not go in the report. A station adds each event to its log with
tares factory report log, one line a time, in reports/log/<station>/<day>.md. To find an older
event, a station asks Tares first, then runs tares factory report grep over the logs. A station that is revived or
restarted is reminded to read its report as a short state file and to use report grep for
anything older.
You can search the logs too:
tares factory report grep RELEASE
tares factory report grep --station kiran-reviewer --days 3 "verdict"Over time the older, append-only reports pile up. tares factory report archive moves them into
reports/log/<station>/, and report grep still finds them there. Run it once with the stations
idle, after you update the crew’s kit. A live station’s report moves only after that station has
written <station>.next.md, its own fresh state file, which then takes the report’s place. It shows what it would move and changes nothing until you add
--apply:
tares factory report archive
tares factory report archive --applyTo check that it works after a day on a kit that has this, open the orchestrator’s report and see
that it is under 8 KB, then run tares factory report grep RELEASE. Stations log
their events, including the releases they send and take, so yesterday’s release lines should be in the log. Every command and its flags are on
Commands.
Crew settings
Three settings change how the crew spends your Claude plan and keeps up. Each is shared by every project, and the Crew page shows all three under How far the crew may go.
| Setting | Default | What it does |
|---|---|---|
idle_wake | on | Wakes stations on events instead of fixed ticks. Set it to off to go back to the ticks. |
pace | off | Slows the crew before your plan’s limit. |
claude_update | on | Lets the watch move stations onto a new Claude Code. |
To change one, tell the orchestrator (tares factory crew attach orchestrator), or your own session
if it has the Tares plugin: either saves it with the set_crew_settings tool. For example, ask it
to turn wake on events off, and it saves set_crew_settings(idle_wake=False). Pace also has a
Turn on and Turn off button on the Crew page. The watch carries a change to the stations by
itself.
A crew that never set idle_wake runs with it on. Only an explicit off turns it off, and it stays
off until you turn it on again.
Wake on events
With idle_wake on, which is the default, the stations hold no schedule of their own. The watch
asks Tares what each station has to do and restarts an idle station, in the same conversation, with
one message only when there is work:
- a pull request without a verdict, for the reviewer
- a change on one of its tickets, such as a verdict, changes asked for or failed CI on its pull request, for its builder
- a release request, for the releaser
- for the orchestrator:
- an answer on the desk, including one you give on the console
- a new project, or a project you took over with
tares factory session - a ticket that is ready to start, including one whose dependencies just merged
- a ticket that bounced to a new step of the review ladder
- a milestone that is ready to check
- a held ticket that has had no news for 45 minutes while it is to do, in progress or in changes
- a ticket in changes whose builder is no longer running
- a desk item that is still open, once for each full hour it has been open. Nothing wakes it the moment an item is filed
Each of these wakes a station once, except an open desk item, which wakes the orchestrator again
every hour. A wake for work names what woke it in one line, such as Woke on: rd:Shop/T5., with at
most five keys and then and N more. Each key sits on one line and is cut at 80 characters, so one
odd key cannot fill the message. A liveness wake has no such line. The first time the watch
looks, it only records what is already waiting, so turning idle_wake on does not wake the
orchestrator for old work.
When nothing is known to be pending, a station gets a short liveness wake after 15, 20 or 30 minutes of quiet, then after 30, then every 45 minutes at most, until it does something. A reviewer, builder or releaser checks its queue once and ends the turn, so an empty crew costs a few model turns an hour. The orchestrator runs the whole Tick section of its manual on every wake, a liveness wake included, not only the item that woke it.
Stations that started before idle_wake became the default are told once, by the watch, to drop the
tick they hold.
Turn it off
Tell the orchestrator to turn wake on events off. Each station is then told to arm its own schedule again: the reviewer every 15 minutes, the orchestrator every 20, the releaser every 30 and a builder every 30 while it has a pull request open. Every tick costs a model turn and re-reads the whole conversation, even when there is nothing to do. Turn it back on the same way.
tares factory doctor warns when idle_wake is on and the watch is not running, because nothing
would wake the stations then. It also warns when idle_wake is off, because each station then wakes
on its own tick even with nothing to do.
A wake never interrupts a working turn
The watch wakes a station only between turns. It looks again right before it restarts the station,
so a turn that started a moment earlier, such as a message arriving, is not cut off. A station you
opened with tares factory crew attach is left alone too. When a wake does not happen, the watch
says so and looks again at its next round.
A station that has stopped to wait for you, on a question or a permission prompt, is left alone too, because a restart would lose the prompt. An idle wake, a pace note and the wake for a desk answer wait until the station answers or moves on, however long that takes. A station that is done is woken as before.
A change of your grants is the one restart that can reach such a station. It restarts the station at once only when a grant added since the station started names it, the answer to its own refused command on the desk, because the restart is what lets it run that command. Any other change of grants waits until the station has been stopped on the prompt for 30 minutes, the same wait a move onto a newer Tares plugin uses.
Answer on the console
When you answer a question on the console, the orchestrator hears about it within seconds, not at the watch’s next round. The watch checks the desk every few seconds with one small request and, when something was answered, wakes the orchestrator with the usual wake. If the orchestrator is in a turn, stopped on a prompt or open in a terminal, the watch asks again a few seconds later. If a wake fails, it waits 30 seconds before it tries again. An answer the orchestrator recorded itself is not news to it. A Tares without this check falls back to the watch’s round, which is three minutes.
How merges take turns
The merge queue brings one pull request at a time up to date with its base branch, so each one’s checks run once. A pull request that was updated and is waiting for its checks keeps the queue’s turn for 2 hours, and one waiting for your yes keeps it for 4 hours, counted from the queue’s last change to that pull request’s row, not from its last commit. A change of the row’s state or of its reason text starts the count again. A pull request that was updated and goes on to merge keeps the turn until it merges, or until 2 hours after its last change. After that, the next pull request is brought up to date. The slow one keeps its place and its question, and goes on when its checks finish or you answer.
Marking a draft pull request ready can start a new CI run that cancels the draft’s run, depending on the repository’s workflows. A job that was cancelled because a newer run of the same workflow on the same commit replaced it does not count as a failure. While the newer run has not finished, the checks read as pending, and a passing job of the same name from the older run does not stand in for a required job meanwhile. When the repository names required checks, the waiting run holds the merge only when a job it replaced is a required check or its workflow is one: a rerun of an unrelated workflow, such as a preview or a deploy, does not. With no required checks named, every waiting run holds it. A job that was cancelled with no newer run still fails the checks. A failed or timed-out job in a run that was replaced counts only until a job of the same name in the newer run takes its place.
Pace the crew before the plan limit
Without pace, the crew runs until your Claude plan’s limit stops it, and every station restarts at
once when the limit resets. With pace on, the watch reads the plan usage Tares already keeps (see
the Crew page) and slows the crew first:
| Plan usage | What the crew does |
|---|---|
| 85% of the 5-hour window, or 90% of the week | No new builder starts. Each station is told once to tick every 45 minutes. |
| 95% of the 5-hour window | A builder also finishes its step, pushes, writes down where it is and waits. |
A station that stopped while a limit was full is not revived into it. After the reset the watch
revives it in its own conversation, and starts a new one only after that fails twice. The Crew page and
tares factory crew status say when the crew is pacing and until when.
While a plan limit is full, tares factory crew update refuses too, because a restart is a model
turn.
Move onto a new Claude Code
Claude Code installs a new version by swapping a link, so a station keeps the version it started on
until someone restarts it. With claude_update on (the default), tares factory crew watch sees a
newer claude --version that has held for a whole round and restarts one idle station a round, in
the same conversation, the orchestrator last. A busy station, or one you have open in a terminal,
waits. The crew’s helpers move too, after the other stations and before the orchestrator, and a busy
helper does not hold the orchestrator back.
To move every station right away:
tares factory crew updateIt waits for each station to be idle, restarts it, and checks that it runs the new version and that
there is one session per station name. A station still busy after --wait <seconds> (30 minutes by
default, 0 for no deadline) is left to the watch. crew update skips a station that already runs
the installed version. tares factory crew restart restarts every station, those too.
Claude Code’s background service keeps pre-warmed spares of the old version, and a restart can land
on one. The factory stops such a spare and tries again. If a station keeps coming back on the old
version, it is started again in a new conversation on the new one after three tries (a helper is
not, since its task lives only in its conversation). If that fails too, the watch tries again after
a pause that doubles from 10 minutes up to 4 hours, and crew update tries at once. The Crew page
and tares factory roster show each station’s Claude Code version, flag an older one and mark a
retrying one. tares factory doctor says so for each station, and tares factory crew status
counts them.
Turn claude_update off to pin a version: the watch then moves no station, and one that restarts
for another reason starts on the installed version. A crew you froze with
tares factory crew freeze, which keeps the crew on today’s plugin kit, moves no station on its own
either. The watch says once for each new version that one is there, and crew update still works.
How work gets picked up
You plan a project with Claude, and Tares keeps the plan as tickets, each with the repo it changes. After that you do not assign anything.
- The orchestrator hands out work and starts builders itself, one per milestone and repo of a project.
- A builder takes its tickets, opens pull requests and merges its own once they pass.
- The reviewer reviews every pull request to a fixed bar and posts the verdict.
What still needs you
The crew does not guess at decisions that are yours. The orchestrator is the session you talk to, and it brings you what needs you, one question at a time and with a recommendation.
- Questions wait on the desk until you answer them. When the plan does not answer a smaller question, the crew records an assumption and carries on, and the orchestrator confirms the assumptions with you once per milestone.
- Merging is your setting. At
L4-ship, a builder merges once the reviewer approves and CI is green. AtL3-review, every merge waits for your yes. - Releasing is off unless you ask for it. Without a releaser, the crew stops when work is merged to main.
To answer, attach to the orchestrator:
tares factory crew attach orchestratorCommands
Every crew command, from crew up to crew down, is on Commands.