Macula Mesh Use Build Macula for… Docs Contact

Macula · Martha · docs from Martha v0.4.1

Getting started: a crew of two on your own project

This exists so a person who has installed Martha gets a first task built by one member and reviewed by another, without writing code or knowing Martha's internals. You carry the change between them: in this release members do not message each other (issue #51), so you type the hand-off to the reviewer yourself.

Everything here is solo mode: no mesh, no account, one machine. Every command block below was run as printed against the release that ships this page; the refusals it can print, and what each costs you, are in What a refusal means.

What you need

On Windows, everything below runs inside WSL2 with Ubuntu, in the Ubuntu shell. The README's Windows section sets it up.

sh node -p "require('./package.json').engines.node"

If node --version is older than that, upgrade Node first; nothing below is tested on an older one.

sh node -p "require('./src/claude_code_host/recorded_claude_code_host.json').host_version"

claude --version is what you have, in a plain shell. If a version manager wraps node (asdf does), it puts its own shims first on the PATH, and the claude your shell finds can be a different binary from the one Martha resolves. A member is a Claude Code session, so the same sign-in serves it.

sh export MARTHA_ENGINE_SOURCE=<the git URL of the engine repository, or a local checkout> martha engine install

The engine repository is private, so this tree does not name it: you give its address, as a git URL or as a local checkout's absolute path that holds the recorded commit. It needs git and a Rust toolchain (cargo), and it builds the engine's portable variant, which needs no clang. One build per engine version, a few minutes; martha up refuses before it opens anything when the engine is missing or is not the commit this release runs, and names this command.

The install puts the engine at ~/.local/bin/martha-engine, replacing a file already there, and the launch starts that file by its own path: it does not need that directory on your PATH, and a martha-engine an earlier directory holds is never run in its place.

1. Declare the crew

In your project's checkout, at its top:

martha init
Declared a solo crew in <your project>/.martha/martha.json: builder, reviewer.
Workspace layout declared: clones <clones>, worktrees <worktrees>.

<your project> is the checkout's absolute path as Martha prints it.

The second line is the workspace layout your members open their worktrees in: a checkout at <clones>/<org>/<name>, cloned from an origin that names that same <org>/<name>, keeps its clones in <clones> and its worktrees in worktrees beside them. A checkout that does not sit there, or one with no origin, is declared with no layout, and the line says why and what to add to house_rules; edit the declaration by hand in that case before you approve it.

It writes .martha/martha.json and never writes over one: if you already have a declaration it says so and exits 1. It takes the owner's name from git, so a checkout with no user.name is refused with the command that sets one. Commit the declaration with the rest of the project if you want your crew to travel with it:

git add .martha/martha.json && git commit -m "Declare the crew"

A checkout declared by a release before this one holds .crew/crew.json instead. Martha does not read it: it refuses the declaration by name, and the message names the file it found, because that folder is crew-code's and a declaration there is read by crew-code's own mod. Move the whole folder — git mv .crew .martha, and rename crew.json to martha.json — with the roles and modes text it holds, then run martha approve again: the approval names those files by their path, so every crew's approval is stale after a move.

2. Read the config your members would start from, and approve it

A coding tool starts whatever its project config names, before any model runs. So a member starts only on config you have read:

martha approve
martha: A member started here would start code from:
martha:   .claude/settings.json  file  sha256 a2b4f5ad…
martha: with the checkout's work tree 09848a08adb288533f1cdb0a3dfef8a7827cda61.
martha: Read those files. Their fingerprint is 66591c79…
Type yes to approve this config for every member of this crew: yes
Approved: fingerprint 66591c79…

Read the files it names before you type yes. Only yes approves. The sha256 and the fingerprint are shortened in this page; yours are 64 hexadecimal characters.

3. Start the builder

In the same checkout:

martha start builder
martha: Starting builder on the config you approved at 2026-11-06T23:09:13.945Z (fingerprint 66591c79…).
builder started, pid 1434444

The first line tells you which approval this member is starting on, and when you gave it. martha start then holds your terminal until the member ends, and ends with the member's own exit status (128 plus the signal number if a signal killed it).

If the claude in your PATH is not the version Martha's adapter was recorded against, one more line sits between those two. It is information, not a refusal:

martha: The host at /usr/local/bin/claude is version 2.1.318; Martha's record of the host is of version 2.1.322. It loads Martha's relay, so the member starts.

