core
The core is always on and does no directing of its own: it loads arthur.config.ts, checks every plugin’s options and resolves each ...Env name against the environment; it is the plugin host, the command registry and the terminal (arthur <command>); it runs each job in its own worktree on its own branch, here or on another machine over SSH, with its limits (time, money, and CPU and memory in one joint slice), its state, stop, continue and steer; it keeps the ticket board, changed only through its own command; it builds each role’s prompt, emits an event for every state change, and keeps the clock every plugin reads (timeZone, quietHours). In every job its env guard keeps the env file from the agent, and its worktree guard refuses a write into the main checkout, the home folder or another job’s worktree. The fake host and fake agent every plugin is tested against are published as @arthur/core/testing.
export default defineConfig({ core: { timeZone: "Europe/Warsaw", jobs: { timeoutMinutes: 240, budgetUsd: 2 } }, plugins: [orchestration({})],});Options
Section titled “Options”In core: { ... } of arthur.config.ts; each may be left out. An unknown option, a wrong type or value refuses the start.
home: Arthur’s home folder: job records, the event log, each plugin’s state; relative to the config’s folder. Default.arthur.envFile: the file of env values the config’s...Envoptions name, outside every folder an agent works in. Default~/.config/arthur/.env($XDG_CONFIG_HOME/arthur/.envwhen that is set).agent.command: the coding agent’s binary, which every job and the coordinator run. Defaultomp.timeZone: the time zone of every time of day in the config, and of the clock every plugin shares. Default the system’s.quietHours:{ from, to }, each"HH:MM": channels send without a notification fromfromup toto, across midnight whenfromis later; equal, never quiet. Default no quiet hours.jobs.timeoutMinutes: minutes a job may run before it is stopped, 0 for no limit. Default 240.jobs.budgetUsd: USD a job may spend before it is stopped, 0 for no limit. Default 2.jobs.idleMinutes: minutes without output or a tool call after which a running job isidle, 0 for never. Default 10.jobs.cpu: the cores all jobs together may use, in one systemd slice. Default the machine’s cores less one, at least 1.jobs.memory: the memory all jobs together may use, as systemd’sMemoryMax. Default70%.jobs.offlineGraceMinutes: minutes a job staysblockedonce its machine stops answering, then it fails; 0 fails it at once. Default 30.jobs.unsandboxed:truelets a job run where its sandbox cannot be set up (macOS, nopython3, a kernel without Landlock), its install and agent with the writes of Arthur’s user;falseends such a jobfailed: no sandbox: <why>; set core.jobs.unsandboxed: true ...before anything of it starts (arthur spawn --help, “The sandbox”). Defaultfalse.
arthur config check checks the config, type-checks it and each project file with tsc, and lists every variable it names, arthur doctor checks what Arthur needs on this machine, and arthur setup reports what is there, set and missing on a new one. Each command’s page, what arthur <command> --help prints, is in commands/.
arthur config check
Section titled “arthur config check”Usage: arthur config check
Loads arthur.config.ts from the working folder, runs the host’s checks of the plugin list, type-checks the config and each project file with tsc, and lists every env variable the enabled plugins name in their ...Env options, one line each: set or missing, the variable, and the option that names it. A value is never printed. Like every arthur command, it first runs each enabled plugin’s setup, so a refusal in a setup shows here as it would at the start.
set ARTHUR_YOUTRACK_URL (youtrack.instances[0].urlEnv)missing ARTHUR_YOUTRACK_TOKEN (youtrack.instances[0].tokenEnv)The type check runs tsc on arthur.config.ts and on <folder>/project.config.ts of each folder in the folders of the first projects plugin the config lists, unless it has enabled: false; a folder is counted from the working folder, and one without that file is left to the projects plugin, which refuses it at load. So misspelt keys in different objects, such as uptime.project([{ ulr }]) and dokploy.project({ ap }), show all in one run, while the plugins’ own checks stop at the first plugin that refuses; within one object, tsc names only the first unknown key. tsc is the one of the typescript package installed beside the config (a dev dependency), run in the config’s folder with the root tsconfig.json’s strictness (--strict, --types node, --skipLibCheck); its lines are printed as it writes them, after the host’s refusals and before the env lines, each file counted from the config’s folder:
projects/landing/project.config.ts(3,40): error TS2353: Object literal may only specify known properties, and 'ulr' does not exist in type 'Site'.A type error, or a tsc that fails (its own lines, else types not checked: tsc exited with <code>), fails the check but does not refuse the start: arthur run does not type-check. The type check does not run when the config does not load.
Where a value comes from:
- The shell first; a shell variable wins even when it is empty.
- Else
core.envFile, by default~/.config/arthur/.env($XDG_CONFIG_HOME/arthur/.envwhen that is set), outside the config’s folder and every project’s checkout, where an agent’s recursive search would print its values (arthur doctorwarns of one inside either,core env), and ignored by Git in any checkout it lies in (else a critical line ofarthur doctor, which refusesarthur run,core env ignored):KEY=valuelines,#comments and blank lines; a value may be in single or double quotes, taken as written; after an unquoted value,#starts a comment. A missing file is fine when every variable is in the shell; but noARTHUR_variable of the shell reaches a job (arthur spawn --help), and inside a job the env file is not read either (below). - Inside a job (
arthur help --help) the env file is not read, since the job’s sandbox closes it (arthur spawn --help, “The sandbox”): a variable comes from the job’s shell alone, a missing one refuses nothing, and a plugin with a variable not set there is not loaded, nor one thatrequiresit, so their commands are unknown; stderr says it once,arthur: inside a job, not loaded: <names>: each names an env variable, and a job's CLI reads no env file.
Where a value never goes: a value of 8 characters or more, each one in the env file under whatever name (a disabled plugin’s and one no plugin reads included) and each enabled plugin’s variable from the shell, becomes its variable’s name, ARTHUR_TELEGRAM_BOT_TOKEN in place of the token, before Arthur writes it: in the event log, so in every notice and channel message made of an event; in a job’s record and log (its task, its prompt with the plugins’ sections, an arthur continue instruction, a steer, a block’s reason; and the agent’s and the install’s output, its final message and its end, which the job’s wrapper names from the env file its record guards, since no shell value reaches it; a job on another machine, whose record there guards no env file, is named here as the sweep copies its files and reason, its log up to the last line break, the rest at the next copy, a value cut inside a line longer than the piece a copy brings, 256 KiB at most, excepted); in a channel’s reply to a phone command and the caption of arthur send; and in every text and byte an arthur command writes to stdout and stderr, an error included: a plugin’s setup that fails, and an uncaught exception or unhandled rejection, which it prints named and exits 1 on. A value split across two such writes is not named. A shorter value stays as it is: replacing it would garble common text. A pipe’s output that ends on what may be a value’s first characters waits for the next chunk, or the pipe’s end, so a value split across two chunks is named whole. The MCP servers’ secrets a job’s role gets are the exception the job needs, in mcp/ while it runs (arthur spawn --help).
Names: ARTHUR_<PLUGIN>_<WHAT>, or inside a named instance (an entry with a name, such as a YouTrack server or a Telegram bot) ARTHUR_<PLUGIN>_<INSTANCE>_<WHAT>; the plugin and instance names in capitals, a dash as _. A plugin with enabled: false is skipped: its variables are neither looked up nor listed.
Said, without failing the check:
- No
typescriptbeside the config, as in an install without dev dependencies:types not checked: typescript is not installed beside <config>; npm ci installs it with the dev dependencies. The other checks run as before. - A key set twice in the env file:
<file>: KEY is set on lines 2, 5; the last wins. - A variable set in the shell but not in the env file:
ARTHUR_X is set in the shell only; the arthur service does not see it, put it in <envFile>. The service runsarthur runwithout the login shell (docs/setup.md, step 9), so there the variable is missing and refuses the start; a job sees neither (above).arthur setupprints the same line.
Refused, one line each (the same lines refuse the start):
- A name without the plugin’s prefix, with another plugin’s or another instance’s name, or with nothing after the prefix:
<config>: <plugin>.<option>: expected ARTHUR_<PLUGIN>_<WHAT>, got <name>. A text that is not a variable name, or not one starting withARTHUR_, is not shown, since it may be a pasted secret. - An
...Envoption that is not a string. - An env-file line without
=, with a key that is not letters, digits and_, or with an unclosed quote: named by its line number, never shown. - An env file that exists but cannot be read.
- A config that does not load (its own refusals,
loadConfig). - A plugin list the host refuses, printed before the env lines: an entry that is not a plugin (its variables are then neither looked up nor listed), a plugin’s
modulethat is not its ownimport.meta.url(afile:URL), two plugins with one name,orchestrationmissing or disabled, anenabledthat is not true or false, arequiresnaming a plugin that is missing or disabled, a cycle inrequiresandafter, and each enabled plugin’s owncheck(its problems, orplugin <name>: check failed: ...when it throws). - A refusal in a plugin’s
setup, printed before the env lines when nothing above is refused (any of those stops the start before asetupruns): a command name the core or another plugin already registered, or asetupthat throws:plugin <name>: setup failed: ....
Exit code: 0 when nothing is refused, no type error is found and every variable is set, 1 otherwise, 2 on wrong usage.
arthur continue
Section titled “arthur continue”Usage: arthur continue <id> <instruction> [--budget <usd> [--decision <id>]] [--ignore-restart]
Resumes a job that has a branch of its own, a worker for example, and is ended or blocked at the end of its run (see arthur jobs --help), in place, with one more instruction as one quoted argument, and prints <id>: continued; the job is named by its full id or its short id, as arthur jobs shows it. It keeps the id, the record, the branch and the worktree, and the agent continues its last session there: the wrapper starts again (see arthur spawn --help) and runs <agent> --continue ... -- <instruction> in place of @<record>/task: after --, an instruction that starts with - or @ is text, not an option of the agent or a file it includes. The instruction is in the record as continue, with a word joiner (U+2060) before each @ omp would read a file for, as in task (see arthur spawn --help), and the log says arthur continue: <first line>. Before the wrapper starts, the job moves to working and its reason is cleared, emitting job-state. arthur continue returns once the wrapper wrote its pid; job-ended comes again at the new end. A wrapper that does not start ends the job ended, reason failed: <reason>, as at a spawn (see arthur spawn --help), and arthur continue prints <id>: failed: <reason> on stderr and exits 1.
--budget <usd>: replaces the job’sbudget, a plain decimal of 0 or more (0is no limit). It is the budget of all the job’s runs together, not an amount on top: the record’scostcounts on from the runs before, so a budget that cost has already reached is refused (below), and a job that ended at its budget needs a higher one.--ignore-restart: a switch, no value, as atarthur spawn --help: the session plugin’s restart guard lets this continue start while a restart is due; every other check still applies.- The
timeoutstays the job’s and counts from the new start. - The caps are those in force now: the one plugin that provides
jobs.limitsis asked again, as at a spawn, and its answer replaces the record’scpu,memory,feature,feature-cpuandfeature-memorybefore the wrapper starts, so a ticket whosecapsthe human raised (or lowered) has its slice, which all its jobs share, set to them, not back to those of the job’s spawn (see “Caps per job” inarthur spawn --help). Two plugins that provide it refuse the continue, as a spawn. - The role’s MCP servers are those in force now: the
roles.modelanswer for the kind’s role is asked again, and its servers go into the record’smcp/before the wrapper starts, which the run’s end removed (seearthur spawn --help); a role that has none now starts without them, and a job on another machine gets none. - Once the checks pass, each plugin’s
prepareruns again on the job as its record has it, with the--budgetgiven and the caps in force now, told it is a continue (seearthur spawn --help): the variables they return, such as the models plugin’s provider for a job on a provider model, go into the new run’s environment as at the spawn, never into the record. A step that sets up the worktree (the commit-rules hook, the projects install) does nothing, the worktree keeping what its spawn made. - Before the wrapper starts,
job-startedis emitted again as at a spawn, with the record’sid,kind,project,root,branch,worktreeandtickets: a worker’s tickets inreviewordonemove back toin-progress, one already there is not written, and other kinds move none (seearthur spawn --help). - Once the wrapper started,
arthur continueemits the core’s eventjob-steeredwith the job’sid, itskind, the instruction astextandvia: "continue"; a refused continue, or one whose wrapper did not start, emits none, nor does a plugin’shost.jobs.continue. commitsat the end lists the branch’s commits since the job’s firstbase, every run’s together;result,tool-callsandactivityare the new run’s.- When a wrapper of the job still runs (the last one writing its end, or one a killed
arthur continuestarted that has not written itspidyet; told by its command line, not by the record’spid), it waits up to 5 seconds for it to exit, since two never run for one job. The new run starts in a scope of a new name,arthur-job-<id>.<ms>.scope(arthur spawn --help), as the scope of the run before can still be loaded. - A job on another machine (its record’s
machine; seearthur spawn --help) continues there: once the checks here pass (its state here, its branch, the limits, thebeforeSpawnchecks), the prepares run here, thenarthur remote-job continuedoes there over SSH what is said above, the instruction and the prepares’ variables on its stdin, in the scope of the jobs’ slice there, whose limit is the machine’s own (seearthur remote-job --help); then the job here moves toworkingandjob-startedis emitted here with itsmachine. The sweep copies its run from there as after a spawn. A wrapper that does not start there ends the job there, and its end is copied here at once.
Refused (exit code 1, the reason after arthur continue: ):
- An id with no record in
<home>/jobs/:<id>: no such job in <home>/jobs. - A short id that matches two jobs:
<id> matches 2 jobs: <id>, <id>; name one by its full id. - A job in a run (
working,idle, or heldblockedby a plugin):<id> is <state> (<reason>), in a run; a job in a run is not continued, arthur steer gives it a correction. - Another
arthur continueof the same job, from before it reads the job’s state until its new wrapper has started or the continue fails:<id>: being continued. That continue holds the file<home>/jobs/<id>/continuing, which names its pid (and, on Linux, its boot) meanwhile; one left by a continue that was killed, whose pid is dead or from an earlier boot, is taken over by the next continue. For a job on another machine the file here is released as soon asarthur remote-job continuereturns, since the wrapper there removes only the lock there. - A wrapper of the job still running 5 seconds after every other check passed:
<id>: its wrapper <pid> still runs 5 seconds on; a second one is not started beside it. Nothing in the record is written; once it has ended, the continue goes through. - A read-only kind, which has no branch of its own:
<id> is a <kind>, a read-only kind without a branch of its own; only a job with a branch is continued. - A budget the job’s
costhas already reached, the--budgetgiven or else the record’s, both at 4 decimals as the wrapper compares them (arthur spawn --help, “Limits”):<id>: its cost $<cost> reached the budget of $<budget>, so its run would stop at once: --budget is the budget of all its runs together, not an amount on top; give one above $<cost>(AR0739: such a run started, spent on its first message and endedlimit: budget). So a job that ended at its budget is continued only with a higher--budget;--budget 0, no limit, is never refused here. Checked before thebeforeSpawnchecks; nothing in the record is written. - A job whose worktree is gone, as
arthur pruneleaves one whose branch has commits Git refuses to delete:<id>: its worktree was pruned; spawn a new job on its branch <branch>. The branch keeps the work: a new worker starts from HEAD on a branch of its own, so its task names<branch>to merge or build on. Nothing in the record is written. - A job whose record’s
project,rootorworktreeis not the place its spawn made, which only a program of the job itself can have changed, since the job writes its record (AR0597):<id>: its record names the checkout <root> and the worktree <worktree>, where a job of <project> has <checkout> and <its worktree>; its record was changed since the spawn: spawn a new job on its branch <branch>, the checkout being the one a job of that project starts from now (on another machine, there,<home>/repos/<project>.git) and its worktree.arthur-worktrees/<id>beside it; or, when those match,<id>: Git added no worktree <id> to the repository of <checkout>; ...as above, so a record rewritten to another project whose jobs’ worktrees share the folder is refused too. A project no longer declared is refused as at a spawn (unknown project <name>; ...). Nothing in the record is written. A continue that passes starts the wrapper with that checked place on its command line, never read from the record again, so a program the job left behind that rewrites it meanwhile changes nothing of the new run’s sandbox. - An empty argument, the id or the instruction (
""): wrong usage, the usage line and exit code 2, before anything is run. A whitespace-only instruction:the instruction is empty. - On another machine, a refusal from there, each as above (in a run there, its worktree pruned there, being continued there), after
machine <name>: arthur remote-job continue:. A machine that does not answer:machine <name>: ssh <ssh>: <ssh's last line>. A machine no plugin registers now:<id> runs on machine <name>, which no plugin registers; machines: <names>. - A plugin’s
beforeSpawncheck, run on the job as its record has it (itstaskand theTicket:files it names,kind,project,model,thinking,timeout, and the--budgetor else itsbudget), that gives a reason:refused by <plugin>: <reason>; one that throws:plugin <plugin>: beforeSpawn failed: <message>. The core’s own check refuses a worker whose ticket cannot move to in-progress, amergedone for example, as at a spawn (seearthur spawn --help). A refused continue starts nothing and leaves the record as it was. - A plugin’s
preparethat throws, or returns anything but variables:plugin <plugin>: prepare failed: <message>, as at a spawn; the continue starts nothing and leaves the record as it was. - A config or a plugin that does not load:
arthur.config.ts did not load:, then the reasons.
Wrong usage (not one id and one instruction, an unknown flag, --budget without a plain decimal or given twice) prints the usage line and exits 2.
--budget 0 on a job whose record is not free hands the checks --decision <id> ("" without it) with the job’s id, as arthur spawn --help says under “–budget 0”: the owner’s budget decision for the job’s ticket, or for this job (--job <id>) when it names none, used once. A plugin’s host.jobs.continue(id, instruction, budgetUsd, decision) hands its decision the same way; without one it is not checked. A continue without --budget keeps the job’s budget.
arthur doctor
Section titled “arthur doctor”Usage: arthur doctor
Checks what Arthur needs to work, by code, without asking any model, and prints one line per requirement, the core’s first, then each enabled plugin’s in setup order:
core git: okcore node: okcore omp: okcore home: okcore controllers: missing: the user manager has the controllers "memory pids", not cpu and memory; without it: jobs run without the joint limit of core.jobs.cpu and core.jobs.memory, and what a job leaves behind is not killed at its end; fix: delegate them (docs/setup.md, step 10), then rebootcore env: okcore env ignored: okcore sandbox: okorchestration tmux: oksession service: oksession linger: okmachines mac: ok (macos arm64, arthur 0.1.0 3f9c2a1b7d4e)projects blog about: missing: no about; without it: the coordinator knows it only by prefix, name and title; fix: add about to projects.project(...) in /home/arthur/arthur/projects/blog/project.config.tsEach line is <plugin> <name>: ok (some add what they found in brackets), or <plugin> <name>: missing: <reason>; without it: <what does not work>; fix: <one command or step>. Every check runs at once, each cut after 10 seconds. Exit code 1 when a critical requirement is missing, else 0, also with other lines missing; 2 on wrong usage (usage: arthur doctor).
What is checked
Section titled “What is checked”core git:git --versionruns. Critical.core node: the Node that runsarthuris 24 or newer. Critical.core <agent>: the agent binary,core.agent.command(defaultomp), is found onPATH; it is not run. Critical.core home: the home folder,core.home, exists or can be made, and is writable. Critical. The check makes it, or keeps it, its user’s alone, whatever the umask: a new home is0700, one made earlier as0755loses the group’s and others’ bits; so does every command that loads the plugins,arthur runand every spawn. Every record, log, lock and plugin folder lies under it, so no other user of the host reads or writes them. Eacharthurcommand also runs under umask077, whatever umask started it, so every file it and its jobs write is0600and every folder0700, the jobs’ worktrees beside each project included. A home of another user ismissing: <home> is not writable (EPERM).core controllers: the systemd user manager is there (systemctl --user show-environment) and the CPU and memory controllers are delegated to it (systemctl show user@<uid>.service -p DelegateControllers), so each job gets its scope (arthur spawn --help). Not critical. Without a user manager (macOS, a container) this is the one line that says so:missing: no systemd user manager, so no job scope and no user service (<why>), and the session plugin then has no line.core env: the env file,core.envFile, lies outside the config’s folder and outside each project’s checkout, as the projects provider lists them (the config’s folder alone when the plugins do not load). Not critical. Inside one, a recursive search the coordinator or a job runs there (grep -r ARTHUR_ .) prints its values into the agent’s transcript, which the model provider keeps, and the env guard never sees the file’s name:missing: the env file <path> lies inside <folder>, fixed by moving it to~/.config/arthur/.env, the default, and leavingcore.envFileout ofarthur.config.ts.core env ignored: when the folder of the env file,core.envFile, lies in a Git checkout (git -C <folder> rev-parse --show-toplevel), Git ignores the file (git check-ignore -q), whatever its name. Critical: a commit there (git add -A, as the coordinator commits in the config’s folder) takes its values into the repository, and a push sends them to every clone. Outside any checkout it isok. A file Git already tracks (git ls-files --error-unmatch) is never ignored, whatever.gitignoresays:missing: the env file <path> is tracked by the Git checkout <top>, so no .gitignore line ignores it, and every commit that holds it keeps its values, fixed bygit -C '<folder>' rm --cached -- '<name>', a commit, and rotating every value it held, as the history keeps them. Elsemissing: the env file <path> lies in the Git checkout <top>, which does not ignore it, fixed byprintf '\n%s\n' '<name>' >> '<folder>/.gitignore', which adds its name to the.gitignorebeside it, or by moving it to~/.config/arthur/.envand leavingcore.envFileout ofarthur.config.ts. Each printed command runs as pasted: the folder and the name are quoted as one shell word each, and in the.gitignoreline a\, a[, a leading#or!and a trailing space are escaped, so the line names the file and nothing else.core sandbox: the job sandbox sets up on this host (python3 -Isets its Landlock ruleset and seccomp filter and findssh, as at a job’s start,arthur spawn --help, “The sandbox”). Not critical. Where it does not, every job fails at its start unlesscore.jobs.unsandboxedis on:missing: no sandbox: <why>; without it: every job fails at its start, failed: no sandbox; fix: run Arthur on Linux 5.13 or later with python3 (docs/deploy.md), or set core.jobs.unsandboxed: true in arthur.config.ts to run jobs without one, with the writes of your user. With the option on it isok (no sandbox: <why>; core.jobs.unsandboxed is on, so a job writes wherever <user> can).core provider key <variable>: one line for each model provider’s key that omp reads from its environment and that is set, not empty, in Arthur’s own environment:ANTHROPIC_API_KEY,OPENAI_API_KEY,AZURE_OPENAI_API_KEY,GEMINI_API_KEY,GOOGLE_API_KEY,XAI_API_KEY,OPENROUTER_API_KEY,MISTRAL_API_KEY,GROQ_API_KEY,DEEPSEEK_API_KEY,CEREBRAS_API_KEY,TOGETHER_API_KEY,FIREWORKS_API_KEY,PERPLEXITY_API_KEY,MOONSHOT_API_KEY,ZAI_API_KEY,MINIMAX_API_KEY,OLLAMA_API_KEY,LM_STUDIO_API_KEY. None set, no line. Not critical. A job’s launch drops only theARTHUR_variables, so such a key exported in the shell or the service’s environment reaches every job and each of its tool calls, where a program the job runs can read it:missing: <variable> is set in Arthur's environment, which every job and each of its tool calls inherits, fixed by unsetting it wherearthur runstarts and logging omp in with its own login (omp login, kept in~/.omp), or giving a job its key through the models plugin’sprepare(keyEnv,packages/models/docs/models.md). The line names the variable, never its value.core <project> <plugin>: one line for each piece of a project’s file (arthur projects --help, “A project’s file”) that no loaded plugin reads, a disabled plugin’s or a key written by hand:core shop dokploy: missing: no enabled plugin reads dokploy.project(...); without it: project shop's dokploy.project(...) does nothing; fix: enable dokploy in arthur.config.ts, or remove the line from <folder>/project.config.ts. Not critical: inside a job a plugin whose variable is unset is not loaded (arthur config --help), and its pieces must not break the job’s own commands. A plugin reads a piece when it declarespiece(docs/plugin-api.md); none, no line.core plugin <name>: one line for each enabled plugin whosepackage.json, in the package folder around itsmodule, names the core releases it was built for in npm’s own field,peerDependencies["@arthur/core"], read when the plugins load. Not critical: the start goes on. Only^x.y.z,~x.y.zand an exactx.y.zare read, as npm reads them (^0.1.0takes0.1.x,^1.2.0takes1.xfrom1.2.0,~1.2.0takes1.2.x). A release, the core’spackage.jsonversion(arthur version --help), within it isok (built for @arthur/core <range>); outside it,core plugin <name>: missing: built for @arthur/core <range>, this core is <version>; without it: <name> may use what this core does not have; fix: install the release of <name> built for @arthur/core <version>, or the core its range names; any other range,missing: its range of @arthur/core, <range as JSON>, is not read: only ^x.y.z, ~x.y.z and x.y.z are, fixed by writing it as one of those in thatpackage.json. A plugin without the field has no line; the first-party plugins name none, as they ship in the same release.- Each enabled plugin’s own, in setup order: first what its
doctorgives from its options alone, without its setup or its env values, then what its setup provides throughcollect("doctor"). From itsdoctor:orchestration tmux(tmux -Vruns; critical, since there is no coordinator without it),session serviceandsession linger(docs/session.md). From its setup, as they need what it reaches (a machine, a key, a clone):machines <name>(arthur machines --help),projects <name> aboutandboard(arthur projects --help),delivery <project> identity(git has an author and a committer for a merge commit there,arthur merge --help), and those ofmodelsandnvm. A plugin disabled in the config is not checked and has no line.
A check that throws costs its own line only, <plugin> <name>: missing: check failed: <error>, and every other line is still printed; one that does not answer within 10 seconds is missing: check timed out after 10 s. A plugin whose answer is not a list of requirements, or throws, has one line, <plugin> requirements: missing: check failed: <error>.
A config that does not load prints arthur doctor: arthur.config.ts did not load: and the reasons, exit code 1. One that loads while the plugins do not (a variable missing, a refused option, a setup that failed) prints the core’s own lines and each enabled plugin’s doctor lines first, so a first setup sees those at once, then arthur doctor: the requirements a plugin checks in its setup are not checked: arthur.config.ts did not load: and the reasons, exit code 1.
At every start of arthur run
Section titled “At every start of arthur run”The same check runs first, before the lock and before any plugin’s start, so before the start notice’s probe (docs/session.md). Each missing line is printed, arthur run: <line>, so the service’s journal shows it.
- A critical one refuses the start: the missing lines go to stderr, then
arthur run: refused: a critical requirement is missing; fix each line above, then run arthur doctor, exit code 1, and no plugin starts. They are sent as onenotice,arthur run refused on <host>: a critical requirement is missingand the lines below it. - Otherwise
arthur runstarts with reduced function, and the missing lines are sent as the core’sdoctorevent,{ lines }, which the session plugin’s start notice opens with. Without the session plugin they are printed only.
A line is sent at most once a day: <home>/doctor.json holds each missing line with when it was sent, so the service starting a refused arthur run again every 5 seconds sends its refusal once. A line that changed is a new line, sent at once; a line fixed is dropped from the file, so missing again it is sent again. A doctor.json that is not what Arthur writes (edited by hand) is taken as empty. With the home folder not writable nothing can record what was sent, so the lines are printed only; so are they when a plugin does not load, as there is no event log to send them to (a critical miss still refuses the start, else the load’s own refusal does).
arthur doctor itself always prints every line, sent before or not, and sends nothing.
arthur help
Section titled “arthur help”Usage: arthur help [<command>], arthur <command> --help
arthur help <command> and arthur <command> --help print the command’s doc page, the file it registered with. arthur <command> <word> … --help prints the page of the group <word> names instead, <doc>-<word>.md beside the command’s page (arthur github pr --help prints github-pr.md), when <word> is lowercase letters, digits and dashes and that file exists; otherwise the command’s own page. arthur help, arthur --help and arthur alone print the usage line and every command’s name, the core’s and the enabled plugins’.
Every command runs as arthur <command> [args], on arthur.config.ts in the working folder, and exits with the command’s own code. --project <name>, anywhere on the line, tells the command which project to act on instead of the main one; the command gets every other argument as written. Without --project, a non-empty ARTHUR_PROJECT in the environment names the project instead, checked the same way below: orchestration sets it in a project agent’s session (arthur coordinator --help, “Project agents”), so each command there acts on that project. --project wins over it.
Each plugin registers its commands when it is set up, each with its doc page. Refused, and the start with it: a command whose doc file does not exist, a name that is not lowercase letters, digits and dashes, a name another plugin or the core already registered (the message names both), and an inJob other than true or absent. Names are case-sensitive: arthur Config is not arthur config.
Inside a job, a process in the job’s systemd scope arthur-job-<id>.scope (arthur-job-<id>.<ms>.scope for a run arthur continue started) while the home of the arthur.config.ts the CLI reads holds that job’s record (<home>/jobs/<id>), or, where the job runs bare (no systemd user manager), one with ARTHUR_JOB set, which the wrapper sets to the job’s record and a job’s shell can clear (arthur spawn --help; docs/deploy.md, “Threat model”), only a command registered with inJob: true runs: help, version, jobs, roles, remote-job (its records step only), and of the plugins decisions, board, task, plan (orchestration), findings, projects, machines (without update), resources, stats (stats, its tickets and budget only, its own refusal of the spend), retro-due, health (manage), schedule (its list only), ci (github, without --rerun), github (github, reads only), youtrack (reads only, its own refusal) and plugin (into the job’s own worktree only, its own refusal); a plugin with an env variable not in the job’s shell, such as github or youtrack with its token, is not loaded there, since a job’s CLI reads no env file (arthur config --help). Each plugin there gets the job, its id and the project its record in that home names, as host.job (docs/plugin-api.md), and the projects plugin loads that project alone: no other project’s file is imported, and a job whose project has no folder in projects.folders (a record that home does not hold names none) is refused, so only the core’s commands load there (arthur projects --help). Every other command, merge, spawn, continue, stop, stopall, steer, prune, send, ticket, review, review-needed, changelog, silent, coordinator, decision, init, restart, eval, run, setup, config, doctor, update, attach, retro, usage and any a plugin adds without inJob included, is refused there: what the coordinator should do goes in the job’s final message. --help and arthur help <command> still print any command’s page. The plugins load first, as for any command, since a plugin’s commands exist only once it is set up; the refused command then runs nothing. The mark is the variable alone: a job’s shell that clears it is not told apart (AR0354).
Said, without running anything:
- Inside an eval session (
arthur eval --help, of the develop plugin), whereARTHUR_EVALnames the eval’s recording stub: every command,helpand--helptoo, before anything else,arthur: refused inside an eval session (ARTHUR_EVAL is set): arthur there is the eval's recording stub, <path>; exit code 1. - Inside a job (above), a command not registered with
inJob: true, after its plugins loaded and before it runs:arthur <command>: refused inside a job <id>: a job runs only the commands its role needs; put what the coordinator should do in your final message,<id>the record’s folder name;schedule addandschedule remove,ci --rerun, eachgithubwrite (arthur github pr merge),machines update, and eachremote-jobstep butrecords, once their usage is right, say the same with the verb or flag after the command (arthur schedule add: refused inside a job …); exit code 1. - An unknown command:
arthur: unknown command <name>, then every command’s name; exit code 2. - When
arthur.config.tsor a plugin does not load, only the core’s commands exist (config,continue,doctor,help,jobs,prune,remote-job,roles,run,send,setup,spawn,steer,stop,stopall,ticket,update,version), and listing the commands says why. Of themconfig,help,remote-job,setup,updateandversionrun as with the load,arthur config checkandarthur setupreporting why it does not; past their own usage check, the others refuse, naming why, exit code 1:continue,doctor(after the core’s requirements, when only a plugin did not load),jobs,prune,roles,run,send,spawn,steer,stop,stopallandticket, as inarthur ticket: the board needs the project list, and arthur.config.ts did not load:and the reason. - A doc file deleted after the command was registered:
arthur <command>: its doc file <path> was deleted after Arthur loaded; exit code 1. --projectwithout a name, or given twice: exit code 2.- A
--projectname Arthur does not know, before any command runs (its--helpstill prints): with the list of theprojectsplugin, a name not in it,arthur <command>: unknown project <name>; projects: <names>; without that plugin, any name but the repository’s folder name,unknown project <name>; the only project is <name>, or, outside Git,unknown project <name>; no plugin provides the project list and <folder> is not in a Git repository; exit code 1. Whenarthur.config.tsdoes not load, the project list is unknown and the name is not checked; the commands that read it refuse anyway. - A command that throws:
arthur <command>: <message>; exit code 1.
Phone commands: a command may also answer /<name> <text> on a channel, without the model. A channel routes the message to the host with where it came from, its channel, the place the message names (a topic, a channel id) and the channel’s named instance it came through (a named bot), which the command gets beside the text, and sends the reply back to that place: the command’s answer, unknown command /<name>; phone commands: /a, /b for a name no phone command has, or /<name> failed: <first line of the error> when it throws. A channel’s command menu lists the phone commands, each with its one line. So that every phone command fits Telegram’s menu, a phone command is also refused at start when its name has a dash or more than 32 characters, or its line is empty, only spaces, or longer than 256 characters; a command without a phone side keeps its dashes (arthur review-needed).
Exit code: 0 when the page or the list is printed, 1 when a doc file is gone, 2 on wrong usage or an unknown command.
arthur jobs
Section titled “arthur jobs”Usage: arthur jobs [--state <state> | --follow <id>]; on a channel /jobs.
Every project’s jobs, from their records in <home>/jobs/, answered without the model; no jobs when there is none. Inside a job, the records its sandbox shows: its own and those of its project that were there when its run started (arthur spawn --help, “The sandbox”). One group per state, under its heading, in this order, each newest spawn first: blocked, working, idle, ended. One line per job:
AR0018 worker blocked 1h15m $0.40/$2.00 acme 436045b4 user: may I drop the old table?- The ticket: the first
Ticket:path of the task that lies inspec/features/<id>-<slug>/, else-. - The kind and the state.
- A job that has not ended: how long it has been in its state (since
since); an ended one: the time it ended intimeZonewhen that was today, else its date. - Its cost against its budget, in USD;
$0.00/$0.00is a job without a budget. - Its project, when the records hold jobs of more than one project.
- Its short id, the 8 hex digits that end its id.
arthur stop,steer,continue,prune,jobs --followand/steertake it in place of the full id; a short id that matches two jobs is refused, naming both. - Its reason, when it has one.
--state <state> shows only the jobs in that state, no <state> jobs when there is none.
–follow
Section titled “–follow ”arthur jobs --follow <id>, by its full or short id, prints one job’s run as it happens, read from its record alone, without the model: its log from the first line, then each line as the wrapper writes it (arthur spawn --help, the record’s log): [arthur <time>] ... notes, one line per tool call with its path, command or pattern, > <line> per line of the agent’s text, and what the agent printed on stderr. A line is printed once its line break is written. A line state: <state> (<reason>) comes at the start and after each change of the state or its reason, once the move has written state (state: without a state for a record that has none yet). It wakes on each change in the record’s folder, so it costs nothing while the job is quiet.
It ends once the run is over, exit code 0, its last line the final state: ended, or blocked once the run ended (a job a plugin holds blocked is still in its run, and it follows on). An ended job prints its whole log and ends at once. arthur continue starts a new run, which a new --follow shows. A job on another machine is followed in its record here, which the sweep of arthur run copies from there (arthur spawn --help). The herdr plugin runs it in a herdr tab per job (packages/herdr/docs/herdr.md).
Refused: an unknown id, or a short id that matches two jobs, as arthur stop refuses it, and a record removed while it follows (<id>: its record is gone), exit code 1; --follow without an id, or with --state, prints the usage line and exits 2.
States
Section titled “States”Every job is in one of four states, kept in its record as state, with reason and since (the ISO time it took that state); reason and since are written first and state last. Each change, of the state or of its reason, emits job-state with id, project, ticket (the ticket id of the task’s first Ticket: path in spec/features/, else null), machine (local, or the machine the job runs on; see arthur spawn --help), from, to and reason; a move to the state and reason the job is in already writes and emits nothing. A spawn writes the record working, with no event (job-started is the first).
working: the agent is in a run, with output (any line on its stdout or stderr) or a tool call within the lastcore.jobs.idleMinutes(default 10). No reason.idle: its run goes on, but its agent has printed nothing forcore.jobs.idleMinutes; its next output, a tool call for example, turns itworkingagain with one event.0turns idle off. No reason.blocked: it cannot go on until something outside it happens; the reason says what,user: <question>ordependency: <what>. A run that would endfinishedendsblockedwhen the first line of the agent’s final message isBlocked: user <question>(reasonuser: <question>) orBlocked: on <ticket or job id>(reasondependency: <ticket or job id>); the line anywhere else ends itfinished. A plugin holds a job in a run withhost.jobs.block(id, reason):blockedondependency: <reason>(its spaces and line breaks made one space), whatever its agent does, until its run ends.blockis refused for an empty reason (block <id>: the reason is empty), an id with no record (<id>: no such job in <home>/jobs) and a job not in a run (block <id>: it is <state> (<reason>), not in a run; only a job in a run is held).ended: nothing more will happen. The reason is the outcome:finished,stopped(byarthur stop),limit: time: ...,limit: budget: ...,limit: memory: ...(out of memory, an out-of-memory kill included),limit: loop: ..., orfailed: <why>,failed: process goneandfailed: machine offlineamong them (seearthur spawn --help).
arthur continue moves a job that is blocked at the end of its run, or ended, back to working and clears its reason. A job is in a run while it is working or idle, or held by a plugin: arthur stop, steer and stopall reach only those, arthur continue none of them; arthur stop also ends a job blocked on the user at the end of its run (see arthur stop --help). The sweep of arthur run ends a working or idle job whose wrapper (any process with its command line, also one that has not written its pid yet) and agent were gone on two sweeps in a row, never a blocked one nor one on another machine, whose record the sweep copies from there instead. A job on another machine that stops answering is blocked on dependency: machine <name> unreachable since <time>, then, past core.jobs.offlineGraceMinutes, ended failed: machine offline (see arthur spawn --help, “On another machine”). arthur prune frees only an ended job.
The record also holds hold (the reason of a plugin’s block, while it holds the job), active (its time is the agent’s last output), ran (the seconds the job spent in a run before its since: each move out of working, idle or a plugin’s hold adds the time since since; a copy from another machine never overwrites it), idle-minutes (the job’s core.jobs.idleMinutes) and state.lock (held for a moment by each change); a job on another machine also synced (where the next copy from there starts) and, while its machine has not answered or its run there has not been copied since, offline (when it was first found unreachable).
host.jobs.block(id, reason, true) also stops the run, as arthur stop does, here or over SSH on another machine, and resolves once it is over: the job is blocked on user: <reason> at once, and its run’s end keeps it so, whatever the outcome (the log keeps the outcome), with job-ended saying blocked and that reason; the hold goes, so arthur continue resumes it. The resources plugin stops a job at its ticket’s feature cap so (roadmap entry 33).
A plugin reads the same records with host.jobs.list(): every job in any state, the newest spawn first, each as { id, kind, project, state, reason, hold, since, branch, machine, cost, budget, usage, seconds, tickets }, a missing file read as "", since the time it took its state (ISO 8601), branch empty for a read-only kind, machine the machine it runs on (local when the record names none), cost and budget its files (USD), usage its usage file per model (arthur spawn --help), {} when it is missing or not a JSON object, a field that is no number read as 0, seconds its ran plus, while it is in a run, the time since since by the host’s clock, and tickets the paths its task names on Ticket: lines. host.jobs.running() is the ids of the jobs of list() in a run, the set arthur stopall stops.
Refused: a config or a plugin that does not load (arthur.config.ts did not load:, then the reasons), exit code 1; on a channel the reply is /jobs failed: <reason>. Any argument in the shell, an unknown flag, or --state without one of blocked, working, idle, ended prints the usage line and exits 2.
arthur prune
Section titled “arthur prune”Usage: arthur prune (<id>... | --all)
Frees what ended jobs hold: their worktree, their branch and their record <home>/jobs/<id>/. --all frees every finished job; else the jobs named, each by its full or short id. An id that names no job, or a short id that matches two, refuses the whole prune before anything is removed. A bare arthur prune, with neither ids nor --all, prints the usage line and exits 2, so an empty id never widens the prune. Prints one line per job, <id>: and what was done or kept, e.g. <id>: worktree <path> removed; branch arthur/<id> deleted; record deleted; no jobs when there is none.
Git decides what is safe, and what it refuses is kept, with the first line of what Git said:
- The worktree is removed with
git worktree remove, without--force: one with changes or untracked files stays, and so do the branch and the record (kept its worktree, branch and record: git worktree: fatal: ...). So does one that reads a Git config key that may name a program, from the repository’s shared config or the worktree’s ownconfig.worktree:git worktree removerunsgit statusin the worktree, which runs a clean filter that config names (kept its worktree, branch and record: git worktree: <file> sets <key>, …; the keys are listed indocs/deploy.md). A worktree already gone is pruned from Git’s list. - The branch is deleted with
git branch -d: one with commits that HEAD of the repository does not have stays, and so does the record (kept branch <branch> and the record: git branch: error: the branch '<branch>' is not fully merged). Its worktree is removed all the same; a later prune, once it is merged, deletes the branch and the record. A read-only kind has no branch. - A job that has not ended is kept:
kept: it is <state> (<reason>), not ended, for exampleworkingorblocked (user: <question>);arthur stopa job in a run first, and a blocked one keeps its worktree forarthur continue, unlessarthur stopends it, as it does one blocked on the user (seearthur stop --help). - A plugin may keep a record: the core asks every plugin that provides
jobs.keep, with the job (id,kind,project,task,state,reason,branch,worktree,branchempty for a read-only kind). Each answer that is a text is a reason to keep the record; the worktree and branch are freed all the same, and the line endskept the record: <reasons>. A provider that throws ends the prune there with its error, exit code 1; the job it was asked about keeps its record. - A plugin may clean up what it made for a job outside its worktree (
host.jobs.cleanup): once every check above that keeps everything has passed (not ended, a machine that did not answer, noroot, a place its spawn did not make, a planted Git config key), and right before the worktree goes, here beforegit worktree removeand for a job on another machine beforearthur remote-job prune, the core runs each plugin’s hook with the job (id,kind,project,task,state,reason,branch,worktree, andmachine,localwhen the record names none). The hooks run one at a time, in the order the plugins set up, each for at most 2 minutes. A text a hook returns joins the job’s line as<plugin>: <text>, before Git’s parts:<id>: docker: removed 2 containers; build cache cut to 10G; 150MB freed; worktree <path> removed; ...(the docker plugin’s,packages/docker/docs/docker.md). A hook that throws, rejects or runs past its limit is given up with onenotice(prune of job <id> on machine <name>: <plugin>'s cleanup gave up: <reason>; the prune went on without it), and the prune goes on as if it had returned nothing. A later prune of the same job, one whose branch or record was kept, runs the hooks again. The jobs are pruned one after another. - A record whose job changed where its spawn put it keeps its worktree, branch and record, as
arthur continuerefuses one (AR0597, AR0610): a branch other thanarthur/<id>or none (kept its worktree, branch and record: its record names the branch <branch>, where the spawn made arthur/<id> or none), arootother than the project’s checkout now (its record names the checkout <root>, where a job of <project> has <checkout>; a project no longer in the list has none,unknown project <name>; ...), or aworktreeother than.arthur-worktrees/<id>beside that checkout, or one Git did not add as worktree<id>(a spawn’s worktree already gone needs only its path). A job on another machine has its checkout and branch checked here, its worktree and branch there byarthur remote-job prune. - A job on another machine (its record’s
machine; seearthur spawn --help) is pruned there first, over SSH, byarthur remote-job prune: its worktree there, Git deciding there as above (kept its worktree, branch and record: machine <name>: arthur remote-job prune: git worktree: fatal: ...); its branch there, only while its tip is the one of the branch here, which its end brought here (elsekept branch <branch> there: it is not the one here); and its record there. A job still in a run there keeps everything (kept its worktree, branch and record: machine <name>: arthur remote-job prune: <id> is <state> there, in a run), and so does one whose worktree there reads a Git config key that may name a program, from the repository’s shared config there or the worktree’s own (… arthur remote-job prune: git worktree: <file> sets <key>, …; seearthur remote-job --help). The line starts with what it did there, e.g.worktree <path> removed there; branch arthur/<id> deleted there; branch arthur/<id> deleted; record deleted. Then the branch here and the record here go as above. A machine that does not answer keeps everything:kept its worktree, branch and record: machine <name>: ssh <ssh>: <ssh's last line>; so does a machine no plugin registers now. A job that ended herefailed: machine offlineis kept until its run there ended and was copied:kept: it ended here while machine <name> did not answer; the sweep follows its run there until its end arrives.
The exit code is 0 whatever was kept. Refused (exit code 1, the reason after arthur prune: ): an unknown id (<id>: no such job in <home>/jobs), a short id that matches two jobs (<id> matches 2 jobs: <id>, <id>; name one by its full id), a config or a plugin that does not load. Wrong usage prints the usage line and exits 2: a flag, no ids and no --all, --all with ids, or an empty id (arthur prune ""), each before anything is removed.
arthur remote-job
Section titled “arthur remote-job”Usage: arthur remote-job repo|add|launch|stop|steer|continue|prune|remove|records <home> [args]
The half of a job on another machine that runs on that machine. The main Arthur runs it there over ssh -o BatchMode=yes -o StrictHostKeyChecking=yes -o ConnectTimeout=10 <ssh> (see arthur spawn --help); a person has no reason to. <home> is the machine’s home as registered, an absolute path: Arthur’s home folder there, with the job records in <home>/jobs/, the projects’ repositories in <home>/repos/ and the job worktrees in <home>/repos/.arthur-worktrees/. It needs no config there: the jobs’ slice there gets the machine’s own limit, its cores minus one (at least one) and MemoryMax 70%, not the main Arthur’s core.jobs.cpu and core.jobs.memory.
repo <home> <project> <commit>: makes<home>, or keeps it, the user’s alone there (0700, asarthur doctor --helpsays of the home here), then creates<home>/repos/<project>.git, a bare repository, when it is not one yet, and printspresentwhen it holds the commit, elsemissing; the main Arthur then pushes the commit torefs/arthur/base, and asks again for a spawn’sfetch(a review’s branch tip,arthur spawn --help), which it pushes torefs/arthur/fetch. A push’sgit receive-packthere runs none of the hooks that repository’s config names. A project name with a/or starting with.is refused. So is a repository whose own config (itsconfig, itsconfig.worktree, a file either includes), which a job’s program there can write, sets a key that may name a program, asarthur spawn --helpsays of the main checkout’s (core.alternateRefsCommand, whichgit receive-packruns, among them):no push: <file> sets <key>, which a job can write and which may name a program Arthur's git would run; remove it, or set it in your ~/.gitconfig, before anything is pushed. The fetch back of a job’s branch,git upload-packthere, does not run that repository’score.alternateRefsCommand, so it is not checked.add <home>: reads the job as JSON on stdin (job, itsrootthe repository there, its capscpuandmemorywhen it has them;prompt;kind,{ resumeOnBudget, verdicts, extensions }, the record’sresume-on-budget,verdictsandextensions;idleMinutes;unsandboxed, the record’s,core.jobs.unsandboxedof the main Arthur;since), adds its worktree there from itsbase, on its branch or detached, and writes its record asarthur spawndoes; a record that cannot be written removes the worktree again.launch <home> <id> <agent> <slice>: starts the job’s wrapper there asarthur spawndoes here, in the scopearthur-job-<id>.scopeof the slice<slice>with the job’s own caps (see “Caps per job” inarthur spawn --help), and returns once it wrote itspid. It reads the job’s variables on stdin, a JSON object of the prepares’{ NAME: "text" }(none when empty), for the wrapper’s environment. A job with caps that runs bare there (no user manager) printsuncapped: <why>first, which the main Arthur tells once per machine. When the wrapper did not start, the job there is endedfailed: <why>and<why>is printed.stop <home> <id>:arthur stopof the job there; prints its line.steer <home> <id>:arthur steerof the job there with the text on stdin; prints the steer’s number.continue <home> <id> <agent> <slice> <caps> [<budget>]:arthur continueof the job there, reading{ "instruction": "<text>", "env": { "<NAME>": "<text>" } }on stdin: the instruction, and the variables the prepares returned on the main Arthur, which go into the new run’s environment only, aslaunch’s;<caps>(the JSON of whatjobs.limitsanswered here,{}for none) replacing the record’s caps,<budget>replacing its budget when given; thebeforeSpawnchecks are the main Arthur’s, run before. Prints why the wrapper did not start, aslaunch.prune <home> <id> <tip>: removes the job’s worktree there withgit worktree remove, Git refusing one with changes; its branch there only while it points at<tip>, the commit of the branch in the main checkout (empty when it has none); then its record there. Its git calls run no hook and nocore.fsmonitorthat the repository’s config there names: a program a job runs there may have set them.git worktree removerunsgit statusin the worktree, which runs a clean filter its config names, so a worktree whose config (the repository’s shared one, or the worktree’s ownconfig.worktree) sets a key that may name a program is kept with everything else,git worktree: <file> sets <key>, …asreposays; a worktree already gone is pruned without that check, as nogit statusruns then. Prints what it removed and kept, e.g.worktree <path> removed there; branch arthur/<id> deleted there. A job in a run there is refused,<id> is <state> there, in a run, and so is a record there whose job changed where its spawn put it (AR0610): a branch other thanarthur/<id>or none, arootother than<home>/repos/<project>.git, aworktreeother than.arthur-worktrees/<id>beside it or one Git did not add as worktree<id>(its record names the branch <branch>, where the spawn made arthur/<id> or none,its record names the checkout …), everything kept; a record already gone prints nothing.remove <home> <id>: removes the job’s worktree, its branch and its record there.records <home> <id>=<ms>:<bytes>...: one JSON object, by id, of each named job whose record exists there: itsstate,reasonandsince, read first under the record’s lock, thenfiles, every file of the record modified at<ms>(milliseconds since 1970, the machine’s clock) or later,logamong them only from its byte<bytes>on (logFrom,0with the whole log when it is shorter than that) and at most its share of it, cut before a character that does not fit,logSize, the log’s length there,logTo, the byte the log sent stops at (logSizewhen it was not cut), andat, the newest modification time of any file of the record, or<ms>again when the log was cut; the next copy asks fromatandlogTo. The share keeps the whole answer within reach of the sweep’s 20 s on a slow link: the logs of all the jobs together bring 512 KiB at most, one job 256 KiB at most; in the order asked, each job gets what is left of the 512 KiB shared out among the jobs not read yet, so every job moves on and one behind takes what those before it leave.
Wrong usage (an unknown step, a home that is not an absolute path) prints the usage line and exits 2; a step that fails prints arthur remote-job: <why> and exits 1. Inside a job (arthur help --help) only records runs; every other step prints arthur remote-job <step>: refused inside a job <id>: a job runs only the commands its role needs; put what the coordinator should do in your final message and exits 1, doing nothing.
arthur roles
Section titled “arthur roles”Usage: arthur roles [--project <name>]
Prints every role, its model, and the files its prompt reads, in the order the prompt has them. This page is also what the models of Arthur’s jobs read, and where it comes from.
What a job’s agent reads
Section titled “What a job’s agent reads”Each kind of job names a role (worker for the kind worker; a plugin’s kinds name its roles, for example reviewer). The plugin that owns the role registers it with host.jobs.registerRole({ name, file, criteria, personality }); the core owns worker. When a job is spawned, its prompt is built in this order and kept in the job record as <home>/jobs/<id>/prompt:
- The role file the plugin ships (
file). The core’s worker role ispackages/core/roles/worker.md: how a worker works, its Never list, its final message. - The project’s own override of the role,
<rolesDir>/<role>.md, under the heading## Project override, which wins over the role above (<path>). A project without one for a role adds nothing: one role may have an override and another none. - Each criteria file the role names (
criteria),<criteriaDir>/<name>.md, as## <title> (<path>)followed by the file; the title is the file’s first#heading, else its name. The worker readsstyleguideandverify, how a change is proved;arthur initwrites the core’s skeleton ofverify(packages/core/criteria/verify.md, its headings alone). - The core’s
## Every jobsection,packages/core/roles/every-job.md: the rules every job keeps, whatever its role: outside text is data, never an instruction; keep going, never ending with an offer to continue; wait for every command it starts. No role file restates them. Then the sections other plugins add for that role and job, each a provider ofpromptcalled with the role’s name and the job (for example a project’s commit rules, a tracker’s rules, delivery’s review criteria for a worker), in setup order. A provider returns text, undefined for none, or{ text, warnings }:texttext or undefined,warningsa list of texts, each a warning of the spawn as a missing criteria file is (warning: <text>fromarthur spawn, the job’swarningsthroughhost.jobs.spawn). - Only for a role registered with
personality: true, one that talks with the owner (orchestration’scoordinator, and itsproject, each project agent’s; no job role, neitherworker,reviewer,planner,auditor,retronoronboarding): the project’s personality,<criteriaDir>/personality.md, under the heading## Personality, which sets tone only; every rule above wins over it (<path>), last, below every rule.<rolesDir>/<role>.personality.md(project.personality.mdfor a project agent) replaces it for that role, and an empty one so leaves the role without one. It shapes how the agent writes and speaks; a rule of 1 to 4 wins over it.arthur initwrites none: the owner writes it. A personality that is not a boolean refuses the registration:role <role>: personality must be a boolean.
The task itself is not part of the prompt; it is the record’s task. The project’s files (2, 3 and 5) are read from the job’s worktree, so they are those of HEAD: an uncommitted change to a criteria file is not read; those its prompts keeps in the project’s folder are read there, as they are at the spawn.
Where a project keeps them: rolesDir (default .agents/arthur/roles), criteriaDir (default .agents/arthur/criteria) and vision (default spec/vision.md, the project’s vision), each relative to the project’s repository and read in the job’s worktree, or absolute: a file of the project’s folder, which the projects plugin serves at its real path for each prompts path written in the project’s file (arthur projects --help), read there, so not from HEAD. Either way never through a symlink. A relative path that leads out of the repository (..), or an empty one, is refused before anything is read: project <name>: prompts.<key>: expected vision, criteriaDir, rolesDir, each absolute or a path inside its repository, got <path>; so is any other key.
Outside a spawn a plugin reads a role through host.jobs.prompt(role, project?): the same prompt (1 to 3, and 5) from the project’s main checkout, without the sections of 4, which belong to a job, with the same warnings and refusals; and the project’s vision through host.jobs.vision(project?): { project, path, text }, or problem (missing, a symlink, not a file) instead of text, never read through a symlink. Left out, the project is the main one. The orchestration plugin reads the coordinator’s role and each project’s vision so, every turn (arthur coordinator --help). host.jobs.criteria() gives the names of the criteria files the registered roles read, each once, in the order the roles were registered (["styleguide", "autopilot"]); arthur init writes a skeleton of each.
Model, thinking level and quick model: from the one plugin that provides roles.model (orchestration’s roles option; for the role coordinator, its coordinator.model and coordinator.thinking), called with the role’s name and answering { model, thinking, quick }, or a promise of it, awaited, each a string or undefined, model also an ordered list; without one, the agent’s own default. A list is shown as written, model mac/qwen3-coder, anthropic/claude-haiku-5-5, and nothing is probed: a spawn has the models plugin pick from it (arthur spawn --help, “The model”). The quick model goes to the agent as --smol. arthur spawn --model and --thinking win over the role’s.
MCP servers: the same answer’s mcp, the role’s servers by name in omp’s mcpServers shape with their secrets filled in (orchestration’s mcp option, arthur coordinator --help, “MCP servers”), or undefined for none; the spawn writes them into the job record (arthur spawn --help). orchestration answers none for coordinator, whose servers it hands its agent itself. arthur roles never shows them, nor gives them to host.jobs.roles(): a secret is in them. An mcp that is not an object of objects refuses the spawn: roles.model: the mcp of role <role> must be an object of MCP servers by name, each an object, or undefined.
The spawn
Section titled “The spawn”- A role whose file is missing refuses the spawn, before any worktree or record exists:
role <role>: its role file <path> is missing. So does a kind whose role no plugin registered:role <role> is not registered; roles: <roles>. - A criteria file that is missing warns and the job starts without it:
criteria file <path> is missing; the <role> goes without it. A project without a criteria folder gets that warning for each file its role names. An empty criteria file adds nothing and warns:criteria file <path> is empty; nothing added. A personality file that is missing or empty adds nothing and warns nothing.arthur spawnprints each warning on stderr aswarning: <text>;host.jobs.spawnreturns them as the job’swarnings. - An override, criteria or personality file that is a symlink, or lies under a symlinked folder, is never read: the spawn is refused with
<path> is a symlink; refused, the roles read a project's file only as a plain file, and the job’s worktree and record are removed. So is one that is not a plain file (<path> is not a file). A symlink could make the prompt carry whatever it points at, a secrets file included. - A provider of
promptthat returns anything else refuses the spawn:a plugin's prompt section must be text or { text, warnings } of text, got <type>. Two providers ofroles.model, a model that is not a non-empty string or a non-empty list of them, or a thinking level or quick model that is not a non-empty string, refuse it too.
The output
Section titled “The output”One block per role, in the order the roles were registered, the core’s worker first; the coordinator’s role (coordinator, from orchestration) is listed with no kind, since arthur run starts it and no spawn does:
worker: model the agent's default, thinking the agent's default, quick model the agent's default; kinds worker; from core role /srv/arthur/packages/core/roles/worker.md override .agents/arthur/roles/worker.md none criteria .agents/arthur/criteria/styleguide.md criteria .agents/arthur/criteria/verify.mdThe first line: the role, its model and thinking level, the kinds that use it, and the plugin that registered it. Then one line per file, in the prompt’s order: the role file by its absolute path, the project’s files relative to the project; a role with personality ends with personality <path>, its own <role>.personality.md when there is one, else the shared one. A file that is read as it is has nothing after its path; otherwise: missing: a spawn is refused (a role file), none (no override, no personality), missing: a spawn warns and starts without it (a criteria file), empty: adds nothing, a symlink: never read, a spawn is refused, not a file: never read, a spawn is refused.
The project’s files are looked up in the main checkout’s working tree, so an uncommitted file shows here before a job reads it. The sections plugins add through prompt depend on the job and are not listed.
--project <name>: the project, a name in the list of the projects plugin; its main checkout is the project’s folder there, and left out, the first in the list (unknown project <name>; projects: <names> otherwise). Without the projects plugin, the only project is the main repository, named by its folder (unknown project <name>; the only project is <name> otherwise).
Exit code 0 when the list is printed; 1 when arthur.config.ts or a plugin does not load (the roles are what the plugins registered), or on an unknown project; 2 on any argument.
arthur run
Section titled “arthur run”Usage: arthur run
Runs Arthur as a process: loads arthur.config.ts from the working folder, sets up every enabled plugin, calls each plugin’s start in dependency order (a plugin after the plugins it requires, and after those of its after that are loaded, otherwise in the config’s order), and stays until it gets SIGTERM (or SIGINT, Ctrl-C). Then it calls each started plugin’s stop, in reverse order, and exits. A systemd user service keeps it running on a server: docs/setup.md.
It prints one line when every plugin has started, arthur run: pid <pid> started <plugins>, after it logs the event run-started { pid, plugins }; one when it begins to stop, arthur run: SIGTERM: stopping <plugins>, and arthur run: stopped at the end. Its stop is the command-ran of run, which the next start delivers (docs/plugin-api.md, “Core events”).
First, before the lock and any plugin’s start, it checks what Arthur needs, as arthur doctor does, and prints each missing line, arthur run: <line>. A critical one refuses the start; the others go first in the start notice, each sent at most once a day (arthur doctor --help).
One process per home folder (core.home, default .arthur/): <home>/run.pid holds the pid of the process that runs it. The file is removed at a clean exit, once each sweep still running has ended (its copy from another machine writes job records; see arthur spawn --help), at once when none runs; after a crash the next arthur run takes it over, since its pid is dead. On Linux the file also names the boot, so a pid reused by another process after a reboot does not hold it. A run.pid naming the starting process’s own pid, which a container restarted in the same boot (docker restart) gives its first process again, is not one this process took, so it is taken over too.
While it runs, it follows the event log <home>/events.jsonl: every 500 ms it delivers to the plugins’ subscribers the events another process appended since the last one it delivered, such as ticket-moved from arthur ticket or job-started from arthur spawn. An event emitted inside arthur run reaches them at once, and only once. A log cut or deleted by hand is followed again from its new end.
Once an event has reached every subscriber, its number goes to <home>/events.delivered (written whole, through a temporary file). At its next start, once it holds the lock and before any plugin’s start, arthur run delivers in order, once, every event after that number: those appended while it was down or stopping, by a deploy, a crash and the systemd restart, or a slow stop. Without the file (a first start) it starts at the log’s end, and the events logged before are not delivered; it writes the number of the log’s last event then, so the next start goes on from there even when nothing came in between. An event a plugin emits in its setup reaches the subscribers at once and is counted as delivered once the lock is held, never again from the log; a run that stops before the lock (refused, or a later setup failed) leaves it, like any command’s event, to the next start. From the moment the plugins begin to stop, the events another process appends wait for the next start, except when a plugin emits one during its stop: those appended before it are delivered first, so the subscribers get the log’s order.
A handler’s promise is not awaited: an event counts as delivered once every handler was called. A SIGTERM during a delivery lets it finish, so the event is not delivered again; a crash during it (SIGKILL, power loss) delivers that event again at the next start.
Refused, starting nothing:
- A critical requirement missing (
arthur doctor --help): its lines, thenarthur run: refused: a critical requirement is missing; fix each line above, then run arthur doctor. Checked before the lock, so the home folder’s own line comes before any write there. - A second
arthur runon the same home folder while the first lives:arthur run: <home> is already run by pid <pid>; one arthur run per home folder. - A config or a plugin that does not load:
arthur run: arthur.config.ts did not load:, then the reasons. - Any argument:
usage: arthur run.
When something fails:
- A plugin whose
startthrows:arthur run: plugin <name>: start failed: <message>. The plugins started before it are stopped, in reverse, the plugins after it are not started, and the exit code is 1. - A plugin whose
stopthrows:arthur run: plugin <name>: stop failed: <message>. The other plugins are still stopped, and the exit code is 1. - A plugin whose
stophas not ended 30 s on:arthur run: plugin <name>: stop did not end within 30 s; going on without it. The other plugins are still stopped, the exit code is 1, and whatever thatstopstill holds (a socket, a timer) ends with the process, one second afterarthur run: stopped. - SIGTERM while a plugin’s
startruns: thatstartfinishes, then that plugin and those before it are stopped, in reverse; the rest are not started.
Warnings, and it goes on from the log’s end:
<home>/events.deliveredholding no whole number (edited by hand):arthur run: <home>/events.delivered holds no whole number; following the event log from its end.- A number past the log’s last event (the log cut by hand):
arthur run: <home>/events.delivered holds <number>, past the log's last event <last>; following the event log from its end.
Exit code: 0 after a clean stop, 1 when a critical requirement is missing, a start or a stop failed or the home folder is taken, 2 on wrong usage.
arthur send
Section titled “arthur send”Usage: arthur send <file>... [--caption <text>] [--place <id>]
Sends files to the owner through every enabled channel (on Telegram: packages/telegram/docs/telegram.md, on Discord: packages/discord/docs/discord.md, each “Sending files”), each by the plugin’s own rules, and prints one line per channel, <channel>: <what it sent>, for example telegram: sent 3 files in 2 messages. A relative path is read from the folder arthur send runs in. In a project agent’s session the files go to that agent’s chat alone (below).
--caption <text>: shown with the first message.--place <id>: where the files go on each channel, a Telegram topic’s number or a Discord or Slack channel’s id; a channel that has no such place sends to its allowed chat, as it does without--place.
In a project agent’s session (arthur coordinator --help, “Project agents”) and without --place, the files go to that agent’s own chat, where its replies go: only the channel plugin of its chat (orchestration.project({ chat })) sends, to the chat’s place, by the bot its instance names when it names one, and only that channel’s line is printed. No other channel sends, and a refusal of another channel does not hold the send. With --place the files go as from any other session: through every channel, by its main bot, to that place. Arthur knows the session by orchestration’s answer to actor.chat (docs/plugin-api.md, “Provided names”), which is none in the coordinator’s session, in a terminal and in every other process, so there the files go through every channel as above.
Every channel checks the whole message before any channel sends: when one refuses it (too many files, a file over its size limit, a photo it would reject, a missing file), nothing is sent anywhere, and exit 1 prints arthur send: nothing sent: with each refusal as <channel>: <reason>, one per line. A channel whose send then fails prints arthur send: <channel>: <error> and the others still send; the exit code is 1. No token is ever printed.
Refused: no file or an unknown flag (exit 2 with the usage line); no channel enabled (arthur send: no channel is enabled: no plugin provides channel.send; enable one, such as telegram, in arthur.config.ts, exit 1); in a project agent’s session, a chat whose plugin provides no channel.send (arthur send: this session's chat is on <plugin>, which provides no channel.send: see arthur doctor, exit 1, nothing sent); a config that does not load.
Channels
Section titled “Channels”Every channel plugin keeps one contract, so the core and the coordinator treat them alike (@arthur/core/parts):
- It provides
channel.send: given{ files, caption?, place?, instance? }(absolute paths), it checks everything at once and throws every refusal, one per line, or answers a function that sends and resolves to its line. It sends by the botinstancenames, else (noinstance, or a name none of its bots has) by its main bot, and toplacewhen it names one of that bot’s places, else to that bot’s allowed chat. - What the owner sends becomes one event
message-received{ channel, parts, place?, instance? }:channelis the plugin’s name,placewhere the message was written when it names one (a Telegram topic, a Discord or Slack channel), andpartswhat the message holds, in its order, each{ kind: text | photo | video | voice | audio | file, path?, text?, mime, seconds? }. A text or a caption is atextpart with itstextandmime: "text/plain"; any other is a file the channel saved under.arthur/<channel>/, with itspath, itsmime, andsecondswhen the channel gives a length. An album is several parts of one message. The channel transcribes, converts and reads nothing. - The coordinator gets a message as one entry,
[via <channel>]and each part’s text under it, quoted, in order (arthur coordinator --help). Before that, the core askscollect("message.part", part)of the enabled plugins for each part that is not text: a plugin that handles the part’s kind answers{ text, reply? }, or a promise of it, and any other undefined. The first claim in setup order replaces the part by itstext, and itsreplygoes back to the owner through the channel and place the message came from (coordinator-repliedanswering the message). A part nobody claims is[<kind>, <mime>, <seconds> s] (<path>), the length only when given. Avoicepart nobody claims is[voice note not transcribed: the listen plugin is not enabled], and the channel says the same line to the owner. A claim that throws or rejects leaves the part as its saved path, followed on the same line by; <plugin> failed: <error>. - Messages keep their order: one waits until every part of the ones before it is resolved, so a text sent after a voice note never overtakes it.
arthur setup
Section titled “arthur setup”Usage: arthur setup
A report of what is there, what is set and what is missing, in the folder that holds arthur.config.ts; run it on a new machine, and again after each fix. It installs nothing, runs no model, prints no variable’s value, and writes nothing beyond what arthur doctor does (the home folder, and each plugin’s folder in it, which the load every command runs makes). Its sections, in this order:
Tools git 2.43.0 core node v24.21.0 core omp omp/18.3.0 core ssh OpenSSH_9.6p1 core systemd-run 255 core tailscale not found core tmux 3.4 orchestration docker 27.3.1 docker (not in the config)
Config: arthur.config.ts core set: home, jobs.budgetUsd; not set: envFile, agent, timeZone, quietHours, jobs.timeoutMinutes, ... orchestration on set: maxAgents, coordinator.model; not set: coordinator.thinking, roles, plan, ... projects on set: list (2); not set: reposDir telegram on set: bots (1), media env set ARTHUR_TELEGRAM_BOT_TOKEN (telegram.bots[0].botTokenEnv) env missing ARTHUR_TELEGRAM_CHAT_ID (telegram.bots[0].chatIdEnv) session off (enabled: false)
Requirements (arthur doctor) core git: ok ... orchestration tmux: ok the requirements a plugin checks in its setup are not checked until what Config refuses is fixed
Can still go in arthur.config.ts session (off): the coordinator's conversation: compacted by day, fresh each night, restarts, the restart guard and the LLM probe compactAt When the coordinator's conversation is compacted, once it is idle; [] for never; default ["08:00", "13:00", "18:00"] ... docker (not in the config): Docker on machines labelled tools: docker: what a job creates is labelled arthur.job=<id>, its compose stacks get its own project name, and Docker's data root counts for keepFree.disk ...
Next 1. Set ARTHUR_TELEGRAM_CHAT_ID in /home/<user>/.config/arthur/.env (telegram.bots[0].chatIdEnv), then arthur config check. Refuses the start. 2. delegate them (docs/setup.md, step 10), then rebootRun arthur setup again after each step.The plugins are the packages installed beside the config, node_modules/@arthur/<name>: each one’s options file (@arthur/<name>/options: a one-line summary, every option with its meaning and default, the tools it runs) is read by its path, so a plugin installed but not in the config is shown too. A package without one is named, no options table, and every other plugin is still listed. A plugin that is planned but not built has no package, so it is not listed; spec/roadmap.md names it.
- Tools: each tool the core and every installed plugin run, its version, and which plugins use it,
(off)when the config lists a plugin withenabled: false,(not in the config)when it does not list it. The version is the first word with a digit in the first line its version command prints, that line when none has one;not foundwhen the command is not onPATH;no version: <its last line>when it fails,no version: it printed nothing, andno version: cut after 5 swhen it does not end within 5 seconds. Every command runs at once, and a tool’s line costs only that line. - Config: the core, then each plugin the config lists,
onoroff (enabled: false). For each one that is on, the options its table has,setandnot set(a nested object’s fields by their path once it is set, a list with its length), and its env variables asarthur config checkprints them,setormissing, never a value. A plugin without an options table shows the options the config gives it. A plugin that is off has its env not read. Below, each refusal ofarthur config check(refused: <line>) but its type check, which onlyarthur config checkruns, or, when it has none, why the plugins did not load, and the env file’s warnings. - Requirements:
arthur doctor’s lines, from the same check (arthur doctor --help). When the plugins did not load (a variable missing, a refused option, a setup that failed), the core’s own lines and each enabled plugin’s owndoctor, which needs neither its setup nor its env values (orchestration tmux,session service,session linger), thenthe requirements a plugin checks in its setup are not checked until what Config refuses is fixed: those ofmachines,models,nvmandprojects, which need what their setup reaches (a machine, a key, a clone). - Can still go in arthur.config.ts: each installed plugin that is off or not in the config, with its summary, and every option at any depth (
*for each item of a list or record) with its meaning, and its default when it has one;nothingwhen there is none. - Next: numbered steps, each with its fix, in this order: the config (
Fix what Config refuses above, then arthur config check), each missing env variable (Set <name> in <env file> (<option>), then arthur config check), each critical requirement missing, then every other requirement missing; a step that refusesarthur runendsRefuses the start.; and the closing lineRun arthur setup again after each step.With nothing to do it saysnothing.
Exit code 1 when a step in Next refuses arthur run (a config or env refusal, a critical requirement missing), else 0; 2 on wrong usage (usage: arthur setup).
- No
arthur.config.ts: Config saysConfig: no arthur.config.ts, Requirementsskipped: no arthur.config.ts, every installed plugin is(not in the config)and can go in, and the first step isWrite arthur.config.ts (docs/setup.md, step 5), then arthur config check. - A config that does not load: its refusal under Config, Requirements and Can still go
skipped: arthur.config.ts does not load, no plugin marked in Tools, exit 1.
arthur spawn
Section titled “arthur spawn”Usage: arthur spawn <task> [--kind <name>] [--model <model>[,<model>...]] [--thinking <level>] [--timeout <minutes>] [--budget <usd> [--decision <id>]] [--machine <name>] [--requires <labels>] [--ignore-restart]
Starts a job on the task, given as one quoted argument, and prints its id, <date>-<kind>-<8 hex digits> (the date in core.timeZone), for example 2026-10-16-worker-b046ca2a. The job starts from HEAD of the repository that holds arthur.config.ts; uncommitted changes there stay where they are and are not in the job.
--kind: the kind of job, defaultworker. The core ownsworker; plugins register the others (review, audit, plan, …).--model,--thinking: the agent’s model and thinking level; left out, the role’s (arthur roles), else the agent’s own default.--model a,bis an ordered list, as a role’s model may be (a plugin’shost.jobs.spawntakesmodelas a name or a list): see “The model” below.--timeout <minutes>,--budget <usd>: the job’s limits, a plain decimal of 0 or more such as30or0.5;0is no limit. Left out, the kind’s own (registerKind’stimeoutMinutes,budgetUsd), elsecore.jobs.timeoutMinutes(default 240) andcore.jobs.budgetUsd(default 2). A plugin’shost.jobs.spawntakes them astimeoutMinutesandbudgetUsdand is refused, before anything exists, for a value that is not a number of 0 or more:spawn: <key> must be a number of 0 or more, got <value>.--machine <name>: the machine the job runs on,localor one a plugin registered withhost.jobs.registerMachine(below). Left out, the machine a plugin’sjobs.placeanswers when one provides it (themachinesplugin places each job by labels, or on the machine its ticket’s JSON block names:arthur machines --help), elselocal. A plugin’sjobs.placeis asked about a named machine too and may refuse it, asmachinesrefuses one without the labels the job needs; a named machine wins over what it answers. A plugin’shost.jobs.spawntakes it asmachine.--requires <labels>: the machine labels the job needs, such asos=macos,tools=xcodebuild:osandarchat most once each,toolsonce per tool (tools=xcodebuild,tools=docker), no spaces. They replace the ones of the job’s ticket and project; how they are read isarthur machines --help. A plugin’shost.jobs.spawntakes them asrequires,{ os?, arch?, tools? }. Without a plugin that providesjobs.placethe spawn is refused before anything exists:requires: no plugin places jobs by labels (jobs.place); the machines plugin does.--project <name>: the project, a name in the list of theprojectsplugin (arthur projects --help); the job starts from HEAD of that project’s folder, and left out, of the first project in the list, the main one. An unknown name is refused, naming the projects (unknown project <name>; projects: <names>). Without the projects plugin, the only project is the repository of the folder Arthur runs in, named by its folder.--ignore-restart: a switch, no value; thebeforeSpawnchecks get it asignoreRestart: true. The session plugin’s restart guard then lets this one job start while a restart is due (refused by session: restart due: ...;packages/session/docs/session.md, “The restart guard”). Every other check still applies.
What it makes:
- A worker: the branch
arthur/<id>and its worktree from HEAD. A read-only kind: a detached checkout of HEAD, no branch. Either lives in.arthur-worktrees/<id>in the folder that holds the repository, outside the main checkout and the home folder. - No
node_modules: the core copies none. A plugin’spreparestep can have the wrapper install one (roadmap entry 41 gives theprojectsplugin a frozen-lockfile install,ARTHUR_INSTALLbelow); otherwise the worktree has none, unless the job installs one itself. - The prompt of the kind’s role, built from the role file, the project’s override and criteria files in the worktree, and the sections plugins add;
arthur roles --helpsays what goes in and in which order. A criteria file the project lacks, or an empty one, and a warning a plugin’s section adds, is a warning on stderr,warning: <text>, and the job starts. - The job record
<home>/jobs/<id>/, one file per key:task,kind,model,model-why(why the model was picked from its list, below; empty when nothing was picked),thinking,quick(the quick model,--smol; empty for none),timeout(minutes),budget(USD),free(truewhen its model costs nothing, below; its budget is then 0),resume-on-budget(truewhen the kind asks for one resume at its budget, elsefalse),verdicts(the kind’sverdicts, one per line, below; empty for any),extensions(the extensions plugins registered, below, one per line, each a path from the core’ssrc/; empty for none),cpuandmemory(the job’s own caps, which a plugin’sjobs.limitsanswers; empty for none: see “Caps per job” below),idle-minutes(core.jobs.idleMinutes, default 10),unsandboxed(core.jobs.unsandboxed,trueorfalse; see “The sandbox” below),branch,root(the repository),base(the commit it starts from),worktree,project,machine(where it runs,localor another machine’s name),projects(every declared project’s main checkout at the spawn, a line<name> <repository>each, which the worktree guard refuses with each one’s.arthur-worktreeswhen it cannot read the projects plugin’s<home>/projects/checkouts, the same lines as declared now, which it reads on every tool call so a project added while the job runs is refused at once; a fallback is said once in the job’slog; empty without a project list, and in the record on another machine, where every project’s repository and worktrees are in the home folder),prompt(the role’s prompt), and the stateworking(state,reasonempty,since; seearthur jobs --help). An emptybranch,modelorthinkingmeans none. The record appears whole: it is written under.<id>and renamed. The places outside every checkout that the sandbox hides and the worktree guard refuses are not in it, as the job writes its record: each start of its wrapper gets them anew (“The sandbox” below). - With MCP servers for the job’s role (the
mcpof theroles.modelanswer,arthur roles --help; orchestration’smcpoption,arthur coordinator --help, “MCP servers”), the record also holdsmcp/, omp’s plugin folder:.mcp.jsonwith{ "mcpServers": ... }, readable by its owner only, since it holds the servers’ secrets, and.claude-plugin/plugin.json,{ "name": "arthur" }; andmcp.yml,tools:withxdev: false, so omp gives the servers’ tools as tools that pass--toolsand a read-only kind gets nowrite. Both are written before the record appears. Every job of the user can readmcp/while it exists, so it lies there only during a run: each end of a run removes it beforestateis written (the wrapper’s end below, a wrapper that does not start, the sweep’sfailed: process gone), andarthur continuewrites it again from the role’s answer then (arthur continue --help);mcp.ymlstays. A job on another machine gets none, since Arthur sends another machine no MCP secret (below, “On another machine”), and the spawn warns:warning: MCP servers left out on <machine>, which Arthur sends no MCP secret (arthur spawn --help, "On another machine"): <name>, <name>. - Then each plugin’s
preparestep runs for the worktree (a hook to install, a file to place; on another machine throughhost.jobs.run, below), the eventjob-startedis emitted with the job’sid,kind,project,root,branch,worktree,tickets(theTicket:files of the task) andmachine, and the job’s wrapper starts in the background. Apreparemay return variables,{ NAME: "text" }, which go into the environment the wrapper and the agent run with, so into that of every tool call of the job too, whose own tools could read them as they could an MCP server’s secret (arthur coordinator --help, “MCP servers”), never into the record or the log, a later prepare’s winning for a name; each prepare gets those the prepares before it returned as its second argument,env, in setup order (required plugins first, else the config’s); anything else it returns refuses the spawn as a throw does, naming no value:plugin <plugin>: prepare must return nothing or the job's variables, each a name of letters, digits and _ with a text.ARTHUR_AGENT_MODELamong them is the model the agent gets in place of the record’s (the models plugin’s name of omp’s provider).ARTHUR_INSTALLamong them is a shell command the wrapper runs first, in the worktree, inside the job’s scope, so the job’s caps hold it and what it leaves running is killed at the job’s end, and inside the job’s sandbox (“The sandbox” below), so its lifecycle scripts read neither the env file nor the environment ofarthur run, its output in thelogafter the lineinstall: <command>(the projects plugin’s install,arthur projects --help, “Install”); one that exits other than 0 ends the jobfailed: the agent did not start: <why>before any agent starts, its worktree kept, and a stop or a limit during it starts no agent. That environment is Arthur’s own without anyARTHUR_variable, so no secret an...Envoption names (arthur config --help) and noARTHUR_AGENT_MODELof Arthur’s reaches a job; the onlyARTHUR_ones there are those the prepares return, the wrapper’sARTHUR_JOBand the launch’sARTHUR_GUARDED(“The sandbox” below), which no prepare’s replaces, while the rest of Arthur’s environment (PATH, a provider’s key exported in the shell) is passed as it is.arthur spawnwaits until the wrapper wrote itspid, prints the id and returns without waiting for the agent.arthur continueruns everyprepareagain on the job as its record has it, its third argumentcontinuedtrue, for its variables only: a step that sets up the worktree (commit-rules’ hook, projects’ install) returns at once, one that returns variables (the models plugin’s provider, nvm’sPATH) returns them again, and a throw refuses the continue (seearthur continue --help). - A worker’s
job-startedmoves each ticket itsTicket:files lie in (spec/features/<id>-<slug>/...) toin-progresson the board (seearthur ticket --help); a ticket already there is not written. A move the board refuses then, for a ticket changed after the spawn’s check below, does not stop the job: it is printed asplugin core: handler of job-started (event <n>) failed: <reasons>. Other kinds move no ticket.arthur continueemitsjob-startedagain for each new run (seearthur continue --help).
Refused, before any worktree or record exists (exit code 1, the reason after arthur spawn: ):
- An unknown kind:
unknown kind <name>; kinds: <registered kinds>. - A kind whose role no plugin registered, or whose role file is missing:
role <role> is not registered; roles: <roles>,role <role>: its role file <path> is missing. - An empty task:
the task is empty. - A worker in a repository with a branch named
arthur, where Git cannot createarthur/<id>:<repository> has a branch named arthur, so Git cannot create a worker's branch arthur/<id> beside it; rename it: git branch -m arthur <new-name>. A read-only kind is not refused. - A
Ticket: <path>in the task whose file is not in HEAD, for example a ticket not committed yet:Ticket: <paths>: no such file at HEAD (<commit>); commit it first. EachTicket:the task names is checked; the path ends at a space, and a closing.,,,;,:,!,?or)is not part of it. - A plugin’s
beforeSpawncheck that gives a reason:refused by <plugin>: <reason>; one that throws:plugin <plugin>: beforeSpawn failed: <message>. - A worker whose
Ticket:files lie in a ticket (spec/features/<id>-<slug>/...) that cannot move toin-progress: one inplanning, not approved yet, amergedordroppedone, or one not on the board:refused by core: <id> is <status>, which cannot move to in-progressorrefused by core: <id> is not on the board, one per ticket joined by;, then; a worker starts on a ticket that is planned, in-progress, review, done. Without a project list the board cannot be read:plugin core: beforeSpawn failed: no project list: .... Other kinds are not checked. - An unknown machine, named or placed:
unknown machine <name>; machines: <registered machines>; two plugins that providejobs.place:call("jobs.place"): provided by <n> plugins; call needs exactly one; a refusal of the plugin’sjobs.place, as its own message (themachinesplugin’s: no machine with the labels, every one with them offline or full, a named one without them). - On another machine (below): a Git LFS project, its base or the spawn’s
fetchholding a.gitattributes, in any folder, that namesfilter=lfs, before any SSH step:machine <name>: a .gitattributes of <commit> names filter=lfs: <project> is a Git LFS project, whose jobs run on local only, as its LFS objects do not go to another machine and back (docs/deploy.md); ssh refused,machine <name>: ssh <ssh>: <ssh's last line>, such asalice@gpu: Permission denied (publickey).for a key the machine refuses orHost key verification failed.for an unknown or changed host key;arthurmissing there,machine <name>: arthur is not there (<the shell's line>); install the version here, <version> (docs/deploy.md); another version there,machine <name> runs arthur <theirs>, this one is <ours>; both need the same version(seearthur version --help). - A repository whose own Git config (
.git/config, the main checkout’sconfig.worktree, a file either includes) sets a key that may name a program, which Git would run in the worktree’s checkout here or there, or in the push of the base to another machine:no worktree: <file> sets <key>, which a job can write and which may name a program Arthur's git would run; remove it, or set it in your ~/.gitconfighere,machine <name>: git push: <file> sets <key>, …for another machine. The allowed keys:docs/deploy.md, “Threat model”. The fetch that brings an ended job’s branch back from another machine is refused the same way,machine <name>: job <id>: git fetch: …, named by the sweep, and tried again at the next one. The project’s repository on another machine is checked the same way before the push, asgit receive-packthere runs a key such ascore.alternateRefsCommand:machine <name>: arthur remote-job repo: no push: <file> sets <key>, …(seearthur remote-job --help). - A project that is not the main one:
unknown project <name>; the only project is <name>. - A folder outside Git, or a repository with no commit yet.
- A config or a plugin that does not load:
arthur.config.ts did not load:, then the reasons.
A prepare step that throws ends the spawn with plugin <plugin>: prepare failed: <message>; the job's worktree and record were removed: the worktree, its branch and the record are gone, and no job-started is emitted. The prompt’s refusals end it the same way, before any prepare: an override or criteria file of the project that is a symlink, lies under one, or is not a plain file, which is never read (<path> is a symlink; refused, the roles read a project's file only as a plain file; ...), and a plugin’s prompt section that is not text.
The model
Section titled “The model”A spawn’s model is one name, or an ordered list (a role’s in roles.model, --model a,b, or a plugin’s host.jobs.spawn({ model: [...] })); a spawn’s own wins over the role’s. The one plugin that provides models.pick (the models plugin, roadmap entry 82) is asked at every spawn with a model, after its machine is chosen and before any check or record: models.pick(list, machine) answers { model, why, free }, the first available model of the list, the line why, and whether it costs nothing. The record’s model is the model it answered and model-why the line, which arthur spawn prints on stderr as model: <why>; a free model’s job has the budget 0 (no limit) whatever was asked, its time limit kept, and its model-why ends ; budget: none, free model <model>. Refused before anything exists: the pick’s own refusal (no model available: ...), an answer that is not { model, why, free } naming a model of the list, two providers of models.pick, a model that is not a non-empty name or list of them, and, without a provider, any list: a model list needs the models plugin. Without the models plugin one name goes to the agent as it is. The job keeps its model to its end: a model lost mid-run fails the job with the agent’s reason.
On another machine
Section titled “On another machine”A plugin registers a machine with host.jobs.registerMachine({ name, ssh, home, labels }) (roadmap entry 30 does it from the machines plugin’s list): name in lowercase letters, digits and dashes; ssh, a Host of ~/.ssh/config or a host name (letters, digits, _, ., @, -, not starting with -); home, the absolute path of Arthur’s home folder there; labels, an object, read by placement. local, this host, is the core’s and always registered. A name registered twice, local included, a bad ssh or a relative home is refused at registration, naming the machine: machine <name>: registered by <plugin> and by <plugin>; a machine belongs to one plugin, machine <name>: ssh must be ..., machine <name>: home must be an absolute path, got ....
host.jobs.machines() answers the name of every registered machine, local first, then in the order they were registered (the resources plugin checks each one’s free CPU and memory, roadmap entry 34).
A job on local takes no SSH step. A job on another machine takes every step there through ssh -o BatchMode=yes -o StrictHostKeyChecking=yes -o ConnectTimeout=10 <ssh>, so ssh never asks for a password nor accepts a host key on its own, and gives up on a machine that does not answer within 10 seconds, and through that machine’s own arthur (see arthur remote-job --help). Each step there, a spawn’s, a steer’s, stop’s, continue’s or prune’s, ends within 60 s and 1 MiB of output, or fails as a machine that does not answer, naming the step: machine <name>: ssh <ssh>: arthur remote-job add: timed out after 60 s, or answered more than 1048576 characters (bytes for a steer’s and a prune’s, which wait in place); so does the fetch of an ended job’s branch, machine <name>: job <id>: git fetch: timed out after 60 s, named by the sweep, which copies the other jobs meanwhile and tries again at the next one, and the push of a base, within 600 s, machine <name>: git push: timed out after 600 s. Only a steer and a prune hold up the rest of arthur run while they wait:
arthur versionthere must print this core’s hash, the last word of its line (arthur version --help); thenarthur remote-job repocreates the project’s repository there,<home>/repos/<project>.git(bare), on first use, and says whether it holds the base commit. Only when it does not,git send-packsends it there over the same SSH, torefs/arthur/base, reading no remote of the checkout’s config, so a remote named as that URL sends it nowhere else (docs/deploy.md, “Threat model”). Every refusal so far comes before any record exists.- The prompt is built here, from the project’s files in the main checkout.
arthur remote-job addmakes the worktree there,<home>/repos/.arthur-worktrees/<id>(on the brancharthur/<id>there, or detached), and its record<home>/jobs/<id>/there,rootnaming the repository there; then the record here, whoseworktreeis the path there andmachinethe machine’s name. - Each plugin’s
prepareruns here, in this process, with the job’smachineand itsworktreethere, and acts on the machine throughhost.jobs.run(below), such as a file to place in that worktree; nothing of a plugin goes to the machine but the variables apreparereturns (step 4). One that throws removes the worktree, branch and record there and the record here. job-started, thenarthur remote-job launchstarts the wrapper there, with the env, worktree and steer extensions and those plugins registered (the record’sextensions, resolved in Arthur’s checkout there, which is of the same commit), in a scope of the slicearthur-jobs.slicethere with the machine’s own limit, its cores minus one andMemoryMax70%(this config’score.jobs.cpuandcore.jobs.memoryare this host’s), runningcore.agent.commandas that machine’sPATHfinds it. The prepares’ variables go on its stdin, a JSON object, into the wrapper’s environment there, never an argument or a file of a record. A wrapper that did not start there ends the job there, and the record here is copied at once.
host.jobs.run(machine, argv, limitSeconds?, input?) runs one command on a registered machine, input on its stdin (a secret goes there, never in argv, which a process list shows), and resolves, once it ended, to { code, stdout, stderr }: its exit code (null when a signal killed it) and its whole output. On local it runs argv here, without a shell, and a command that does not start is code 127 with <command>: <error> on stderr. On another machine it runs over the same ssh -o BatchMode=yes -o StrictHostKeyChecking=yes -o ConnectTimeout=10 <ssh>, each word of argv single-quoted for the shell there, so spaces, quotes, $, backticks and newlines arrive as written; the command runs in the login’s home folder there (a step in the worktree changes folder itself, such as sh -c 'cd "$1" && npm ci' sh <worktree>), and ssh’s own failure comes back as code 255 with ssh’s line on stderr. With limitSeconds, a command still running after that many seconds (ssh included, whatever it waits for) is killed (SIGKILL) and resolves at once with code null, the output so far, and timed out after <limitSeconds> s as the last line of stderr. An unknown machine is refused: unknown machine <name>; machines: <registered machines>; an empty argv or one with a word that is not text: run: argv must be a non-empty list of words; a limitSeconds that is not above 0: run: limitSeconds must be above 0, got <value>.
Arthur sends the machine the task, the prompt, the record’s keys and the base commit, and a secret only as a prepare’s variable on the launch’s stdin (a provider’s key of the models plugin, for the job’s agent). Each sweep of arthur run (every 30 s) copies, with one SSH call per machine, every machine at once and without holding up the rest of arthur run, for each of its jobs in a run the files its run writes there that changed since the last copy, pid, active, cost, usage, tool-calls, activity, result, commits, budget, continue and the caps (cpu, memory, feature, feature-cpu, feature-memory), and of the log only the bytes added since, at most 256 KiB of them per job and 512 KiB for all the machine’s jobs together per copy, shared out among them (the record’s synced says where the next copy starts): a log that grew more between two sweeps arrives over several, and the job’s state moves here only once all of it did. A copy brings the log up to its last line break, the rest at the next copy, so a value a cut splits is named whole; it brings all of it once the run ended there and the log came whole, and a 256 KiB cut without a line break whole. No other file of the record there (branch, project, kind, task and the rest) is copied: the spawn’s stays here. Each job is copied on its own. A job’s answer that is not of the shape records sends (a state of blocked, working, idle or ended, a reason text, a since date, at, logFrom, logSize and logTo finite numbers, and files an object of texts, each named by a record key: lowercase letters, digits and dashes) refuses that job’s copy, nothing of it written, the error naming the machine, the job and what it sent, as machine <name>: job <id>: sent a record file "<name>"; expected a name of lowercase letters, digits and dashes; a change of state moves the job here as there, with its job-state naming the machine. When the run ends there (ended, or blocked), its branch is fetched into the main checkout from the machine’s repository, whatever remote the checkout’s config names (git fetch-pack), refs/heads/arthur/<id> and never another, which updates a branch of that name left from an earlier run (git branch --force; while a worktree here has that branch checked out the copy is refused, machine <name>: job <id>: git fetch: fatal: cannot force update the branch 'arthur/<id>' used by worktree at '<path>', and tried again at the next sweep); then state is written and job-ended emitted. A record here whose branch is neither arthur/<id> nor empty refuses that job’s copy too, nothing of it written or fetched: machine <name>: job <id>: names the branch "<branch>" in its record here; expected arthur/<id> or none. Any other failure of a job’s copy is named the same way, machine <name>: job <id>: <why>; the machine’s other jobs and the other machines still copy, and each failure is named in the run’s log. The dead-job sweep never ends a job on another machine. arthur stop, steer, continue and prune of a job on another machine run there (see each --help).
A machine that does not answer (ssh’s exit 255: down, unreachable, its key refused; or a copy that has not ended within 20 s, machine <name>: ssh <ssh>: arthur remote-job records: timed out after 20 s, or whose answer passed 64 MiB, cut here, machine <name>: ssh <ssh>: arthur remote-job records: answered more than 67108864 characters) holds its jobs. At the first sweep that finds it so, each of its jobs in a run moves to blocked, reason dependency: machine <name> unreachable since <time> (UTC, ISO 8601), the time kept in the record as offline; there it runs on as it can. When the machine answers again within core.jobs.offlineGraceMinutes (default 30) of that time, each job takes the state its record there says: working or idle for one that ran on, its end and branch for one that ended, a plugin’s hold for one held; nothing is started again. Once that time is offlineGraceMinutes ago, each such job ends here failed: machine offline, with one line in its log (ended: failed: machine offline: machine <name> unreachable since <time>, past core.jobs.offlineGraceMinutes (<n>)) and one job-ended; its worktree and record there are kept for the human, and 0 fails them at the first sweep that finds the machine unreachable. The sweep still follows such a job: once the machine answers and its run there has ended, its end and branch arrive as above, with a second job-ended, however late.
Wrong usage (no task, more than one, an unknown flag, a flag without a value or given twice, a --requires of another form: --requires needs os=<os>,arch=<arch>,tools=<tool>, each label once but tools, got <value>) prints the usage line and exits 2. Exit code 0 when the job was made and its wrapper started.
Each job runs in a systemd scope of its own, arthur-job-<id>.scope, inside the slice arthur-jobs.slice, which all jobs share; a run arthur continue starts gets a scope of a new name, arthur-job-<id>.<ms>.scope, <ms> the time it starts in milliseconds since 1970, as the scope of the run before can still be loaded then. Before the wrapper starts, systemctl --user set-property --runtime gives the slice a CPUQuota of core.jobs.cpu cores (as a percentage, at least 1%; default the host’s cores minus one, at least one) and a MemoryMax of core.jobs.memory (default 70%), and the wrapper starts through systemd-run --user --scope. Once the agent is done, before the end’s files, the wrapper kills (SIGKILL) every other process left in the scope, a daemon that left the agent’s process group included, so nothing the job started runs on once state is final. Where that systemctl fails (no user manager: macOS, a container) the job runs bare, outside any scope, and the first line of its log says so: [arthur <time>] no systemd scope: <reason>; the job runs bare, without the joint limit of core.jobs.cpu and core.jobs.memory, and what it leaves behind is not killed at its end.
The variable ARTHUR_JOB_SLICE, set for an arthur command, names the slice its jobs go in, without .slice, in place of arthur-jobs, with the same limits: the test kit sets its own (@arthur/core/testing’s jobSlice), so a test’s arthur spawn never puts a job beside Arthur’s real ones. A name that is not letters, digits and _ in parts joined by - refuses the load: ARTHUR_JOB_SLICE: expected a systemd slice name without .slice, letters, digits and _ in parts joined by -; it is "<name>".
A wrapper that does not start ends its job before arthur spawn returns: systemd-run fails or exits before the wrapper wrote its pid (it refused the scope, or is missing while systemctl is there), or no pid appears within 10 seconds, and then the process group is killed (SIGKILL). The record gets the end’s files below, result, activity and commits empty, cost 0.0000, tool-calls 0, then state ended with the reason failed: <reason> last, the last line of log being ended: failed: <reason>, and job-ended is emitted; the worktree and branch stay for inspection. The reason is systemd-run: <its first line on stderr>, systemd-run: spawn systemd-run ENOENT, the wrapper exited <code> before it wrote its pid; see <home>/wrapper.log, or the wrapper wrote no pid within 10 s and was killed. arthur spawn prints the id, then failed: <reason> on stderr, and exits 1; host.jobs.spawn returns the reason as the job’s failed, undefined when its wrapper started.
When the record holds mcp/ (above), the agent also gets --plugin-dir <record>/mcp --config <record>/mcp.yml right after --tools <tools>, on every run of the job, a resumed or continued one too; --tools stays as it is. Without mcp/ (no servers for the role, a job on another machine, a record an older Arthur wrote) the command line is as below.
The wrapper, one background process per job, starts the agent, core.agent.command (default omp), in the worktree, in its sandbox (“The sandbox” below), in a process group of its own that the agent leads, with ARTHUR_JOB set to the record’s folder and ARTHUR_GUARDED as its launch gave it (below): <agent> -p --mode json --auto-approve --config <job settings> --tools <tools> --session-dir <record>/session --append-system-prompt <record>/prompt -e <env guard> -e <worktree guard> -e <steer extension> [-e <extension>]... [--model <model>] [--thinking <level>] @<record>/task. omp keeps the job’s session in <record>/session, where a resumed run (--continue) finds it and from where arthur prune removes it with the record. <job settings> is the core’s job-omp.yml, omp’s settings for every run of a job, a resumed or continued one too: bash.autoBackground.enabled and async.enabled false, so no bash call of the agent moves to the background, whose result a job’s run, which ends with the agent’s last message, never got; omp would otherwise move a call that outlives 60 seconds there. Each call runs until it ends or reaches its timeout, which kills it with no result: 300 seconds when the call names none, at most 3600. Delivery’s checks extension gives a call that runs the project’s checks a timeout of at least 1800 seconds (arthur review-needed --help, “The job’s checks”); a check that runs longer than its call’s timeout still gives the agent no result. omp puts the text of task into the first message and reads into it each file that text names as @<path>, @"<path>" or @'<path>' at its start or after whitespace or one of (, [, {, <, ", ' and ` (omp 18.3.0, no option turns that off), so the record’s task has a word joiner (U+2060) before each such @: a task that quotes a job’s or a reviewer’s text, @/etc/passwd in it, makes the agent read no file. A kind with a branch, such as worker, gets the tools read,edit,write,bash,grep,glob; a read-only kind read,bash,grep,glob. The env guard refuses a tool call that names a secrets file, the worktree guard one that writes outside the job’s own place (its places outside every checkout from ARTHUR_GUARDED, never from the record) or into a ticket’s spec/features/*/ticket.md in its worktree (the coordinator’s, which the merge refuses a branch to change; the ticket’s findings.md stays writable), and any pkill or killall, which signal other jobs’ processes and Arthur’s own by name (kill <pid> passes); the steer extension hands the agent the steers of arthur steer after each tool call (see arthur steer --help). After those three come the extensions plugins registered with host.jobs.registerExtension(url), in the order registered, as the record’s extensions names them: a file: URL of a module that exists, else refused at registration, extension <url>: expected the file: URL of a module that exists, as new URL("./<file>.ts", import.meta.url) gives; a record an older Arthur wrote has none. Every run of the job loads all of them, a resumed or continued one too. From what the agent prints the wrapper adds to the record, log appended to, every other file written whole under a temporary name and renamed:
pid: the wrapper’s process id, whicharthur stopsignals.active: written at the start; its modification time is the agent’s last output, a line on stdout or stderr. Afteridle-minuteswithout one the wrapper turns the jobidle, and the next one turns itworkingagain (seearthur jobs --help).log: lines[arthur <time>] ...of the wrapper’s own (the agent’s command line, the end), one line per tool call (<tool> <path, command or pattern>), the text of each of the agent’s messages, a line> <line>per line of it, what the agent prints on stderr, and any line of its stdout that is not an event.arthur jobs --follow <id>prints it as it grows.cost: the USD the agent’s messages report, summed, with 4 decimals;tool-calls: how many it started;activity:toolwhile a tool call runs,thinkotherwise.usage: per model,<provider>/<model>as omp names it, a JSON object{ messages, input, output, cacheRead, cacheWrite, cost }: the agent’s messages, the tokens they report (input, output, cache read, cache write) and their USD, summed; written after each message, ascostis, and missing until the first one. A run ofarthur continueadds to what the record holds, sousageandcostcount every run of the job.- No
checks: the core records no results of the project’s own checks; thedeliveryplugin’s extension does, in its own folder (arthur review-needed --help). - At the end, every file above but
usage, final since the last message, with its final value andresult(the text of the agent’s last message that had text, empty when none) andcommits(a worker’s commits sincebase,git log --oneline; empty for a read-only kind), then the state the run ends in,reasonandsincefirst andstatelast:ended, orblocked(below). A reader that sees one of them can trust every other file.
The run’s outcome is finished when the agent exited 0 with a final message; otherwise failed: <reason>, the reason saying why: no sandbox: <why>; set core.jobs.unsandboxed: true ... (below, “The sandbox”), the agent did not start: <error>, the agent was killed by <signal>, the agent stopped on error: <text> or on aborted (the last message’s stop), the agent exited <code>, the agent ended without a final message, no verdict: the last line of its final message is not <a> or <b> alone (a kind registered with verdicts, such as ["PASS", "FAIL"], whose final message ends on any other line, spaces around it aside); or stopped (by arthur stop), limit: time: ..., limit: budget: ..., limit: memory: ... or limit: loop: ... (below). The job ends ended with the outcome as its reason, except a finished run whose final message starts with a Blocked: line, which ends blocked (see arthur jobs --help). The last line of log is <state>: <reason>. Then the event job-ended is emitted with id, kind, project, state and reason, and undelivered, the numbers of the steers the agent never got, when there is one.
A run that ends failed: the agent stopped on error: <text>, <text> a transient provider error (a connection error, overloaded or a 5xx status) that is no cyber refusal, or failed: no verdict: ..., resumes once by itself, by the path of the resume at the budget (below): the log says resume: <reason>; the run resumes once, and the agent starts again in the worktree with --continue and, after --, the message Your run stopped on a provider error; Arthur resumes it once. Go on with the task where you stopped. or Your final message did not end on a verdict; Arthur resumes the run once. Write your final message again, its last line exactly <a> or <b>, alone. The job’s outcome is then the second run’s, judged the same way: a second such ending ends the job with it, never resumed again. An abort (on aborted), any other error, a stop and a limit are never resumed; each start of the wrapper (a spawn, arthur continue) has its own one resume, beside the one at the budget. Before that, omp tries a transient provider error again 20 times (retry.maxRetries in job-omp.yml, where the window is worked out): about 19 minutes against the Anthropic API.
Limits: the wrapper stops a job at its limit with the stop of arthur stop (see arthur stop --help): SIGTERM to the agent’s process group, SIGKILL to it when any of its processes is still alive 5 seconds later, then the processes that left the group and the rest of the job’s scope; the log says limit: time: stopping the agent, limit: budget: stopping the agent, limit: memory: stopping the agent or limit: loop: stopping the agent (stopping the install while the install a prepare asked for runs), and the job ends with the outcome of the first limit it reached, whatever the agent did after; an arthur stop after it (arthur stop: asked as well; no line once the job’s scope counts an out-of-memory kill, see arthur stop --help) leaves that outcome and rules out the resume below:
limit: time: the job ran past its timeout of <minutes> minutes:timeoutminutes after the wrapper started, even in the middle of a tool call, whose processes get the signal with the agent, or in the install a prepare asked for, which then endslimit: time: the job ran past its timeout of <minutes> minutes, during its installand starts no agent. When the time runs out while a job stopped at its budget is still ending, the log sayslimit: time: reached as well, and the job is not resumed.limit: budget: its cost $<cost> reached its budget of $<budget>: checked at each message the agent ends, oncecostreachesbudget, both at 4 decimals: a cost exactly at the budget stops the job, one $0.0001 below does not.limit: memory: ...: the job ran out of memory (“Caps per job”, below), and like the time that rules out the resume:the job went over its memory cap of <memory>, its own cap;the jobs of ticket <name> went over their memory cap of <memory>, its ticket’s; orthe kernel killed a process of the job, out of memory at a cap above the job: the one all jobs share, or the machine's. An out-of-memory kill in the job’s scope ends it so, notstopped.limit: loop: the agent repeated the same failed tool call 5 times (<tool> <its path, command or pattern>): the agent made the same tool call, the tool and every argument equal (but omp’s intent,i, which it words anew each time), 5 times in a row and each failed (omp’sisErroron the tool’s result), so it is stopped before the retries spend its budget (AR0739). Another call that ends between them, failed or not, starts the count again, and so does the same call once it passes: an edit between two failing test runs is no loop. Like the time, it rules out the resume.- A kind registered with
resumeOnBudget: truegets one automatic resume at its budget, unless its time is up as well: the log sayslimit: budget: $<cost> reached $<budget>; the kind resumes once, its budget doubled to $<doubled>,budgetin the record becomes the doubled one, and the agent starts again in the worktree with--continue(its last session there, the job’s own) and the messageYour budget of $<budget> ran out and was doubled to $<doubled>, once. Go on with the task where you stopped., after--, in place of@<record>/task. The cost keeps adding up from the first run, and the timeout still counts from the wrapper’s start. A second time at the budget ends the joblimit: budget; there is never a second resume. Other kinds, and a job stopped by its time, are not resumed.
A kind’s timeoutMinutes or budgetUsd that is not a number of 0 or more, a resumeOnBudget that is not true or false, or verdicts that are not a non-empty list of lines without line breaks or spaces around them, is refused when its plugin registers it: kind <name>: <key> must be ....
A record deleted while the job runs, also one a rm -r is still emptying (its pid or log gone, its folder not yet), is noticed at the wrapper’s next write that fails: it sends SIGTERM to the agent’s process group, so the agent and every process it started stop, kills what is left in the job’s scope (a job that runs bare: one that left the group runs on), writes the one line [arthur <time>] job <id>: its record <path> was deleted while it ran; the agent was stopped and nothing more is written to <home>/wrapper.log, and ends; nothing more goes into the record’s folder and no job-ended is emitted. The wrapper makes log at its start and then only appends to it, never creating it again, so a rm -r that unlinked log does not find a new one in the folder it is emptying. <home>/wrapper.log also holds whatever a wrapper prints that has no record to go to, such as a crash.
Limit: the record’s other files (tool-calls, cost, activity, state and the rest) are still written under a temporary name and renamed into the folder, so a rm -r that lists the folder while the wrapper writes one of them can still fail with ENOTEMPTY.
Caps per job
Section titled “Caps per job”A job’s own CPU and memory, inside the joint slice: what the one plugin that provides jobs.limits answers for the spawn, { cpu?, memory?, feature? } (the resources plugin’s perJob, and its caps per feature), kept in the record as cpu, memory, feature, feature-cpu and feature-memory (empty for none); arthur continue asks it again and writes its answer there, so a continued job gets the caps in force then. feature is { name, cpu?, memory? }: the job’s scope goes in the slice <jobs' slice>-<name>.slice, nested in the joint one, whose CPUQuota (at most the machine’s cores) and MemoryMax (infinity when left out), with MemorySwapMax=0 beside a MemoryMax so swap does not stretch it (infinity without one), are set before each launch, so all jobs of one ticket share them; a name that is not letters and digits refuses the spawn before anything exists: jobs.limits: feature.name must be letters and digits, got <name>. The record’s cost starts at 0.0000 at the spawn. Without such a plugin the joint slice is a job’s only limit; two that provide it refuse the spawn before anything exists: call("jobs.limits"): provided by 2 plugins; call needs exactly one.
- In the job’s scope, on this host or another machine:
CPUQuotaofcpucores, at most that machine’s cores (cpu: 64on an 8-core machine is800%), so a job over it is slowed, not stopped; andMemoryMaxofmemorywithMemorySwapMax=0, so the cap is not stretched by swap. When the job goes over it, the kernel kills one of its processes, as a rule the largest of the agent and what it started: the wrapper starts the agent withoom_score_adj1000, which they all inherit, and keeps its own, so a second kill before the first one’s memory is freed takes the agent, never the wrapper. From systemd 253 on the scope getsOOMPolicy=continue, so that kill does not stop the scope with the wrapper in it (an older systemd takes noOOMPolicyon a scope, and stops none). The wrapper reads the scope’smemory.eventsevery second: once it counts anoom, it stops the job withlimit: memory: the job went over its memory cap of <memory>, a kill that ended the agent itself included. The other jobs run on. - Over its ticket’s
feature.memory, theMemoryMaxof the ticket’s slice, the kernel kills a process of one of the ticket’s jobs, the largest as above; a job with that cap getsOOMPolicy=continuetoo, its ownmemoryor none. The wrapper also reads the slice’smemory.events.localevery second: once it counts anoomand the scope’smemory.eventsanoom_kill, a process of this job killed, it stops the job withlimit: memory: the jobs of ticket <name> went over their memory cap of <memory>. The ticket’s other jobs, none of whose processes was killed, run on. Without a scope this cap is not held. - At a cap above the job, the
MemoryMaxof the joint slice that all jobs share (core.jobs.memory) or the machine’s own memory, the kernel kills a process of whichever job it picks, one with caps or without. The wrapper of every job in a scope reads its scope’smemory.eventsevery second: once it counts anoom_killthat neither its own cap nor its ticket’s counts as theirs, it stops the job withlimit: memory: the kernel killed a process of the job, out of memory at a cap above the job: the one all jobs share, or the machine's. The other jobs, none of whose processes was killed, run on. Without a scope such a kill is not seen: the agent, when it was the one killed, endsfailed: the agent was killed by SIGKILL. - After an out-of-memory kill in a scope without
OOMPolicy=continue(from systemd 253 on: a job with no memory cap of its own or of its ticket), systemd stops the scope, SIGTERM to each of its processes, the wrapper among them. The wrapper readsmemory.eventsat each SIGTERM and takes one that comes once its scope counts a kill as systemd’s, not asarthur stop(seearthur stop --help): the job endslimit: memory: ...as above, neverstopped. - After any out-of-memory kill in its scope, at whichever cap, the wrapper writes the kernel’s two lines about each killed process to the log before the end, as
journalctl -kgives them, asked up to 20 times, 100 ms apart, as journald may write them late:the kernel: oom-kill:constraint=...,oom_memcg=<the cgroup whose cap was reached>,task_memcg=<the job's scope>,task=<name>,pid=<pid>,uid=<uid>(global_oomin place ofoom_memcg=...when the machine itself ran out), which says whose cap it was, andthe kernel: Memory cgroup out of memory: Killed process <pid> (<name>) total-vm:<n>kB, anon-rss:<n>kB, file-rss:<n>kB, shmem-rss:<n>kB, ..., the process and its size. Where the kernel’s log does not name it (Arthur’s user in neither of the groupsadmandsystemd-journal, nojournalctl), the log saysthe kernel's log names no process killed in <scope>; journalctl -k: <why>,<why>journalctl’s first line on stderr, the error that did not start it, orno such line. - Without a user manager (macOS, a container), where the job runs bare: the wrapper sums the resident memory (
psrss) of every process below it every 10 seconds, and stops the job withlimit: memoryat the first sample over the cap, a percentage being of the machine’s memory; CPU is not capped. The caps of a ticket’s slice (feature) are not held there at all. The first job with caps, its own or its ticket’s, that runs bare on a machine emits anotice, once per machine (<home>/uncappedlists the machines told):machine <name> runs jobs without a systemd scope (<why>): a job's memory cap there is held by sampling its processes every 10 s, its CPU is not capped, and a ticket's CPU and memory caps, shared by all its jobs, are not held.
The sandbox
Section titled “The sandbox”The agent runs in a sandbox, set up again for every run of the job, so the bound holds for what the worktree guard cannot read (node -e, python3 -c, a path built at run time): python3 -I sets a Landlock ruleset (Linux 5.13 on), a seccomp filter and no_new_privs, then starts the agent, and the agent and every process it starts write only beneath:
- its worktree and its record;
- the Git folders a commit on its branch writes: the worktree’s own (
.git/worktrees/<id>) and the repository’sobjects,refsandlogs, never itsconfigorhooks; found from the main checkout, never from the worktree’s.gitfile or itscommondir, which the job writes; - the temporary folder (
$TMPDIR, else/tmp) and/dev(/dev/null, a terminal); ~/.omp, omp’s own state (its sessions and logins), which omp writes on every run;- for each extension a plugin registered,
<home>/<its package's folder>/<id>, made before the agent starts, where the extension records what the agent did (<home>/delivery/<id>/checks).
The job’s project, main checkout and worktree, from which the sandbox is built (what it writes, and below what it hides), are not read from the record, which the job writes: the wrapper gets them on its command line (node wrapper.ts <home> <id> <agent> <project> <root> <worktree>), from the spawn, or from arthur continue, which refuses a record whose place is not the one its spawn made (arthur continue --help; AR0597). Nor are the places outside every checkout that the sandbox hides and the worktree guard refuses: each start of the wrapper (a spawn, arthur continue, and on another machine arthur remote-job launch or continue there) makes them anew and hands them to the wrapper, and through it to the agent and its worktree guard, in the variable ARTHUR_GUARDED, so a job that empties or rewrites a file of its record (a guarded file left by an older Arthur included) unhides nothing on its next run (AR0512). It is a line <key> <path> each: config, the folder of arthur.config.ts, and env, the file core.envFile names, both left out on another machine, which has no config; install, Arthur’s install, the folder that holds the core’s package; ssh, systemd, gitconfig and gitxdg, the user’s ~/.ssh, ~/.config/systemd, ~/.gitconfig and ~/.config/git/, with a second systemd and gitxdg line, $XDG_CONFIG_HOME/systemd and $XDG_CONFIG_HOME/git/, which systemd’s user manager and Git read instead, when Arthur runs with XDG_CONFIG_HOME set elsewhere.
Everything else can be read and not written: the home folder, the main checkout and the checkouts of other projects but those hidden below, Arthur’s install, arthur.config.ts’s folder, ~/.gitconfig (git config --global is refused) and ~/.config/systemd. A write there fails as a file the user may not write fails, Permission denied. The env file (core.envFile, the env line of ARTHUR_GUARDED) and ~/.ssh (Arthur’s user’s, in the home folder of the user account, where OpenSSH finds it, and in $HOME too when Arthur runs with it set elsewhere; whatever the record says, since the agent writes the record), whose keys would reach another machine outside its sandbox and origin past arthur merge, cannot even be read: a job needs no SSH key, Arthur pushes and fetches for it outside the sandbox. Nor can Git’s and gh’s stored credentials, which would push to origin over HTTPS past arthur merge: Git’s store helper’s ~/.git-credentials and ~/.config/git/credentials ($XDG_CONFIG_HOME/git/credentials too where it is set) and gh’s folder ~/.config/gh ($XDG_CONFIG_HOME/gh and $GH_CONFIG_DIR too where they are set), of the user account’s home and $HOME’s, whether they exist or not; a credential kept elsewhere, such as a key an IdentityFile names outside ~/.ssh, stays readable. Each folder from / to each grants reads on every entry but the next one, so a read of it, by its path or through a link, gives Permission denied, a hard link to it is refused, and a file made there later stays hidden; the cost is that a file made during the run directly in a folder above it (~, ~/.config, ~/.config/git) cannot be read either. So inside a job the arthur CLI reads no env file, and a plugin whose variable is not in the job’s shell is not loaded there (arthur config --help). No process in the sandbox can read the environment or memory of a process outside it, arthur run’s, the wrapper’s, the coordinator’s or another job’s (/proc/<pid>/environ and mem give Permission denied), so a secret Arthur holds in its own environment stays out of the job; /proc/<pid>/cmdline stays readable, and no process of Arthur’s carries a secret in its command line. No process in the sandbox can make a Unix stream or seqpacket socket, so it reaches neither the user manager’s bus (systemd-run --user, systemctl --user), a tmux server, an ssh or gpg agent nor any other local daemon that would run a command outside it; a Unix datagram socket it can make, which omp’s session lock binds; TCP and UDP connect as before. The log says which, at the start of each run: sandbox: the agent writes only in <paths>, reads every file but <env file>, <user's home>/.ssh, <the credential stores above>, <other projects' paths>, and opens no Unix socket but a datagram one, without <env file>, for a job on another machine, whose launch names no env file, and without <other projects' paths>, where none is hidden.
A job of one project cannot read another project’s files either. The lists the projects plugin keeps in the home, which no job writes, name each project’s checkout (<home>/projects/checkouts) and folder (<home>/projects/folders, its projects/<name>/); read once at the start of each run, before its install, they make the sandbox hide each other project’s checkout and folder, and every project’s .arthur-worktrees whole but the job’s own worktree, which it shows: other jobs’ worktrees, of its own project too. A worktree made there after that start cannot be read either, one made while its install runs included. It never hides a path that is or holds the job’s main checkout, Git folders, Arthur’s install or the folder of arthur.config.ts, nor, but .arthur-worktrees and the home (below), one that is or holds its worktree or record: Arthur’s own checkout, which holds the install, stays readable to every job. Without those lists (no projects plugin, a job on another machine) no other project is hidden. Inside a job the arthur CLI loads only the job’s own project, the one its record names (arthur projects --help).
Nor does a job read Arthur’s home folder beyond its own project’s records. Read at the same start of each run, the home is hidden whole: the event log (events.jsonl), which mixes every project’s events and the owner’s messages, the coordinator’s files, every plugin’s folder and the records; shown in it are the job’s own record, each other record whose project names the job’s project, the projects plugin’s folder <home>/projects with all it holds (AR0760): its checkouts and folders, which its worktree guard reads, prefixes, every project’s <name> <prefix>, so a check in the job knows other projects’ ticket ids while each other project’s folder and project.config.ts stay hidden, and how many questions each onboarding sent (onboarding/<id>/); shown as a folder, so a list the plugin renames over the old one while the job runs, as a project added or removed does, reads anew, the job’s own folder of each extension a plugin registered, which that extension writes and reads back in the agent (delivery’s <home>/delivery/<id>/, the job’s recorded checks, which its run’s end compares with the tip: AR0687), and, when the docker plugin’s prepare made it, the job’s own docker script folder docker/jobs/<id>, which the job’s shell runs first on its PATH (AR-D597). A record or another entry made in the home after the run started cannot be read either, so a job spawned later stays hidden whatever its project. Inside a job arthur jobs lists those records alone, and a plugin’s setup and its commands there read nothing of its folder: github’s poll state reads as none. On another machine the home there is hidden the same way. A home that is or holds the job’s worktree, main checkout, Git folders, Arthur’s install or the folder of arthur.config.ts is not hidden, as those are not.
Git signs none of a job’s commits and tags: the agent, the install and each check of arthur merge on main run with commit.gpgSign and tag.gpgSign false, given by GIT_CONFIG_COUNT, GIT_CONFIG_KEY_<n> and GIT_CONFIG_VALUE_<n> after the entries Arthur’s own environment gives Git, which stay; where the sandbox cannot be set up as well. So a commit there succeeds where your Git config signs with a key in ~/.ssh, which the sandbox closes, and carries no signature (git log --format=%G? shows N). The merge commit arthur merge makes, outside any sandbox, is signed as your Git config says.
Nor does a job’s Git read a replacement (refs/replace), which any program of a job may write into the repository every worktree shares: the agent and the install run with GIT_NO_REPLACE_OBJECTS=1, so their git log and git diff, a reviewer’s included, show the commits as they are, whatever core.useReplaceRefs the job’s config sets.
The install a prepare asks for (ARTHUR_INSTALL, above) runs in the same sandbox before the agent, set up for it alone, with caches of its own in the record’s cache folder: npm_config_cache (cache/npm), BUN_INSTALL_CACHE_DIR (cache/bun), XDG_CACHE_HOME (cache, where pnpm and uv keep theirs), PNPM_HOME (cache/pnpm-home, pnpm’s store) and COMPOSER_CACHE_DIR (cache/composer), so it writes none of the shared caches (~/.npm, ~/.bun/install/cache, ~/.cache, ~/.local/share/pnpm, ~/.composer/cache), where branch code would leave what a later process outside any sandbox runs, such as an npx package in ~/.npm/_npx. Each job starts with a cold cache, which goes with its record. The log says so before it starts: sandbox: the install writes only in <paths>, reads every file but <env file>, <user's home>/.ssh, <the other paths hidden above>, and opens no Unix socket but a datagram one, a path shown beneath them written (shown: <path>), or, with core.jobs.unsandboxed on (below), no sandbox: <why>; the install writes wherever Arthur's user can, with its caches in the record all the same. arthur merge runs each check on main in a sandbox of its own the same way, with a cache of that merge (arthur merge --help, “Checks on main”).
The agent’s npm uses the same cache, the record’s cache/npm (npm_config_cache, set over the one Arthur’s environment gives), sandbox or not: an npm ci it runs itself writes there, warm with what the install fetched, and never in the shared ~/.npm, which the sandbox lets it read and not write.
Where the sandbox cannot be set up, a job does not start: before its install or its agent starts, it ends failed: no sandbox: <why>; set core.jobs.unsandboxed: true in arthur.config.ts to run the agent with the writes of Arthur's user (the install while the install a prepare asked for is next), its worktree kept, <why> being <platform> has no Landlock (macOS), python3: spawnSync python3 ENOENT, or the sandbox’s own refusal, such as Landlock: Operation not supported for a kernel built without it; arthur doctor says so beforehand (core sandbox, arthur doctor --help). With core.jobs.unsandboxed: true (default false; the test kit’s runner sets it, so a test on such a host runs as before) the install and the agent run without it, with the writes of Arthur’s user, and the log says why: no sandbox: <why>; the agent writes wherever Arthur's user can; there a job reads the environment of every process of Arthur’s user, arthur run’s and the coordinator’s included, so a secret belongs in the env file, never exported in the shell Arthur starts from. The spawn writes the option into the record’s unsandboxed, a job’s on another machine included, whose own Arthur needs no config; a record without it, an older Arthur’s, needs the sandbox. An agent the sandbox’s shell does not find (the agent <agent> is not there) starts bare, the option on or not, and then fails to start as below (the agent did not start: ...).
Limits: reads are not confined but the env file’s, ~/.ssh’s, Git’s and gh‘s stored credentials, other projects’ and the home’s (a job still reads arthur.config.ts); a job may move any branch’s ref of its repository, as Git writes every branch under refs; a check of the project that needs a Unix socket (a tmux server, a database’s local socket, Docker) fails inside a job, and in the checks arthur merge runs, which run sandboxed as well; a commit signed through an ssh or gpg agent fails inside a job (a signing key Git reads from its file works, but not one in ~/.ssh); the agent’s network is open: the keys in ~/.ssh are hidden from a job, but a password or another stored credential it can read still reaches the user’s own SSH login (ssh localhost), and a job that logs in so is outside the sandbox; the datagram socket omp’s lock needs can also send to any datagram socket the user may write, as seccomp does not see where a datagram goes, so a job may write lines into the user’s journal (journald’s /run/systemd/journal/socket, dev-log, which /dev/log names, and syslog), each stamped with its run’s scope (arthur-job-<id>.scope or a continued run’s), and nothing beyond: systemd’s notify sockets refuse a scope, and the only abstract socket names are omp’s own locks.
–budget 0
Section titled “–budget 0”--budget 0 is no limit. On a paid model (one models.pick does not answer free), arthur spawn hands the beforeSpawn checks decision, the id --decision <id> names, "" without it; the orchestration plugin then refuses the spawn unless that id is the owner’s own budget decision for the task’s ticket (for a task naming none, one of no ticket and no job), not answered by policy and not used by an earlier merge or spawn (arthur decision --help, “What only the owner’s decision lets through”). Without it the refusal names the ask: arthur decision ask --kind budget --question '<what he decides>' --ticket <id>. A free model’s budget is 0 anyway and needs none; a plugin’s own spawn (host.jobs.spawn) names none and is not checked. --decision without --budget 0 is wrong usage.
arthur steer
Section titled “arthur steer”Usage: arthur steer <id> <text>; on a channel /steer <id> <text>, the text being the rest of the message.
Gives a job in a run (working, idle, or held blocked by a plugin; see arthur jobs --help) one correction, the text as one quoted argument, which its agent gets after its next tool call, while the run goes on. The job is named by its full id or its short id (the 8 hex digits that end it, as arthur jobs shows it). Prints, or on a channel answers, <id>: steer <number> queued for after its next tool call, the full id.
Once the steer is queued, arthur steer and /steer emit the core’s event job-steered with the job’s id, its kind, the text and via: "steer"; a refused steer emits none. A plugin’s host.jobs.steer emits none.
How it reaches the agent: the steer is written whole into the record as <home>/jobs/<id>/steer/inbox/<number>, numbered on from 0001 over every steer the job had. The wrapper loads the steer extension into every job’s agent (-e steer.ts, with ARTHUR_JOB naming the record); after each tool call it hands the agent every steer waiting in inbox/, oldest first, each as a user message delivered as a steer, moves it to steer/done/, and adds steered <number>: <first line> to the job’s log. Two steers sent before the next tool call both arrive after it, in the order they were sent.
A steer still in inbox/ when the job ends (the agent made no tool call after it) is moved to steer/undelivered/, the log saying undelivered steer <number>: <first line>, and job-ended names it: its data has undelivered, the numbers, when there is one. A later arthur continue does not deliver it; give the correction as the instruction instead.
A job on another machine (its record’s machine; see arthur spawn --help) is steered there: over SSH, arthur remote-job steer queues the text, given on its stdin, in the record there, and its agent there gets it as above.
Refused (exit code 1, the reason after arthur steer: ):
- An id with no record in
<home>/jobs/:<id>: no such job in <home>/jobs. - A short id that matches two jobs:
<id> matches 2 jobs: <id>, <id>; name one by its full id. - A job not in a run:
<id> is <state> (<reason>), not in a run; a steer reaches only a job in a run, and arthur continue resumes an ended or blocked worker. - A job that ended while the steer was written:
<id>: the job ended before its next tool call; steer <number> was not delivered; arthur continue <id> with it. The steer is insteer/undelivered/. - An empty argument, the id or the text (
""): wrong usage, the usage line and exit code 2, before anything is steered. A text of only spaces:the text is empty. - On another machine, each refusal above comes from there, after
machine <name>: arthur remote-job steer:. A machine that does not answer:machine <name>: ssh <ssh>: <ssh's last line>. A machine no plugin registers now:<id> runs on machine <name>, which no plugin registers; machines: <names>. - A config or a plugin that does not load:
arthur.config.ts did not load:, then the reasons.
On a channel a refusal is the reply /steer failed: <reason>.
Wrong usage (not one id and one text, a flag) prints the usage line and exits 2; on a channel, a message without an id and a text gets usage: /steer <id> <text>.
arthur stop
Section titled “arthur stop”Usage: arthur stop <id>
Stops a job in a run (working, idle, or held blocked by a plugin; see arthur jobs --help), named by its full id (2026-10-16-worker-b046ca2a) or its short id (b046ca2a, as arthur jobs shows it), and prints <id>: stopped, the full id, once its run is over. It sends SIGTERM to the job’s wrapper, whose pid the record holds; the wrapper runs the stop, the same one a job at its time or budget limit gets:
- SIGTERM to the agent’s process group: the agent and every process it started (a bash call’s
npm test, a server). - When any of them is still alive after a grace of 5 seconds, SIGKILL to the group. The log says
the agent's process group is still alive 5 seconds after SIGTERM: SIGKILL. - SIGKILL to each process below the agent that had left its group (a daemon that called
setsid), as seen before each signal. The log saysSIGKILL to <pid>, which had left the agent's process group: <command>for each. - SIGKILL to every other process left in the job’s systemd scope, which also takes one that left before it could be seen (a job that runs bare has no scope).
Then the wrapper writes the end as usual (see arthur spawn --help), state last: ended, reason stopped, the log saying arthur stop: stopping the agent first (stopping the install while the install a prepare asked for runs); then job-ended. A job stopped this way is not resumed at its budget. When a limit stopped the job first, its reason stays that limit and arthur stop prints <id>: ended (<reason>) before the stop; so it does, with the state and reason the run ended in, when the agent ended on its own as the stop came (the log says arthur stop: the agent had ended already).
A SIGTERM is arthur stop’s unless the job’s scope counts an out-of-memory kill by then (oom_kill in its memory.events): systemd stops a scope with SIGTERM after such a kill, so the wrapper takes that one as systemd’s, and the job ends limit: memory: ..., its log naming the killed process and its size (see arthur spawn --help, “Caps per job”), never stopped. The log then has no arthur stop line, and an arthur stop of that job prints <id>: ended (limit: memory: ...) before the stop.
A job blocked on the user whose run is over (its final message’s Blocked: user <question>, or a plugin’s block that stopped its run; see arthur jobs --help), whose question no longer applies, is ended at once, there being no run to stop: ended, reason stopped, the log saying arthur stop: ended while blocked (user: <question>); then job-ended, and arthur stop prints <id>: stopped. arthur prune then frees it like any ended job. A job on another machine is ended here alike, without SSH: its state here is the one that counts once its run there is over, and arthur prune removes its worktree and record there.
A job in a run on another machine (its record’s machine; see arthur spawn --help) is stopped there: over SSH, arthur remote-job stop runs the same stop on the record there and its line is printed; then the end is copied here at once, with its job-ended and its branch fetched into the main checkout. arthur stopall stops such a job the same way.
Refused (exit code 1, the reason after arthur stop: ):
- An id with no record in
<home>/jobs/:<id>: no such job in <home>/jobs. - A short id that matches two jobs:
<id> matches 2 jobs: <id>, <id>; name one by its full id. - A job not in a run, other than one blocked on the user:
<id> is <state> (<reason>), not in a run; nothing to stop, for exampleended (finished)orblocked (dependency: <ticket or job>). - A job blocked on the user while an
arthur continueof it holds its record (seearthur continue --help):<id>: being continued. Nothing is written; once its new run started,arthur stopstops that run. - A job in a run whose wrapper is gone, or whose pid another process took since:
<id>: its wrapper <pid> is gone though its state says <state>; nothing to stop. No signal is sent. - A wrapper that has not written the end 15 seconds after SIGTERM:
<id>: its wrapper <pid> did not end the job within 15 seconds of SIGTERM. - On another machine, each refusal above comes from there, after
machine <name>: arthur remote-job stop:. A machine that does not answer:machine <name>: ssh <ssh>: <ssh's last line>, the job heldblockedmeanwhile (seearthur jobs --help). A machine no plugin registers now:<id> runs on machine <name>, which no plugin registers; machines: <names>. - A config or a plugin that does not load: the record’s home folder is the config’s, so
arthur.config.ts did not load:, then the reasons.
Wrong usage (no id, more than one, a flag, an empty id "") prints the usage line and exits 2.
arthur stopall
Section titled “arthur stopall”Usage: arthur stopall; on a channel /stopall.
Stops every job in a run (working, idle, or held blocked by a plugin) of every project at once, without the model: first it emits stop-all, with ids, those jobs’ ids, so a plugin cancels what it would start next (delivery’s hand-back after a review); then it runs arthur stop on each, all together, a job on another machine there (see arthur stop --help), and answers one line per job, as arthur stop prints it: <id>: stopped, or the reason that job was not stopped (<id>: its wrapper <pid> is gone though its state says working; nothing to stop, or machine <name>: ssh <ssh>: <ssh's last line> for a machine that does not answer). A job held blocked because its machine does not answer is not in a run and is not asked. With nothing running it answers no running jobs, and stop-all is emitted all the same.
Refused: a config or a plugin that does not load (arthur.config.ts did not load:, then the reasons), exit code 1; on a channel the reply is /stopall failed: <reason>. Any argument in the shell prints the usage line and exits 2.
arthur ticket
Section titled “arthur ticket”Usage: arthur ticket new <title>, arthur ticket status <id> <status>, arthur ticket status <id> planned --decision <id>, arthur ticket status <id> planned --autopilot [--budget <usd>], arthur ticket after <id> [<id>...], arthur ticket file [<id>] <job>; --project <name> for another project than the main one. The whole board is arthur board all (see arthur board --help).
The ticket board of a project: each ticket is a folder spec/features/<id>-<slug>/ in the project’s repository, and the board is spec/build.json there, a JSON array with one entry per ticket (id, title, status, path of its ticket.md, updated, and after when it waits for other tickets). The board is changed only through this command and, for plugins, host.board; every change emits an event.
new <title>: creates a ticket inplanningand prints its id and the path of itsticket.md, written from the core’s template (packages/core/templates/ticket.md) with the id, the title and today’s date intimeZone. The words afterneware the title. Emitsticket-created(id,project,title,status,path).status <id> <status>: moves the ticket to another status, if the table below allows it, and prints its id and status. The id’s prefix names the project, so--projectis not needed. Emitsticket-moved(id,project,from,to); a move to the status the ticket has already changes nothing and emits nothing. A move toplannedneeds--decisionor--autopilot(below).status <id> planned --decision <id>: sets the ticketplannedon the owner’s recorded decision (AR0665), the<id>thatarthur decision ask --kind plan --ticket <id> --option '<the approval>'printed, his answer recorded witharthur decision answer <id> --picked 1from his message naming the id (arthur decision --help). Before the move, the core asks the plugin that providesdecision.owner, the orchestration plugin, with{ id, what: "arthur ticket status <id> planned", kind: "plan", ticket: <id>, use: "planned <id>" }; it lets the move go on only for a plan question of that ticket that the owner answered himself, in his own message, picking option 1, its approval (AR0677: a “not yet” or an answer with no option picked is refused), used by no other step, and the same move tried again (after the board refused it) passes it again, so a ticket moved back toplanningis setplannedagain on the same decision (arthur decision --help, “What only the owner’s decision lets through”). Its refusal is the message, exit code 1, the ticket left as it was; without--decisionit names the ask to make:arthur ticket status <id> planned needs the owner's decision: arthur decision ask --kind plan --question '<what he decides>' --option '<the approval>' --ticket <id>, his answer recorded with arthur decision answer <its id> --picked 1, then arthur ticket status <id> planned --decision <its id>. Without a plugin that providesdecision.owner, every such move is refused:plugin core: call("decision.owner"): no plugin provides it.status <id> planned --autopilot [--budget <usd>]: sets the ticketplannedpre-approved by policy instead of the owner’s word. The core hands the id and the budget (--budget, a plain decimal of 0 or more) to the plugin that providesticket.autopilot, the orchestration plugin, which checks its rules, records the pre-approval in the ticket’s Decisions and moves it; the command prints the plugin’s line,<id> planned: Pre-approved by policy: ..., and a refusal is the plugin’s message, exit code 1. The rules:arthur coordinator --help, “Autopilot”.after <id> [<id>...]: the tickets this one waits for, until each is merged; they replace the ones it waited for before, and no ids means it waits for none. Prints<id> after <ids>, or<id> after nothing. An id named twice counts once. Emitsticket-after(id,project,after) when the list changes.file <id> <job>: files the final message of a job that finished on ticket<id>in the ticket’s folder, and prints the path written, from the project’s folder.file <job>, with no ticket, files a job whose task names no ticket, such as an audit, where its kind keeps it. The job is its full id or the endarthur jobsshows. How it is filed is up to the plugin that registered the job’s kind, through the kind’sfile(host.jobs.registerKind); a plugin files one itself withhost.jobs.file(id, job),idundefined for no ticket. The orchestration plugin’splanbecomesplan.mdand itsplan-reviewthe nextplan-review-N.md(seearthur plan --help); the manage plugin’sauditbecomesspec/quality/<date>.md(docs/manage.md in its package). It changes no status and commits nothing. Refused, before anything is written: a ticket not on the board (<id> is not on the board); no job or several matching<job>; a job of a kind no plugin files (<job> is a worker job, and no plugin files that kind); a job still in a run (<job> is in a run (working); file it once it has ended); a job that did not endfinished, so a stopped, limited, failed or blocked one, whose result is unfinished (<job> ended ended (limit: budget: ...), not finished: its result is unfinished and is never filed; prune it); a job whose task names noTicket:file in that ticket’s folder, or is of another project (<job>'s task names <ids> of project <project>, not <id>); with no ticket, a job whose task names one (<job>'s task names <ids>; file it in its ticket: arthur ticket file <id> <job>); and whatever the kind’sfilerefuses.
The statuses and the moves allowed from each:
| From | To |
|---|---|
planning |
planned, dropped |
planned |
planning, in-progress, dropped |
in-progress |
planning, review, done, merged, dropped |
review |
in-progress, done, merged, dropped |
done |
in-progress, review, merged, dropped |
merged |
none: final |
dropped |
none: final |
planned is the owner’s approval, so work starts only from it: his recorded decision (--decision), or a pre-approval by policy (--autopilot). Statuses follow the jobs: a worker’s start (job-started), at a spawn or a continue, moves each ticket its task names in a Ticket: line to in-progress (see arthur spawn --help and arthur continue --help).
Ids are the project’s prefix and a number of at least 4 digits, from 1 (AR0001), one above the highest number the board or a ticket folder of that prefix has, so a dropped ticket’s id is never given again. The folder’s slug is the title in lowercase letters and digits joined by dashes, cut at a dash to at most 80 characters.
The projects, each with its folder and prefix, are the list the projects plugin provides; the main project is the first one. One writer at a time: each change holds spec/.board/build.json.lock for the moment it reads and writes the board, so two writers at once never lose a change; a lock whose process is gone is taken over. The board and a new ticket.md are written to a temporary file in spec/.board/ and renamed, so a reader never sees half of either. spec/.board/ holds a .gitignore of *, written back on each change when it differs, so a writer killed mid-write leaves nothing Git shows or commits.
The board as text, for /board (the orchestration plugin’s, see arthur board --help) and for plugins as host.board.full() and its digest host.board.digest(): one line per ticket (id, status, Kind, title, and after <ids> while any ticket it waits for is not merged), the open tickets first in the order of the statuses above, then the merged ones newest first, then the dropped ones. The Kind is the one word of the - Kind: line under the ticket’s ## Goal, - when it has none, the line holds more than one word, or its ticket.md cannot be read. The digest keeps every open ticket and the 10 newest merged, and counts the rest in its last line: + <n> older merged, <m> dropped: the full board is /board all. host.board.full(project, kind) lists only the tickets of that Kind, of every status, in the same order, no ticket of kind <kind> when there is none; a kind not in host.board.kinds is refused: unknown kind <kind>; kinds: <the template's>.
The template’s Kind line lists the kinds a ticket may have: feat, fix, security, perf, refactor, test, docs, build, ci, chore, ux, Conventional Commits types and two of Arthur’s own, security and ux.
Refused, one line each, with exit code 1:
- A move the table does not allow:
<id>: <from> cannot move to <to>; from <from>: <allowed>, so a merged or dropped ticket never moves again. plannedwhile the ticket’sticket.mdstill holds a guidance comment (<!-- ... -->) of the template; the message lists each one left.plannedwhile the- Kind:line under the ticket’s## Goalnames none of the template’s kinds:<id>: not planned: <path> names Kind "<kind>", none of the template's: feat, fix, security, perf, refactor, test, docs, build, ci, chore, ux. A ticket without the line is not refused.- A
ticket.mdthat cannot be read when the ticket is moved toplanned. - An
afterthat names a ticket not on the same board, a dropped one, or leads back to the ticket through the afters on the board (a cycle, named as its chain, for exampleDM0001 cannot wait for itself: DM0001 after DM0002 after DM0001). - An unknown status; an id that is not on its project’s board, or whose prefix no project has.
- A title that is empty, has spaces around it, spans lines, or has no letter a-z or digit.
- A board file broken by hand (not JSON, not an array, an entry without a valid
id,title,status,pathorupdated, anafterthat is not a list of ids, an id twice): the message names the file and the first problem, and the file is left as it is. A validpathis the onearthur ticket newwrites,spec/features/<its own id>-<slug>/ticket.mdwith a slug ofa-z,0-9and-, so a filing, written beside it, never leaves the project: any other is refused as[<n>].path: expected spec/features/<id>-<slug>/ticket.md, a slug of a-z, 0-9 and -, got "<path>". A missing board file is an empty board. - No project list (no plugin provides
projects), a list provided twice, an empty one, a project without a name, an absolute folder or a prefix of capital letters, two projects with one name or one prefix, and an unknown--project. - A config that does not load: the board needs the plugins’ project list.
Exit code: 0 when done, 1 when refused, 2 on wrong usage: an empty word ("") after any verb, as arthur ticket new "", arthur ticket status <id> "" or arthur ticket after "" <id>, is wrong usage, before the board is read; so is file with other than one or two words after it; so is a status with other than one id and one status, or a flag other than --decision (a --budget without --autopilot included), and a --decision with a status other than planned, without a value or given twice; and so are --autopilot with a status other than planned or more than one id, or with --decision, and its --budget without a value, not a number of 0 or more, or given twice, each with its problem before the usage line (arthur ticket: --autopilot sets one ticket planned, arthur ticket: --decision sets one ticket planned).
arthur update
Section titled “arthur update”Usage: arthur update [<tag or commit>]
Moves Arthur’s own checkout to a release and installs it: the Git checkout that holds the core (packages/core), found as the session plugin’s restart guard finds it, whatever folder the command runs in. It needs no config, and is refused inside a job (arthur help --help).
git fetch --tags originthere.- The target: the tag or commit given, else the newest release tag, the first of
git tag --list 'v*' --sort=-v:refname. - When the checkout is at that commit already:
up to date: <version>, and nothing else is done. - Otherwise
git checkoutof that commit, detached, thennpm ci, andupdated <old> to <new>, each version asarthur versionprints it (<release> <hash>).
Then the line of who restarts arthur run on the new code, which it loaded at its start: with the session plugin and its restart guard on, under its service, arthur run restarts on it once no job and no merge runs (the session plugin's restart guard), as packages/session/docs/session.md, “The restart guard”, says (an arthur run started by hand is restarted by hand); without them, or when arthur.config.ts does not load, restart arthur run on it once no job runs: systemctl --user restart arthur.
A checkout on a branch, such as a development checkout of main, is updated with git pull and npm ci (docs/deploy.md, “Updating”); arthur update <tag or commit> still moves it, detached, to the commit given. arthur machines update runs arthur update <commit> on each machine of the machines plugin, the commit this checkout is at (arthur machines --help).
Refused, exit code 1, nothing changed:
- The core outside a Git checkout:
<core folder> is not in a Git checkout (<git's line>); install Arthur from a clone, as docs/setup.md, step 4, says. - Changed tracked files, each named:
<checkout> has changed tracked files: <path>, <path>; commit, stash or undo them first. - With no argument, a checkout on a branch:
<branch> is a development checkout; update it with git pull. - A fetch that fails:
git fetch in <checkout>: <git's line>, orexit code <n>when git said nothing. - No release tag:
<checkout> has no release tag v* after git fetch --tags origin; a target that is no tag or commit there:<target> is no tag or commit of <checkout> after git fetch --tags origin. - A
git checkoutthat fails (an untracked file it would overwrite):git checkout in <checkout>: <git's line>.
When npm ci fails at the target, its errors printed, the checkout goes back to where it was, the branch it was on included, and runs npm ci there again: npm ci failed at <target> (exit code <n>); back at <old>, npm ci ran again there, or, when that fails too, ...; back at <old>, npm ci failed there too (exit code <n>): run npm ci in <checkout> by hand. Exit code 1.
Wrong usage, more than one argument or one that starts with -: usage: arthur update [<tag or commit>], exit code 2.
arthur version
Section titled “arthur version”Usage: arthur version
Prints the version of Arthur, <release> <hash>, such as 0.1.0 8b0c9ebef9ca. It needs no config.
<release>is theversionof the core’spackage.json. One release is the version of the core and every first-party plugin, in everypackage.jsonand the lockfile, all set at once bynpm version <version> --workspaces --include-workspace-root --no-git-tag-version. It follows semver; on 0.x the minor goes up for a breaking change (the host API, an option removed or renamed, a file format that needs a manual step), the patch for anything else. Only a release ticket, merged througharthur merge, changes it: apackage.jsonchanged by hand on main counts as code there, and refuses the next merge (arthur merge --help).<hash>is the first 12 hex digits of a SHA-256 over the names and contents of the core’s source files (packages/core/src/), so two checkouts of one commit print the same and any change to the core prints another.
A release is a ticket, Release <version>, kind chore, whose worker runs only that npm version command, merged through arthur merge like any ticket. Its merge writes the release’s section, ## <version> (<date>), in CHANGELOG.md (arthur changelog --help, “Releases”), and its push to main changes package.json, which runs .github/workflows/release.yml: when origin has no tag v<version> yet, it runs npm ci, npm run check and npm test, then gh release create v<version> --target <the pushed commit> with that section as the notes, with the workflow’s own GITHUB_TOKEN (contents: write), so there is no secret to keep. A version whose tag exists, a step that fails, or a CHANGELOG.md without the section makes no release (test/release.ts). Nothing is published on npm.
A spawn on another machine runs arthur version there first, and so does the machines plugin’s check; each compares the hash alone, the last word, so two releases of one core agree. A line of a hash alone, as Arthur printed before its releases, or another hash, is refused before any record exists, naming both whole lines: machine <name> runs arthur <theirs>, this one is <ours>; both need the same version (see arthur spawn --help).