Repository navigation
v0.5.5
Superseded. The 0.5.5 command-line output is not ready for people to use. Use 0.5.6 when it is released; do not install 0.5.5.
Summary
mash 0.5.5 changes how every agent is named, and it does not work with anything made by 0.5.0. Read Upgrading before you
install it. An agent's address is now three parts, owner, group and instance (for example alice.dev.design), and every
agent must name its group. Credentials files, directory records, inboxes and addresses from 0.5.0 are not read or converted,
and mail still unread in old inboxes when you switch is not carried over. Start with a fresh deployment. If you have never
used mash, this is the release to start with: the quick start below takes you from nothing to two Claude Code sessions
that mail each other. Every download has a build attestation; verify it.
mash 0.5.5 also requires TLS on every connection, loopback included. Every mash and mashctl connection now needs a tls:// (or wss://) URL, and a plain nats:// URL is refused unless you set insecure_plaintext (MASH_INSECURE_PLAINTEXT=1). A 0.5.x deployment that connects in plain text sees that refusal on its first connection after the upgrade. mashctl init --local makes its own certificates, so the quick start below needs no override.
0.5.0 remains the version running deployments should keep using until they are moved. 0.5.5 reads no 0.5.0 state, so do not install it
over a running endpoint, including by go install ...@latest.
Why a hard cut
0.5.0 had two address forms: agents made with mashctl add carried a fixed cc token and had no group, and their
credentials were made on the machine that runs mashctl, so a private key had to be copied by hand to any other machine.
Keeping both forms working would have meant carrying the old one around indefinitely, for no one's benefit, so 0.5.5 has
one form and nothing else. That also means the old way of doing things is gone rather than deprecated.
Upgrading
If you have never used mash: nothing to move. Follow the quick start.
If you used 0.5.0: the order matters, and none of this is automatic.
- Start a new deployment. Run
mashctl init --localfor a local server, or set up a new account on your own servers.
Leave the old one untouched for as long as you want a way back to 0.5.0. - Choose a name for every agent in three parts. Write each as
owner/group/instance, for examplealice/dev/design.
Each part is lower-case letters, digits and hyphens, starts with a letter, is at most 32 characters, with no--and no
trailing hyphen. There is no default group: a command or session without one is refused, and nothing guesses it. A group
cannot be changed later. To move an agent to another group, create a new one and delete the old one. - Create each agent again with the quick start below. Old credentials files, directory records and inboxes are not
read. - Read mail you still need first. Mail unread in an old inbox when you switch is not carried over.
- Update scripts and settings.
mashctl add, the oldreissueandretireare gone and print a message that names
the replacement (mashctl endpoint create,endpoint reissue,endpoint delete).unzoneis gone too and is now an
unknown command (exit 2).agent_tokenandMASH_AGENT_TOKENare
gone. Start each session withMASH_GROUP(andMASH_OWNERandMASH_NAMEif they are not in your config). - Check where mash looks for its config. If
XDG_CONFIG_HOMEis set, mash now reads$XDG_CONFIG_HOME/mashonly; it no
longer falls back to~/.config/mash. To keep using that directory, setMASH_CONFIG_DIR=$HOME/.config/mash(an
absolute path), or move the files. (Checked against the code on main:MASH_CONFIG_DIR, then an absolute
XDG_CONFIG_HOME/mash, then~/.config/mash; a relativeXDG_CONFIG_HOMEis ignored.) - Update anything that reads mash output. The audit report (
mashctl audit --json) is version 2 with new field names,
and--comparerefuses a version 1 file.mash who --jsonnow reportsnameas the flat keyowner_group_instance
and addsidentity(owner.group.instance),owner,group,instanceandagent. Spool folders and the owner shown
in hook and spool messages use the new address. (Checked against the code on main:auditrecords carryaddress,owner,group,instance;who --jsoncarriesidentity,owner,group,instance,agent.) - Use TLS on every connection, or set the override knowingly. A plain
nats://URL (or one with no scheme, orws://)
is refused, to any host and loopback included, with a message that names the setting and the fix, unless
insecure_plaintext(MASH_INSECURE_PLAINTEXT=1) is set; with it set, mash connects and prints a warning on standard error
(andmash statusshows it). Do not set it on a network you do not control: plain text lets anyone on the network read
mail and obtain signatures. mashctl init --localnow makes a local certificate authority and certificates, and runs its server with TLS only; the
configuration it writes has thetls://URL andtls_ca, so nothing else is needed. If you run your own server, give it
TLS and settls_ca(orMASH_TLS_CA) to the PEM file of the authority that signed its certificate, or set the override.- Remove
insecure_loopbackandrequire_tlsfrom your settings.insecure_loopback(MASH_INSECURE_LOOPBACK) and
require_tls(MASH_REQUIRE_TLS) are gone and are not read:insecure_plaintextreplaces both
(ADR 0146,
which replaces the default and the loopback allowance of ADR 0108).
Moving your existing agents is a one-time job. mash does not do it: it is done outside mash, once, by whoever runs the
deployment, onto a fresh deployment, with a written map from each old name to its owner, group and instance.
Quick start: your first agent
On one machine, with mash, mashctl and nats-server installed:
mashctl init --local --owner alice --start
mash key create --out design.seed
mashctl endpoint create alice/dev/design --public-key design.pub
mash credential create --seed design.seed --jwt alice.dev.design.jwt
Install the plugin, then start the Claude Code session with MASH_OWNER=alice MASH_GROUP=dev MASH_NAME=design. Repeat for a
second agent (review) and the two sessions can mail each other.
Why it works this way: each agent makes its own key on its own machine (mash key create), and only the public key goes to
mashctl. mashctl endpoint create signs it and writes a JWT file; mash credential create joins the seed and the JWT into
the credentials file, on the agent's machine. The private key is never on the mashctl machine and no secret travels. An
agent on another machine uses the same four steps; only the public key file and the JWT file move. If an agent runs on the
same machine as mashctl, --make-key makes the key there and writes the credentials file, and is only for that case.
mashctl endpoint reissue gives an agent a new key and revokes the old one, and mashctl endpoint delete removes it. Either
way the session using the old key is disconnected and cannot reconnect. endpoint list and endpoint show change nothing.
A deleted address is burned: it cannot be created again. An agent's credentials reach only the agents of its own owner.
One departure from the Synadia Agent Protocol
The first subject slot now carries the owner, not the name of the harness. The protocol says that slot SHOULD name the
harness; mash does not follow it. Finding mash agents with a wildcard on the harness slot therefore does not work. Finding
them by the service name does, and the service metadata still says claude-code and adds owner, group and instance.
Security
This release closes replies across owners: an endpoint of another owner can no longer answer, forge or replay a reply into your
endpoints. Inside one owner, endpoints can still answer each other's reply subjects; that is the endpoint model's "wide open under
the owner" until the policy release. An endpoint's reply inbox now lives under its owner (_INBOX.<owner>.<flat key>), and it can
publish replies only to its own owner's inboxes. A credential made before this release is refused by this release's mash: reissue
it (the hard cut already means starting fresh).
What was tested, and what was not
- Tested on one machine, with one local server, from a fresh home, over TLS with no override: the quick start's steps, mail
both ways, reissue and delete, and every refusal listed here. What the test did, exactly: it builtmashandmashctlfrom
the commit and ran the steps of the quick start with those binaries; it ran each session through the plugin's own launcher
(plugin/scripts/mash serve) and delivered mail through the plugin's hook commands, with the test itself playing the roles
of Claude Code's MCP client and hook caller. No Claude Code session ran, and the install steps of the README (a downloaded
binary,go install) were not part of it: the maintainer's own walk through the README, from a clean home to two mailing Claude Code
sessions (JRN-001), is done after the release; AT-001, the automated run, stands in for it until then. Run records are in the repository (docs/evidence/2026-11-17-0-5-5-live-runs/):
the quick start's steps, mail, the permission set and its isolation, revocation and every refusal passed. All of them ran on the code commite26332c(AT-001 to AT-003 and AT-005 by the core worker; AT-004, the command contract, by the CLI team), and the records name it. - Across separate nodes: three NATS servers in one cluster over TLS, in three isolated containers the test builds and destroys
itself on one developer machine, with agents on nodes other than the server they connect to. Reissue and delete were checked
against every server, and a plainnats://URL is refused unless the override is set. This was a run by hand on one machine, not on three real hosts, and it passed one26332c. - mash writes no server configuration beyond what
mashctl init --localmakes; TLS and a cluster are set up by the operator, asdocs/tls-and-clusters.mddescribes, and the test builds the same configuration by hand. - Two
mashctlmachines share key material copied by hand (the three-server procedure in the operations guide); the run
above used two. A machine with its own signing key is not supported. - Load: the directory-polling and heartbeat-fan-out measurements of 2026-11-02 (
docs/evidence/2026-11-02-directory-polling/
anddocs/evidence/2026-11-02-heartbeat-fanout/) were made before the three-part address and before owner-scoped reply
subjects. No fresh measurement was made for 0.5.5; read those numbers as of 2026-11-02. - Not tested, and not offered: upgrading in place, moving old agents, carrying mail across, changing a group, and clock differences between machines beyond the few seconds the operations guide states (a unit test covers two
admins whose clocks differ by up to 45 seconds: the second create is refused, never both succeed).
Known issues
mashctl endpoint reissue --changedselects endpoints by the permission set in their local credentials file and by staged or
revoked keys; it does not check that a local credentials file belongs to the endpoint's current key. After a reissue on another
machine it can report nothing to reissue while the local file still holds the revoked old key. Workaround:
reissue ADDRESS --make-keyfor that endpoint (#764). The fix is planned for 0.5.6.- A same-host
endpoint createthat is killed part way leaves an unused entry in the issue record; nothing can connect with it
(#765). A create with the endpoint's own key (the default) is finished by running it again. endpoint createprints no line saying the servers took an account update (#766); it makes none (nothing is revoked), and
reissueanddeletedo print how many servers acknowledged the revocation.endpoint reissuelocks on one host only (#767). A reissue takes a file lock (<creds file>.lock) that the operating
system drops when the run ends or is killed, so a killed run needs nothing removed. The lock works on one machine and a
local filesystem. It does not coordinate two machines, and it does nothing on a network filesystem that ignores file locks,
so do not runendpoint reissue,createordeletefor one endpoint from two machines at once. A lock directory left by an
earlier mash is reported by the refusal and removed once by hand. Owner: the mashctl commands.- The advisory macOS test job fails in the Linux-only podman test harness's unit tests; follow-up #774.
- The test
TestCrowdedBacklogOnAFullStreamWakesAtOnceAfterADrainfailed twice in CI before the release; the cause was in the
test, not in mash, and it is fixed (#745).
Also in this release, not part of the 0.5.5 contract
These changes rode along with the release. They are deliberate and small, and none is a requirement of the endpoint model:
- A flag that takes a value now refuses a value that starts with
-unless it is written--flag=VALUE(a bare-is still a value). - The operations guide now states, and tests pin, that
mash serveexits when its standard input closes and never renews its lease after that (within 5 seconds). mashctl initandadoptask the server whether JetStream is enabled and say what to do when it is not.mash statussays the last wake started a turn only after a wake was actually sent.
Details
Added
- Make and manage endpoints with
mashctl endpoint.mashctl endpoint create alice/dev/design --public-key design.pubsigns a key the endpoint made itself and writes its JWT to a file (--make-keymakes the key on the mashctl host instead and writes the creds file).endpoint reissue,endpoint delete,endpoint listandendpoint showcomplete the set; each takes--json, andcreateanddeletetake--dry-run. There is no default group: write--group devor the three-part address. - Make a key and a credentials file with
mash.mash key create --out FILEwrites a new user seed and its public key, andmash credential create --seed FILE --jwt FILEjoins a seed and the user JWT issued for it into a credentials file. Neither needs a server, a config file or an account key.credential createchecks that the JWT names the seed's key; it does not check the issuing account or the expiry. mash serveexiting on stdin EOF is now a documented guarantee, pinned by tests: it releases the endpoint lease and exits within 5 s, an EOF during the first open is acted on once that open returns, and a superseded serve never renews its lease.
Changed
- Every agent now has a three-part address, owner.group.instance, and 0.5.5 does not work with anything made by 0.5.0. Every agent names its group (there is no default and it cannot be changed later), every credentials file is replaced, old records, addresses and credentials are not read or converted, mail unread in old inboxes is not carried over,
mashctl add, the oldreissue,unzone,agent_tokenandMASH_AGENT_TOKENare gone, the audit report is version 2, and the first subject slot carries the owner, not the harness. Make agents withmashctl endpoint create, from a key each agent makes withmash key create; start from a fresh deployment. mashctl add,mashctl reissueandmashctl retireare removed. Usemashctl endpoint create,mashctl endpoint reissueandmashctl endpoint delete. Endpoints made by 0.5.0 do not work with 0.5.5: make new ones and delete the old ones.mashctl init --localnow makes a server that speaks TLS only. It creates a local certificate authority and a server certificate forlocalhost,127.0.0.1and::1(ten years, keys mode 0600, in the server directory), and writes thetls://URL andtls_caintoconfig.json. The quick start runs over TLS with no setting.- An endpoint's replies can now only reach reply inboxes of its own owner (
_INBOX.<owner>.>), and an endpoint listens only under its own_INBOX.<owner>.<name>prefix. An endpoint of another owner can no longer answer your discovery or presence probes, forge an answer into them, or replay a genuine one, somash whoandmash promptcannot be told that an offline endpoint is online by someone outside your owner. Nothing to do for users: new credentials carry the narrower permissions, and the nextmashctl endpoint reissueof an existing endpoint picks them up. - Every
mashandmashctlconnection now requires TLS, loopback included. A plainnats://URL (or one with no scheme, orws://) is refused before any connection is made, unlessinsecure_plaintext(MASH_INSECURE_PLAINTEXT=1) is set; with it set, mash connects, prints a warning on standard error and shows it inmash status. Use atls://URL, andtls_cafor a private certificate authority.mashctl init --localmakes its own certificate authority and runs its server with TLS only, so the quick start needs no override.insecure_loopbackandrequire_tls(MASH_INSECURE_LOOPBACK,MASH_REQUIRE_TLS) are removed and are not read (ADR 0146).
Removed
- The
~/.config/mashfallback is gone: withXDG_CONFIG_HOMEset to a directory, mash reads its config,policy.mdand default credentials only from$XDG_CONFIG_HOME/mash(or fromMASH_CONFIG_DIR). WithXDG_CONFIG_HOMEunset,~/.config/mashis still the one location. Move files from~/.config/mashif you setXDG_CONFIG_HOMEbefore. A directory record that cannot be read is skipped with a warning naming its key, in every listing, instead of failing the command. The spool no longer reads the legacy.sessionfile or thepid:Nowner text, and message numbers carry noL5form.
Fixed
- A flag that takes a value now refuses a value that starts with
-unless it is written--flag=VALUE, somashctl add n --note --helpno longer mints a note "--help". A bare-is still accepted as a value. mashctl adoptno longer says JetStream is "enabled for the account" from the account JWT alone: step 3 reports what the JWT gives, and step 6 asks the server as the account's admin user. When the server could not enable JetStream (its store budget, 75% of the free disk by default, is under the account's disk limit),adoptandmashctl initnow say so, with the two fixes, instead of printing a barejetstream not enabled(err_code 10076).mashctl endpoint reissuetakes a file lock (<creds file>.lock, flock) that the operating system drops when the run ends or is killed, so a killed run needs nothing removed and the identical command succeeds. The lock works on one machine and a local filesystem; it does not coordinate two machines or a network filesystem that ignores file locks. A lock directory left by an earlier mash is reported byreissue_busyand removed once by hand.mashctl endpoint reissue --make-keykeeps the staged key in<creds file>.pendinguntil it has read the directory record back and found the new key there. A run that stopped after the new creds file was written, or could not read the record back, is finished by running the same command again, which no longer stages another key and revokes the one the first run installed.statusno longer says "the last wake started a turn" when hooks have run but the server has never sent a channel notification.
Full changes: v0.5.0...v0.5.5