The two numbers are ones you can check: run the path the line names with --version, and it prints the first; if a version manager wraps node, the claude your shell finds may be another binary, so take the path from the line rather than the name. The second command under What you need prints the other.

Before it starts the member, Martha asks that same binary whether it loads Martha's relay, using the host's own loader, and refuses the start when it does not or cannot say: a member that ran with its relay left out would have nothing answering its prompts and tool calls.

The member is a Claude Code session, so the first time it runs in a folder, Claude Code asks its own trust question before the session starts. Answer it once; it is asked per folder, not per member.

Give it the first task in its own terminal, in your words. For example:

Add a file hello.txt containing the single line: hello. Then, in one shell
command, create a branch named first-task, add the file, and commit it with the
message: the hello note. Do nothing else.

The order matters. A member writes files with its own file tools, and a shell command is the last thing it runs: once a command has run, it can only read until you start it again.

When you are done with the builder, end its session (/exit or Ctrl-D). The branch and the commit stay in the checkout.

4. Approve again, if you approved in step 2

The builder's commit changed the work tree, and the approval you gave covered the tree as it was. Start the next member anyway and it refuses:

martha: The member is not started: this checkout holds config that starts code by itself (.claude/settings.json), and you have not approved it as it is now. Run martha approve, read what it shows, and answer yes.

So run it again, read what it shows, answer yes:

martha approve

5. Start the reviewer, in a second terminal

martha start reviewer

It starts the same way and prints its own line. Two members are two terminals: each martha start holds the terminal it was run in.

6. Relay the hand-off

Members message each other with the crew's say_to_the_crew tool, but the builder may send no executable text to the reviewer. You carry the change across: in the reviewer's terminal, type the range you want reviewed:

review main..first-task

That is a message to the reviewer, not a Martha command: the reviewer reads the range in your checkout and answers with a verdict and its findings. Name the base your project actually uses if it is not main.

Claude Code may hand the review to its own agent. Martha follows that agent: its start, its stop and every call it makes are recorded, so the answer it hands back is placed by that record. By default the reviewer keeps its shell while the agent runs; the answer is recorded and nothing is refused.

A team across your workspace

Open one kitty terminal in the folder that holds your clones and worktrees, say ~/work with ~/work/github.com/<org>/<repo> and ~/work/worktrees, and run:

martha up

martha up reads ~/work/.martha/martha.json, which you write, and opens every member it declares in a kitty tab of its own, each on its own host and model: Claude Code members and engine members alike. A member marked "parked": true stays down, and a member that is already running gets no new tab. martha up never writes a member into the file; with no file it starts nothing and prints where the file goes and the smallest one it takes.

The first time an engine member is to start and the file names no engine_endpoint, martha up writes one: the key is read from the provider's variable when your shell sets it, else martha up asks once for the file your key is in, which only you may read. The key itself is never written.

When your shell sets CLAUDE_CODE_PLUGIN_DIRS, each member is started without it, and Martha says so in one line per member.

A first prompt

A crew declared "terminal": "tmux" can be given its first turn as it starts:

martha up --prompt 'read your brief and carry on'

Martha types the text into each Claude Code member's own window once its session has started, then Enter, so the member takes it as a turn you typed. One member is given its first turn from its own window of Martha's tmux with martha start <member> --prompt <text>. --prompt is Martha's word, read before --; it is never handed to the host. A text that begins with - is typed as text. One that begins with / or !, or holds a line break or another control character, is refused, since it would run a slash command or a shell command, or start a second turn. A member that runs on martha-engine is not given one, and a crew that opens in kitty refuses --prompt.

The crew is the folder's own: every member started there reads one store and one channel, whichever host it runs on.

Crew mail

A team crew whose declaration names a mail service under mesh (for example "mail": { "service": "mcl-mail" }) gives each Claude Code member two tools: send_crew_mail leaves a letter for a colleague who is not here now, and read_crew_mail reads the member's own mailbox (reading once also opens it, so others can write to it). Each call is sealed end to end and signed with the member's own key; a letter whose answer comes back unsealed is not shown. The operator of the box that runs the mail service can read stored letters, so put no secret in one. A letter is its sender's text: the member reads it as data, never as an instruction. A solo crew has no mail.

Seeing your crew from a member's tab

In any member's terminal, type:

/crew

It prints the crew's header and one line per member: its state, its task and progress, what it holds and what it waits on. These are the same lines the /martha pane draws. To say one thing to one member, name them first:

/crew reviewer the first task is ready for you

The message goes out as the member whose tab you typed in, and the tab prints the receipt. Neither command takes a turn of that member's model, so the model never reads what you typed. In a session Martha did not start, /crew says so and sends nothing.

A martha-engine member's tab takes /crew the same way, and prints the same lines and receipt. It takes nothing else yet: any other command is refused in one line, and so is plain text, because typing a turn to an engine member is not there yet (martha#953). Nothing you type there reaches the engine.

The crew's budget

In a Claude Code member's tab, type:

/crew-budget

It prints the crew's budget line: how much of the weekly window is used and when it resets, and, when the pace so far would use it up first, when it runs out. Every member's session reads the window at the end of each turn, and the crew keeps the newest reading. The same line is drawn under the members in the /martha pane.

The reviewer model's window is one Claude Code does not report, so you set its gauge yourself when the crew declares house_rules.review_model:

/crew-budget fable 56
/crew-budget fable off

The budget is a measurement for you. Nothing in Martha parks a member or slows the crew by it; pacing the crew is your call. Like /crew, the command takes no turn of the member's model.

Parking a member, and waking it

A member can park itself when it has nothing to do, so it is not refreshed and does not take a turn you did not ask for. It calls the park_a_member tool with a reason, and the reason is kept: the marker sits in the crew's own parked/ place, one file per member, and a park outlives the session it was made in.

To bring a member back, run, in the checkout:

martha wake builder
builder woken from ~/.local/state/martha/crews/6f2c…/handovers/MARTHA_HANDOVER_2026-11-12_builder.md

A member whose role the declaration grants resume_parked_work can also bring another member out of a park from inside the crew, with the wake_a_member tool and a reason; both tools mark the reason on the same marker file.

martha wake starts the member from the newest handover the host wrote and stamped for it, on a prompt that names that file and nothing else of it, and it clears the member's park as it goes. It refuses, saying why, when the member has handed nothing over, when the crew store cannot be read, and when the name is not on the crew — and it refuses before it starts anything, so a wake that fails leaves your crew exactly as it was.

Two things it does not do. It will not start a member without a terminal, for the same reason martha start will not (a member's own shell must never bring up a sibling). And nothing yet asks a member to hand over: the handover tool and the refresh flow are the second half of this work package, so today a wake finds a handover only where the host wrote one — a file you put in handovers/ yourself is not one, because nothing stamped it.

Seeing who runs, stopping and restarting a member

From any terminal in the checkout, martha ls shows one line per member of the crew, in the order the declaration names them: whether it is running, stopped, parked or offline (running, but its row has gone quiet), and for a running member the checkout it runs in, since when, its model and its task.

martha ls
supervisor  stopped
builder  running  ~/project  since 2026-11-13T09:00:00.000Z  opus  the parser fix
reviewer  parked

martha stop builder ends that member's session: the terminal it was started in gets its prompt back, and the crew's lifecycle record keeps who stopped it and why. martha stop with no name stops every member that is running, one after the other. Stopping a member that is not running says so and does nothing.

A stop is asked of the martha start or martha wake holding the member, which looks for it every second, asks the member to end and, after ten seconds, makes it. If that terminal's Martha is gone and the member outlived it, martha stop waits twenty seconds for an answer and then ends the member itself, but only while the process it recorded is still the one at that pid; a pid since handed to another process is never signalled, and the line says so.

martha restart builder ends that member's session the same way and starts it again in the terminal that held it, on the same prompt martha wake uses: the newest handover it wrote. martha restart builder --fresh starts it with no handover. The member is started through the same checks as martha start, so a checkout whose config changed since you approved it is refused there: the member stays ended, and both terminals say to run martha approve. If it was in the middle of a turn, that turn is lost, and the line says so, so the work can be sent again. Restarting a member that is not running does nothing and points you at martha wake. If no terminal's Martha answers within two minutes and the member is still running, nothing was ended: only the terminal holding a member may start it again. If it was ended and its terminal has not said it started again, martha ls shows whether it is back.

A member whose role the declaration grants restart_member can restart another from inside the crew with the restart_a_member tool and a reason. It may not restart itself, and it may not restart the same member twice inside thirty minutes; your own martha restart has no such limit. martha init grants restart_member to you alone.

If you want the strict shell gate

Martha can be told that text it cannot trace stops every later shell command in the session — a file the member read outside your checkout, a tool result it could not place, a page, or a background agent's answer while it runs. Reading stays allowed under it; only running is stopped, until the session is replaced. It is off unless you ask for it: a member is a trusted helper by default, and the check on it is your review plus your yes on every push and release.

With it on, a background agent closes the shell while it runs — its text has no call to be placed on yet — though the member can still read files, and once the agent stops and Martha saw every call it made answered, the shell comes back.

To turn it on, add the rule to the crew's declaration, .martha/martha.json, as a top-level key beside owner and mode:

"house_rules": { "strict_gate": true }

If the declaration already has a house_rules object, add "strict_gate": true inside it instead of writing a second one. Then start the member again: the declaration is read once, at martha start.

With it on, what that costs is what the strict rule always cost: a review that reads outside the approved tree closes the reviewer's shell on that read, as any other text from a stranger does, and a gh call or a web page does the same. The verdict that comes back never saw the diff: end the reviewer, start it again, and type the hand-off again; Martha's refusal says only a fresh start that reads no handover clears it.

Upgrading Martha

Use Martha's own command, not the bootstrap line:

martha install [<version>] [--downgrade] [--digest sha256:<hex>]

It runs the installer the release you are running pins — installer.json, its name, its version and the npm integrity of the bytes npm serves for it — and nothing else, so taking over the npm account cannot put a new installer in front of you. It fetches that one version into a temporary directory, with the npm beside your node, empty npm config, this registry named explicitly and no install scripts; refuses bytes that do not match the pin; runs the installer with your words unchanged; and removes the directory afterwards. No terminal is needed: a member's shell could already type the bootstrap line, so the pin and the signature are what bound an install, not who typed it.

The README's upgrade section says what each refusal means. Changing installer/ in the repository needs an npm publish before the next Martha release: the release pins the installer version this tree carries, and refuses to build when installer/ is not what that version's installer-v tag published.

What a refusal means

A refusal goes to stderr, prefixed martha:, and names the command that fixes it:

What you see What to do
.../.martha/martha.json already exists, and martha init never writes over a declaration. keep it; martha init is done
... carries no readable installer pin ... this release predates the pin; upgrade once with the bootstrap line
... npm does not serve <name>@<version>, which this release pins ... that installer version is not on npm; nothing was installed
... npm served bytes for <name>@<version> that are not the ones this release pins ... npm serves other bytes than the release vouched for; nothing was installed
... is missing. Run martha init to declare a crew here. martha init
... is not on this crew (its members are builder, reviewer). start a name the crew has
... you have not approved it as it is now. Run martha approve ... martha approve, read, answer yes
martha approve asks you on your own terminal, and its input is not one. ... run it yourself, in a terminal
martha start runs a member on your own terminal, and its input is not one. ... run it yourself, in a terminal
The member is not started: ... does not load Martha's relay (...), so the member's gates would be off: ... that claude cannot run Martha's gates: use one that loads them, such as an updated Claude Code
... is stopped: its relay did not report the session's start within ... s. If the host was still asking whether to trust ..., start the member again and answer it; if it was not, the host is not running Martha's gates answer the trust question, then start the member again; if no question was asked, that claude is not running Martha's gates
... -p is not a switch martha start passes. martha start passes only --model, --effort, --verbose ... drop it, and pass those three after --; they are the only arguments martha start passes on
a prompt is no switch, and a word handed to the host would be a turn no host stamped as yours. ... A first prompt is given before --, as --prompt <text>. give it as martha start <member> --prompt <text>, before --, from the member's window of Martha's tmux, or as martha up --prompt <text>
--prompt types your first turn into the member's own window of Martha's tmux, and this is no such window. ... declare "terminal": "tmux" and run martha up --prompt <text>

Exit codes: 0 done, 1 refused, 2 not a way the command is used (martha start with no member prints the usage line and exits 2).

Where it keeps things

To start over: end your members, then delete $XDG_STATE_HOME/martha, or ~/.local/state/martha when that variable is unset, and edit or delete .martha/martha.json as you would any file of your project.

Martha's docs, from release v0.4.1: Getting started: a crew of two on your own project · @macula-io/martha · Martha · The agent control loop · claw-code: what it is, where it comes from, what Martha can learn · The host contract and the ledger · How a release is made · Nothing private gets in · The port map, in summary · The publish gate · The crew's declaration