garage44.eu/jeroen/midas

logclone: git clone https://garage44.eu/jeroen/midas.git

.. /docs/hub.md

raw

Setting up the hub

The hub is one machine (Linux, systemd) on the workspace's WireGuard network. It keeps the workspace's state, answers everybody over HTTP, mirrors the git repository for the nodes (nodes never get git credentials of their own) and keeps free nodes warm. Agents usually run on the same machine.

1. Build midas

From a commit you have read, with Rust and Bun installed:

git clone <the midas repository> && cd midas
(cd web && bun install --frozen-lockfile && bun run build)   # the web page, which the binary carries
cargo build --release

Nodes on other machines take this build from the hub when it runs there too (midas node update), so when their containers may have an older C library than this machine, build it static instead: rustup target add x86_64-unknown-linux-musl and cargo build --release --target x86_64-unknown-linux-musl (the binary is then under target/x86_64-unknown-linux-musl/release/).

2. Set it up

Setup installs the binary it runs from as /usr/local/bin/midas, so it is run straight from the build:

sudo target/release/midas hub setup \
    --listen 10.44.0.1:4791 \
    --forgejo ssh://git@git.example.org:2222 \
    --forgejo-api https://git.example.org/api/v1 \
    --repo owner/project \
    --agent-key "ssh-ed25519 AAAA… agents"

It ends by saying what is still missing — the deploy key to add, the callers and agent keys to make, the first node to add — so the rest of this guide can be read as needed.

optionwhat
--listenthis machine's WireGuard address, and a port for the hub
--forgejo, --forgejo-apithe git server the hub mirrors from (Forgejo or Gitea)
--repothe repository nodes check out (repeat for more)
--agent-keythe public ssh key agents log into nodes with (repeat for more)

It creates the user midas (home /srv/midas), installs itself as /usr/local/bin/midas, installs and starts the services midas-hub and midas-warm.timer, and makes two keys. It prints one of them:

The hub's machine must accept ssh key logins for the user midas on its WireGuard address: nodes fetch git that way.

3. Give the agents access

Agents need two things: a way to log into nodes (the ssh key from step 2) and permission to change the workspace — take and release nodes, add nodes. The second is a caller key:

sudo midas hub caller add agents                       # or, with a git token:
echo "$TOKEN" | sudo midas hub caller add agents --forgejo-token -

It prints two lines. Put them in ~/.config/midas/hub.env where the agents work, with two more:

MIDAS_HUB=http://10.44.0.1:4791
MIDAS_HUB_KEY=…                       # from caller add
MIDAS_SSH_KEY=~/.ssh/id_ed25519       # the private half of --agent-key
MIDAS_REPO=owner/project              # the repository their git tools default to

The Forgejo token, if given, is what the agents' git-server calls through the hub are made with, so its permissions are theirs. caller list and caller remove <name> manage the rest.

Root on the hub's machine, only while you allow it

When the agents run on the hub's machine and sometimes need root there (restart a service, install a package), give them a user of their own that is root only in a window you grant with a passkey (DESIGN.md decision 30):

sudo midas hub admin-setup --user agent --rp-id garage44.eu   # the page's host

It creates the user (in systemd-journal and adm, to read logs) if it is missing and writes /etc/midas/admin.json. Put the agents' ssh key in ~agent/.ssh/authorized_keys and take it out of any account that has sudo or is in the docker group, which is root as well. Then, on the page, Settings ▸ Admin ▸ Make a passkey on this device (on your phone, on the page's own host), and run the command it shows from your own login: sudo midas hub admin-enroll 'midas-admin-key-v1 …'. Until a passkey is installed, no window can open.

A session then asks midas admin "restart caddy" --for 30m. Your phone shows it under Needs you; Allow with passkey signs who, how long and why, and root (midas-admin.service) opens the window only for that signature: sudo works for the agents' user until the time is up (60 minutes at most, --max-minutes), the session says midas admin --done, or it ends. The session hears each step as a note. Closing kills what still runs as root from the user's logins; what root started through systemd stays. Every grant and its signature is in /var/log/midas-admin/grants.log. Classic sudo also records what was typed under it in /var/log/midas-admin/io (sudoreplay -d /var/log/midas-admin/io -l); sudo-rs, Ubuntu's sudo since 25.10, cannot, and logs only each command it runs (journalctl _COMM=sudo), so what is typed in a root shell (sudo -i) goes unrecorded. sudo midas hub admin-enroll --remove <id> takes a passkey away.

4. Say what "warm" means

The hub keeps free nodes built at the tip of a branch, so taking one costs only the agent's own changes. What to build is the project's business: add a warm section to /etc/midas/hub.conf:

"warm": {
  "branch": "main",
  "steps": ["cargo check --workspace --all-targets", "cargo test --workspace --no-run"],
  "optional": ["cargo check --target wasm32-unknown-unknown"],
  "machines": {
    "mini": { "steps": ["cargo check --target aarch64-apple-ios"] }
  }
}

steps run in order and stop at the first failure; optional steps may fail (a node without that toolchain); machines gives the nodes on one machine their own steps. The hub reads the file afresh each time: no restart needed.

5. Say what can be deployed

midas deploy <target> builds a commit that has landed on a node and publishes it on this machine, without a CI system in between (usage.md). What each target is lives here, in the deploy section of its project's entry under projects (below) — the one place that says where anything is published and what runs as whom, and only root can change it:

"projects": {
  "owner/project": {
    "gate": "…",
    "deploy": {
      "sim": {
        "machine": "vps",
        "steps": ["cargo build --locked -p server --release"],
        "publish": [{"from": "target/release/server", "to": "/data/app/server"}],
        "check_user": "appuser",
        "checks": ["\"$STAGED/target/release/server\" --self-test"],
        "restart_stamp": "/data/app/restart.stamp"
      }
    }
  }
}

Every project deploys the same way: a target is built from its project's main, in that project's checkout on the node (the node's own for the first repository, /work/repos/<owner>/<name> for any other), and a landing waits on its own project's deploys only. Target names are the workspace's — midas deploy <target> takes a name alone — so two projects cannot share one. A top-level deploy section, from before projects had their own, is still read as the first repository's.

field
machinewhich nodes may build it, as for midas take: one whose binaries run here
stepsrun in the node's checkout of the commit, in order
publishfrom a path in the checkout, to an absolute path here: a file replaces to atomically, a directory is synchronised into it; one may lie inside another
preparerun here first, as prepare_user (default nobody), with $STAGED theirs to change: what only this machine may do, such as signing with a key that must never reach a node. The result is checked again for links
checksrun here before anything is replaced, as check_user (default nobody), with $STAGED the artifacts and $SHA the commit; one failing stops the deploy with the old one serving
restart_stampwritten last; a .path unit on it restarts the service
after_landingtrue: the hub deploys it itself after landings, in batches (usage.md); otherwise only when somebody asks
pathswhat it is built from, as git pathspecs (crates/atlas/web, :!docs): after landings, a tip that changes none of them since what the target serves is not built again, and counts as live (deploy_skipped in the log). Never exclude what a build embeds (a crate's include_str! of a .md). Unset: every landing builds it
optionalafter landings it is built only when a landing picks it (land --targets +name, proposed by midas land targets), or once no session is at work and nobody lands; until then the page shows it as later, and a landing that did not pick it is live without it. For a target most landings need not see live at once (the web client)
required_bygit pathspecs it must stay in step with (crates/core, the wire protocol a client shares with its server): a landing that changes any of them builds it whatever it picked
announce_sit restarts what the sessions at work use (midas itself): after landings it is announced to every session active in the last half hour this many seconds before it goes, without waking an idle one, and any of them may put it off (midas deploy --defer <target> --minutes N --why …, at most 30 minutes at a time and an hour in all). A person's own midas deploy goes at once
orderwhere it goes among the targets one node builds for one commit: lower first, ties in the order they were asked for. Put what people wait to see first (the web page before an APK that is installed by hand). Unset: 0
watchwhat the hub watches of it once it serves, sampled every minute and shown under Workspace ▸ Services beside its deploys (watch.rs): unit, the systemd unit that serves it (active or not, memory, CPU, restarts, from systemctl show); probes, addresses that must answer below 400, asked with curl from this machine; memory_mb and restarts_per_h, above which it is shown in trouble. Kept two weeks under watch/; a change of state is logged (watch_changed). Unset: not watched

A binary for this machine must be linked for its C library, not the node's: a node image (Arch) is usually ahead of a hub's distribution, and a binary linked there asks for symbols this machine lacks — a check that runs it catches that, and cargo zigbuild --target x86_64-unknown-linux-gnu.<version> (the node image carries zig) avoids it.

Setup installs the two services it needs: midas-deploy builds as the hub's user, midas-publish publishes as root. Neither runs until something is queued.

midas itself deploys the same way, as a target of its own project, with a third service: a deploy that publishes into /usr/local/lib/midas/next and writes its stamp starts midas-self-update, which waits five seconds (for the publish to tell the hub it went out) and runs midas hub self-update with the installed midas, as root. That decides, from self_update in hub.conf, what to do with the published build: "hub" (the default) runs its hub setup as it comes — it installs itself, updates the services and restarts the hub; "signed" does so only when midas.sig beside it (and midas-macos-aarch64.sig, when that is published too) is a good signature by the release key in /etc/midas/release.pub; "off" leaves it there for somebody to install by hand. A refusal is logged (self_update_refused) and shown with the deploy. The point of signed: the hub's user, which builds and publishes, is assumed compromisable, and with hub whoever is that user is root on this machine the next time midas deploys. The key is the owner's, on their own machine, never on the hub:

midas sign keygen                      # once, on your own machine: ~/.config/midas/release.key, prints the public line
sudo midas hub setup --self-update signed --release-key 'midas-release-public-v1 …'   # on the hub
midas sign build out/midas             # each release: out/midas.sig beside it, published with it

A midas-macos-aarch64 published beside it goes to the Macs' nodes. Publish it also to the copy an agent container runs ({"from": "out/midas", "to": "<that copy, as this machine sees it>"}): its sessions runner then installs the new skills and hooks and starts again on it by itself, which is the rest of what deploy.sh does by hand. The nodes take the hub's build as ever, once free:

"acme/midas": {
  "deploy": {
    "midas": {
      "machine": "vps",
      "steps": [
        "rustup target add --toolchain stable aarch64-apple-darwin",
        "cd web && bun install --frozen-lockfile && bun run build",
        "cargo zigbuild --release --quiet --target x86_64-unknown-linux-gnu.2.35",
        "CARGO_TARGET_AARCH64_APPLE_DARWIN_RUSTFLAGS=\"-C link-arg=-F$PWD/node/macos/stubs\" cargo zigbuild --release --quiet --target aarch64-apple-darwin",
        "T=${CARGO_TARGET_DIR:-target}; mkdir -p out && cp $T/x86_64-unknown-linux-gnu/release/midas out/midas && cp $T/aarch64-apple-darwin/release/midas out/midas-macos-aarch64"
      ],
      "publish": [
        {"from": "out/midas", "to": "/usr/local/lib/midas/next/midas"},
        {"from": "out/midas-macos-aarch64", "to": "/usr/local/lib/midas/next/midas-macos-aarch64"}
      ],
      "checks": ["\"$STAGED/out/midas\" --version"],
      "restart_stamp": "/usr/local/lib/midas/next/stamp",
      "after_landing": true,
      "announce_s": 300
    }
  }
}

A build that runs --version but cannot serve leaves no hub to deploy the next one: build and set it up by hand then, as below (deploy.sh from an agent container on this machine does it all).

Each project's landing

The shared finish-branch skill (skills/, installed by midas claude install) lands every project the same way; what it gates on is the project's, in a projects section keyed by repository:

"projects": {
  "owner/project": {
    "gate": "tools/verify-branch --base \"$MIDAS_BASE\"",
    "gate_nodes": "any",
    "pre_land": "bun tools/check-numbers.ts --base \"$MIDAS_BASE\"",
    "main": "main"
  }
}
field
gaterun on a build node in the checkout at the rebased head; exit 0 passes and is recorded (midas verified). $MIDAS_BASE is the commit the branch leaves main at. Unset, the skill refuses to land the project
gate_nodeswhich nodes may run it, as for midas take (default any): the one the session holds, else the free one fastest at this gate
pre_landrun in the session's worktree after the fetch and before the rebase, with $MIDAS_BASE = origin/<main>: for clashes a rebase lets through, such as two branches claiming one number
mainthe branch landed on (default main), and the one its deploys build from
deployits deploy targets, by name (section 5)

Keep the commands themselves in the project's repository and name them here, so changing a gate is a commit, not an edit of this file. A session reads its project's with midas project (--get gate); the hub reads the file afresh each time.

Projects the hub hosts

A new project needs no Forgejo and no edit of this file (git-hosting.md, step 1). midas project create <name> (MCP project_create; any caller key) makes it:

Its origin is midas@<hub>:<owner>/<name>.git, over the hub's ssh login. Nodes fetch it as they fetch a mirror. Sessions clone and push it with a key the hub knows, which is added on the hub as its user:

sudo -u midas midas hub git-key add container --role agent "$(cat ~/.ssh/id_ed25519.pub)"
sudo -u midas midas hub git-key add mini --role person "ssh-ed25519 AAAA…"
sudo -u midas midas hub git-key list

LFS objects are uploaded to the hub, which keeps them in /srv/midas/lfs. That directory is the store for a hosted repository, not a cache.

Renaming one is midas project rename <owner>/<name> <new> (MCP project_rename; any caller key, or an admin on the page's project ▸ Settings). The bare repository moves to the new name with its record and landing, and every session meta, goal and note set that names the project says the new name. The old name stays an alias in hosted.json renamed: a fetch, push or LFS request for it over ssh reaches the new repository, so checkouts need nothing, and a session's project_add of the old name gets the new one. Each runner moves its checkout (repos/<owner>/<old> → <new>, git worktree repair, origin set to the new URL) at its next poll; a session's worktree keeps its folder's name. Nodes check the new name out afresh. Public pages and HTTPS clones answer only at the new name. A name hub.conf gives (a project from its Forgejo days, or one with deploys) is refused: hub.conf is root's, so rename it there first.

Deleting one is the person's: an admin on the page (project ▸ Settings ▸ Delete, after a confirm). A caller key, midas project delete included, is refused and told to ask. The repository is moved aside to /srv/midas/state/deleted-git/<owner>/<name>-<unix time>.git, out of every list and serving, with its record in hosted.json deleted; sessions and goals stop listing it, and its old names stop leading anywhere. Its LFS objects stay in the store. To put it back, move the directory to git/<owner>/<name>.git and its record back into repos (as the hub's user); to remove it for good, rm -rf the directory.

A public project (--public; making a private one public later takes the person's admin login) is readable by anyone at /<owner>/<name>, the paths Forgejo had, so old links, Cargo.toml's git = and package.json's tarballs keep working once the host name points here:

A private project answers 404 there, as one that does not exist. Only a hosted repository's <owner>/<name> matches, so the page's own places never do. /git/<owner>/<name>, where they were first, still clones, and sends a page to its new path. A visitor who is not logged in gets the front page at /: the public projects, and a link to log in; a person logged in gets the hub's page there, as before. Caddy passes the GETs with the page; the clone's POST <name>.git/git-upload-pack and the LFS batch's POST <name>.git/info/lfs/objects/batch need routes of their own.

A project on Forgejo moves here with midas hub import (git-hosting.md, step 2), on the hub as its user:

sudo -u midas midas hub import jeroen/fien --public --description "…"
# a repository the mirror's key does not open: Forgejo's copy, staged readable
sudo -u midas midas hub import jeroen/mithril --public --from /srv/midas/import/mithril.git \
    --lfs-from /srv/midas/import/lfs

It brings every branch and tag, every LFS object they name, and the landing hub.conf has (gate, gate nodes, pre-land, main), which the hub keeps from then on; the deploy targets stay in hub.conf, since root publishes them. It leaves Forgejo's copy as it was. The move around it, in order:

  1. Close the Forgejo repository to pushes, so none lands there after the copy: a pre-receive.d/midas-moved hook that prints where it went and exits 1, beside the post-receive one (section 6).
  2. midas hub import. It names the LFS objects it could not find; a checkout of a commit that names one lacks that file.
  3. Point checkouts' origin at midas@<hub>:<owner>/<name>.git until port 2222 is the hub's (git-hosting.md, step 3), when the old URL works again.

The old address, ssh://git@code.garage44.eu:2222/<owner>/<name>.git, is the hub's once Forgejo's own ssh server is off: a second sshd on 2222 lets in only the user git, with the hub's person and agent keys, and runs each as the hub's user. It presents Forgejo's host key, so no known_hosts changes.

# /etc/midas/sshd_git.conf
Port 2222
HostKey /etc/midas/git_host_rsa          # Forgejo's data/ssh/gitea.rsa, copied
PidFile /run/midas-git-sshd.pid
AllowUsers git
UsePAM no
PasswordAuthentication no
KbdInteractiveAuthentication no
AuthorizedKeysFile none
AuthorizedKeysCommand /usr/local/libexec/midas-git-keys %u
AuthorizedKeysCommandUser midas
AcceptEnv GIT_PROTOCOL
PermitTTY no
AllowTcpForwarding no
X11Forwarding no
#!/bin/sh
# /usr/local/libexec/midas-git-keys: the hub's key lines (never a node's), run as the hub's user
[ "$1" = git ] || exit 0
exec sed -n 's|^restrict,command="\([^"]*\) hub git --key \([A-Za-z0-9_-]*\)"|restrict,command="sudo -n -u midas \1 hub git --key \2"|p' \
    /srv/midas/.ssh/authorized_keys
# /etc/sudoers.d/midas-git
Defaults:git env_keep += "SSH_ORIGINAL_COMMAND GIT_PROTOCOL"
git ALL=(midas) NOPASSWD: /usr/local/bin/midas hub git --key *

and a unit running /usr/sbin/sshd -D -f /etc/midas/sshd_git.conf (midas-git-sshd.service). The git account must not be locked (! in shadow), or sshd refuses every key without PAM. LFS goes to the hub's own address (http://10.44.0.1:4791/lfs), so pushing LFS objects this way works on the WireGuard network only.

6. Hear about pushes

The hub learns that a branch moved when it next fetches. If the git server runs on this machine, its post-receive hook can say so at once instead — hooks/git-post-receive, which posts the moved branches to /v1/pushed and always exits 0, so a hub that is down never fails a push. The hub accepts it only from its own address. For Forgejo, into the repository's own hooks (the global ones are generated and rewritten by Forgejo):

d=/var/lib/forgejo/data/forgejo-repositories/owner/project.git/hooks/post-receive.d
sudo install -d -o git -g git "$d"
sudo install -m 755 -o git -g git hooks/git-post-receive "$d/midas"

Create the directory with the hook in it and never leave it empty: Forgejo's generated post-receive globs it unquoted and prints [: too many arguments on every push when it is. Set MIDAS_HUB at the top of the copy if the hub does not listen on 10.44.0.1:4791.

7. The web page

The hub serves a page at its own address (http://10.44.0.1:4791/): the workspace as a diagram — machines, nodes, who holds what — the queues and deploys, and the history of how long sessions take to land, how long builds take and how long agents wait for a node. It reads the same open /v1/… API as everything else. To drain a node, take back a lease or deploy from it, log in with an account of role operator or more (below); on the WireGuard network a caller key pasted into the page (the foot of the nav, or the account on a phone) still works. The binary carries the page when web/dist/ was built before it (bun in web/, as above); one built without says how to build it.

The page is reachable on the WireGuard network, and wherever a reverse proxy publishes it (this workspace: garage44.eu, Caddy; midas.cartopolis.org until 2026-11-28). Through the proxy it takes a login, for reading too — the reads include every node's address and readings — and a person's login is the only thing that counts there: the hub knows a proxied request by the X-Forwarded-* headers Caddy adds, and ignores any caller key on it, so a proxy that adds one gives nobody anything. /v1/forgejo, /lfs and the node paths are refused through the proxy outright. A proxy that lists the paths it lets through (this workspace's Caddy does) must list every one the page uses: the reads (GET, /v1/hosted/* among them) and the changes (POST: /v1/hosted/*, /v1/uploads for pasted images, /v1/archive, …). One left out is a bare 404 on the page; uploads and archive were, until 2026-10-21. grep -o "'/v1/[a-z/]*" web/src -r lists them.

Paired devices (src/device.rs) come through the proxy too, and need their own lines: GET /v1/devices and /v1/devices/*, POST /v1/devices/* (the page's Settings ▸ This device ▸ Paired apps); and a phone's own paths, /v1/device/* — POST pair, GET me, GET sessions, POST push, and GET link, a WebSocket like /v1/stream. A device authenticates with its token in X-Midas-Device, because this Caddy strips Authorization; the hub takes that header on /v1/device/* and nowhere else.

A device is an app on a person's phone that dials out to the hub and serves its MCP tools over that link; the hub relays a session's calls to it (POST /v1/devices/call, a session's machine's key only). Settings ▸ This device ▸ Paired apps makes a one-time code (ten minutes, single use; the answer also carries an app link and its QR code, which the page does not show while the app cannot open one) that the app trades for its token; Forget voids it and drops the link at once. The runner names each paired device in a session's ACP mcpServers, as midas device mcp <id>, so its tools are the session's own; midas's MCP server has devices and device_call for one paired since. Each call is a line in the session's conversation, and a picture it returns is shown there. A call to a phone that is not linked, or linked but off screen ("away"), tells the person the session wants it and waits up to 90 s for it. Each one ends in a device_answer event with how long it took, its size and whether it worked. midas device list lists them; midas device fake CODE --hub URL stands in for a phone, answering echo. A message a device pushes to a session may carry files that are not pictures: the runner writes them under ~/.cache/midas/inbox/<session>/ and names them in the prompt.

Remote MCP servers (src/remote.rs) are a service's own MCP endpoint the hub signs in to for every session: cartopolis.org's /mcp, its content pages. midas remote set <name> <url>, on the hub's machine with the token on stdin, keeps it in remote-mcp.json. Midas's own MCP server offers each remote's tools beside its own, as <remote>__<tool> (mcp__midas__cartopolis-pages__put_page): what the remote last announced (GET /v1/remotes, kept ten minutes, never the token), each call forwarded by the hub with the token (POST /v1/remotes/call, a session's machine's key with steer, never a page). A session started before a remote was set sees its tools from its next start. So a session acts as the hub's account there and never holds its token; revoking the token at the service is the off switch. midas remote list shows them and their tools.

The page's places are paths (/sessions/s3, /activity/events, /setup/<token>), kept with the History API, so a link to a session opens it in the same window and an address can be shared and reloaded. The hub answers any GET outside /v1/ that names none of the page's files with the page itself; a proxy must pass those GETs too (this workspace's Caddy passes every GET outside /v1/). An old #sessions/s3 address, from a bookmark or a link sent before 2026-10-27, is rewritten to its path when the page opens.

Home, Steer, Goals, Workspace

The page is built around what the person decides, not around the machinery. It has four places, each answering one question: Home (what waits for me?), Steer (how much do I decide, and what decides for me?), Goals (what is the work for?) and Workspace (what runs it, and what happened?). Wider, they are the nav on the left, each with its icon, and the rest of the nav is the sessions' list, with All sessions for their own page; on a phone they are five tabs at its foot, Sessions second. A place with parts shows them as tabs over its page, each an address of its own. Settings, the theme and who is signed in are at the foot of the nav, and on a phone behind the account's letter at the top right (/more). Old addresses (/focus?view=week, /history, /log, /machines) still open their page.

Discuss (the microphone, where the hub has an OpenAI key) asks what to talk about, with the page's subject chosen already: a session, everything at work on Home, designing a new session with the coach on a new session's page, nothing in particular elsewhere; one more tap starts it. Designing has a page of its own (#design): the design as it is written takes the page, with Mute and End beside Edit, and the conversation the panel beside it (on a phone, the microphone opens it). "Other subject" in the panel picks another.

Notifications. A person who turns on Notify this device (Settings, under This device) is woken when something new needs them — a session's question or permission request, a decision put to them — whether the page is open or not (push.rs). It is Web Push with an empty message: the hub signs a VAPID token with a P-256 key it makes on first use (push-vapid.key in the state directory, the hub's user's only), and the browser's service worker (/sw.js) then asks the hub what waits (GET /v1/push/needs) with the person's own login, so the push service never learns what for. A proxy must pass /sw.js, /manifest.json, GET /v1/push/* and POST /v1/push/*. On an iPhone a page can be notified only once it is added to the Home Screen. A browser with no push service to reach — Firefox on an Android without Google's services, whose subscribe answers nothing — can have the hub post to an ntfy topic instead (the same card, POST /v1/push/ntfy): one per account, kept with the subscriptions; a bare name is a topic on ntfy.sh, an https address one on another server. The ntfy server reads what it is sent, so the message says only how many things wait, and opens the page.

Who is on which node, who waits for one, which sessions share files and who lands next are worked out between the sessions and midas (notes, decisions, the landing queue); the page surfaces them where a person has to act.

It is live over a WebSocket, GET /v1/stream (ws.rs): a snapshot, then patches carrying each changed card or node whole, versioned so a page that misses one asks for a snapshot again. The hub makes the board once for every viewer when its log grows, and at least every half minute. A stream takes the same login as any read through the proxy, and only this page may open one (its Origin). Caddy's reverse_proxy passes WebSockets as they are; a proxy that does not needs the Upgrade and Connection headers forwarded.

Sessions

A new session is only a message box, as in Claude's own apps: what it should do, with the model and mode last chosen in this browser under it, Enter to start; it branches off main (midas sessions start --base for another). The page's Sessions tab starts, follows and steers agent sessions — Claude Code, by default — with no claude.ai and no GitHub between: the repository is the workspace's own. A session gets a folder of its own (session-<id>) and works in as many projects as its task needs: its agent adds each with the project_add tool (midas sessions add-project <name>), a worktree at ./<name> on branch session/<id> off the base you pick, and the page names them all. No project is chosen when starting — unless the page is narrowed to one, which a session then starts in — and a question that needs no code gets none. It takes nodes, gets notes and lands like any other session, each project landing on its own (the one depended on first); it shows on Home under its first line. The page shows its conversation live (text, tool calls by title and state, plans), its permission requests with the agent's own options — every one waits for a person, or for the autopilot when they turned it on (below); nothing is allowed "always" behind their back — and a box to say something, with a ⏹ beside it (or Esc) that stops what the agent is doing — the session stays, for what to do next — and End session. A message typed while it works is queued (Enter: it goes when the turn ends) or sent now (Cmd/Ctrl+Enter: the turn stops and it goes first, any queued ones after it). Queued messages wait in a panel above the message box, where each can be edited, dragged to another place, taken back or sent now until the agent takes it, and Clear all empties the line; the conversation shows a message when the agent gets it. Images pasted or dropped into a message box (png, jpg, gif, webp; five a message, 10 MB each) go with it: up at once to the hub (POST /v1/uploads, steer), into the session's media when the message is sent, and to the agent as image blocks. File changes are not shown: the branch has them. The model is chosen when starting (Default — Claude Code's own choice for the account — Fable, Opus, Sonnet or Haiku, each the current model of its kind, or Opus ⚡ fast: Opus in Claude Code's fast mode, which needs extra usage on the account and says so in the conversation when it is off) and changed from the dropdown beside the mode; a reopened session comes back on the one it was last on. When the agent asks a question (Claude Code's AskUserQuestion), the page shows it as a short form — each question a single or multiple choice with an "Other" box — with Answer and Skip; the answers reach Claude Code as its own dialog would give them. Archive puts a session out of the list, whole; Delete, for an ended one, removes its record here and — by its runner — its worktree, and keeps its branch. Starting, saying, answering and stopping take the steer role; reading takes a login like the rest of the page.

A runner runs them, where the agent's login is — the agent container:

# in ~/.config/midas/hub.env there, with a caller key of role steer or up
MIDAS_SESSIONS_REPO=/home/agent/cartopolis    # a checkout sessions branch from
MIDAS_SESSIONS_DIR=/home/agent                # where their worktrees go (default: beside it)
midas sessions run                            # until stopped; keep it running (tmux, a user unit)

It keeps itself up, and is seen when it does not (runners.rs). midas sessions run is a small supervisor: it starts the runner proper as its child and starts it again whenever it ends, at once after a stop the runner wrote down itself, after a growing pause while it keeps ending within a minute. Each stop is an event, runner_stopped, with its reason: a new build, a signal with its sender's pid, command line and session, a panic with where, or, from the supervisor, a death the runner could not record (SIGKILL, a crash). The hub stamps every runner's polls. One silent for 90 s is away (runner_away): its sessions show as paused on the page, a line over the Sessions list says since when, and when it is back (runner_back) an autopilot it ran gets back the time it was away. Workspace ▸ Services lists every stop and Activity counts them; GET /v1/runners?since=S has them for anything else. The supervisor and its runner go together only by SIGKILL to both, or with their machine or container: a timer on the host that starts midas sessions run when pgrep -xf '… midas sessions run' finds none covers that, with MIDAS_RUNNER_STARTED_BY=watch so its starts say who made them (on the VPS, midas-runner-watch.timer). runner.log lines carry the UTC time.

The agent is Claude Code, through midas acp: midas's own Agent Client Protocol adapter (acp.rs), which runs claude in its JSON stream mode with the machine's own Claude login. Nothing to install beside claude itself. MIDAS_CLAUDE names another claude; MIDAS_AGENT another ACP agent altogether. A runner started from inside a Claude Code session still works: the adapter drops the variables that make claude refuse to nest.

Other agents, chosen per session. An admin adds more on the page, Settings ▸ Agents: a name, a short id and the command that runs it, any program that speaks ACP (bunx @zed-industries/codex-acp, gemini --experimental-acp). The hub keeps them in agents.json beside the registry. The new-session form then lists them below Claude Code's models in its one model choice (midas sessions start --agent <id> from a shell), and the session keeps its agent when it is reopened.

The command is run by the runner, in the session's folder, on the runner's machine, with that machine's login for the agent: install it and log it in there first. The runner gets it from the hub with its key (hosted/runner/agent); the page's own list carries only names, since a command may hold a key. Claude Code is always there, as claude, and is not edited there (the runner's MIDAS_AGENT still replaces it). The page's modes are Claude Code's, so another agent starts in its own and its own choices show once it is open. midas's hooks and skills are Claude Code's too: another agent gets the session's brief only if it takes a system prompt over ACP.

It long-polls the hub for sessions to start and for what was said to them, and reports what each session says and does as it happens. The hub keeps it all in hosted/<id>/ beside the registry (meta.json, log.jsonl, inbox.jsonl, media/). From a shell: midas sessions list, midas sessions start "<prompt>" [--base <branch>] [--mode <mode>].

For tooling, a session by name and brief, its answer one to act on:

midas sessions create --name "Faster tiles" --brief "…"   # or --brief - to read stdin
# s475 queued session/s475     exit 0; 2 invalid input, 3 a conflict

It is POST /v1/hosted/create with {"name", "brief", "repo"?, "base"?} (role steer), answered {"id", "status": "queued", "branch", "base", "repo", "title", "page": "/sessions/<id>", "api": "/v1/hosted/<id>"}; or 400 with "kind": "invalid" — an empty name or brief, a name over 80 characters or of more than one line, a brief over 32 KB, a base that is no branch name or not in the project — or 409 with "kind": "conflict": a session at work under that name already, or its branch session/<id> in a project already. The name is its title, and the brief its first message under a # <name> heading. It starts in no project unless repo says one, its agent adding what it needs, in the default mode. Within the hub it is sessions::create.

Modes, as Zed offers them: Manual (asks before every edit and command), Accept edits, Plan, Auto (Claude Code's own check decides) and Bypass permissions (asks nothing). A session starts in the one chosen on New session, Manual unless another is; the dropdown under its message box changes it, and the conversation records each change. Changing it takes the steer role, like answering a permission.

The autopilot. The Autopilot chip beside the mode hands the session to an agent that stands in for the person (autopilot.rs): it answers the session's permission requests and questions — "Shall it land?" and deploys included — and, when a turn ends with nothing queued, says what next or that it is done. Turning it on asks for a goal (empty: what the person asked the session) and how long (an hour, today, or until turned off); a tap on the lit chip turns it off at once. The runner decides, with Claude Code read-only in the session's folder (MIDAS_AUTOPILOT_MODEL, Opus when unset), from the person's messages in full and the conversation's end. Every decision is in the conversation with its reason, in the autopilot's own colour; the page's buttons stay while it thinks, and the first answer to reach the runner is the one taken. What cannot be taken back and was not asked for — data destroyed, money spent, something published — and anything the conversation does not settle, it leaves to the person: said in the conversation, and the one push a session on autopilot sends (otherwise it does not wake the phone). It never allows "always", and after eight messages of its own in a row it turns itself off. Take over, on the Autopilot page (Steer), turns it on for many sessions at once — those waiting on the person and those quiet and unfinished are ticked; one that ended is reopened — with one order for all: finish and land, finish without landing, or wrap up.

With the person's rules and earlier answers (Focus, below) the autopilot says on what each answer rests — a rule, the same answer as before, or its own judgement — and whether it was sure; what it leaves it marks as needing the person now (cannot be taken back, goes outside) or as able to wait for their next decision block. Only "now" wakes the phone while they hold.

Focus (Steer ▸ Today, Week and Rules, focus.rs): how much the person decides, and the limits they set on it themselves. Every answer they give (a question, a permission, a board decision, a message to a session) is a row in the hub's focus-ledger.jsonl with points: one for deciding, one more each for an interruption (answered within three minutes, outside a block), a switch from another session within ten minutes, a long read, a landing and an hour in their quiet time, and two for an answer in their own words. Home shows today's points against their cap; Focus shows Today (and the autopilot's answers for them, each one it was not sure of taken back within the take-back window — the session is told at once to stop acting on it and ask again), the Week (points a day, what made the heaviest day heavy, and a one-tap check-in from 1 fresh to 5 fried, which suggests a cap once there are fresh and fried days), and Limits & rules. All limits are off until set:

Settings and rules are kept in focus.json, per account; days and blocks follow the browser's clock, which the page sends with each read. A reader with no login sees the person who decided last. GET /v1/focus (the page's), GET /v1/focus/pilot?session= (the autopilot's), and POST /v1/focus/settings, /rules, /checkin, /undo (role steer).

Templates and schedules (Autopilot page, templates.rs). A template is a brief that says what counts as done (Performance, Code cleanup, Tests, Red builds to start with); started, it is one session per project chosen, on autopilot unless turned off. It can repeat — every night, on weekdays, or weekly, at a time of the person's (kept in UTC) — and a schedule starts only when its last run has finished, and pauses after two runs in a row that land nothing, until resumed. Each template says who may change it: only the person, midas by proposal, or midas itself, which after each run reads how it went and changes the brief when the run shows it should. Every change is a version with who and why, and any can be put back. They are kept in hosted/templates.json.

The research tree (Goals, tree.rs). A tree of what the work is for, as Civilization's: the person's goals at the far end — a sentence of theirs, as abstract as they like, with who notices, signs of progress, what it must never lead to, the projects it is about, and goals under goals — and the techs on the way, capabilities someone notices, each with what it needs first, a size (S, M, L) and its own icon. It reads left to right: what needs nothing in the first column, each other tech a column right of the deepest of what it needs, the goal at the far end, which only the open ends of the path draw a line to; a legend says what each state means, and tapping a tech lights what it needs and what builds on it. On a phone it is drawn as indented branches instead, each tech under the deepest of what it needs. A tech is built, available (its needs are built), locked or in the fog. A scout fills it in, one round at a time, each one move on one goal: Map reads the goal's projects for what on the way is built and what it clearly needs next, Harvest reads what the last finished sessions in them said last for what they left open. A round runs on a runner, as template reviews do: Claude Code read-only on each project's main (ask-<project>, MIDAS_AUTOPILOT_MODEL, Opus when unset), its commit subjects of four months given, one round at a time per runner. A tech one move found is in the fog until a second move finds it too or someone starts building it; a guess nobody starts and no look finds again for 30 days fades (guess_faded: shown as dropped, faded), and a look that finds it again brings it back. Not this (said in a conversation, tech_drop) keeps it out for good, with why; the tech's dialog has neither Not this nor It is built, since a tech is built when its session lands or the scout finds it on main. What is not a tech yet is an insight, and so is an idea the person writes in; one nothing confirms for 30 days fades. The scout draws each icon as SVG; the hub keeps it only rebuilt from geometry (paths, circles, lines…, numbers and path data, currentColor), so the page colours it by theme and nothing in it can run. The scout writes in the goal's language. A third move, Group, sorts the techs into themes and proposes each as a goal under this one; Keep makes it one, its techs leading to it, and from then on the goal's themes are those goals (before, each branch from a foundation is one), each in a colour of its own. A tech still to build gets a mockup from a fourth move, Sketch (for those without one, or again for one tech from its dialog): the screen where someone would use it, written by the scout as an HTML page in the product's own look (the project's own mockup style, fonts and theme, what is new marked NEW) and photographed by the runner at a phone's size (390 × 844) or a wide one (1280 × 800). The page is opened from the project's root with scripts off and the network pointed nowhere, and refused when it links outside the project or holds a script, frame or base (tree::sketch_refused); Chromium is driven over its DevTools pipe (browser.rs, MIDAS_CHROMIUM), as its own --screenshot never returns in the agent container. The hub keeps the PNG (hosted/mockups/<tech>.png, GET /v1/hosted/tree/mockups/<tech>); the older line drawings still show until a tech is sketched again, and a drawing never brings a tech out of the fog. midas sketch-shot <page> <out.png> --root <project> photographs a page the same way. A tech that exists is shown as it really works: a session keeps pictures of the real screens on it with midas show <file> --caption "…" --tech <id> (the MCP show's tech), and they take the sketch's place in its dialog (add_shot: png, jpg or webp, at most six, hosted/shots/<tech>/<n>.<ext>, GET /v1/hosted/tree/shots/<tech>/<n>; a later session's pictures replace an earlier one's). The session building a tech is asked to before it lands; a built tech without them has Show how it works now, a session in its project on autopilot that only looks, sees it run the project's own way and finishes without landing (start_photograph); photograph_all queues every built tech without pictures, and the watch starts them one at a time (photo_step), under the Focus cap. Insights about one tech stand on it as caveats (⚑), "built, but…". The tree shows what is open and the built techs it stands on, the rest of the past a tap away; a guess has Keep and Not this right where it is listed. Start building on an available or locked tech starts a session with a brief the hub writes from the tech — what it is, who notices, what exists, what it needs, the evidence and the caveats — in its project; the tech is being built (NOW, and for how long) while that session runs. The session takes the tech's name and carries the tech, its goal and the theme it falls under (research in its meta), so the session lists put a tech's sessions together under it, the goal in gold, one pip per session (landed, at work, still to go by its size), and the open session says the same over its title. Head this way on a goal, a theme or a far tech sets the tree's direction: from then on the hub's watch (tree::tick, every half minute) researches the techs on the way by itself, one after another — the next whose needs are built, what is known before a guess and the smallest first, a guess kept when its turn comes, since choosing the way was the person's decision — each a session on autopilot; a session that lands makes its tech built. Its limits are the person's, set when heading that way and changed in place with Limits (direction_limits): how many at once (1–3, one unless said) and started a day (1–12, four unless said). It is held while its person is at their Focus cap and paused after two in a row that land nothing. When the way runs out — everything known is built, or nothing is left to start and nothing goes on — it sends the scout along it by itself (a whole look on the goal, via: direction), and also after every few landings since its last look (three unless said; 0 only when it runs out), at most twice a day; nothing new starts while that look goes, and it carries on with what the look found. Only when a look finds nothing new is the goal reached; what is left that nobody can start pauses it with why (the way is stuck). The scout can be turned off, and the direction then is reached as soon as everything known is built. The page shows the way as stops — the tech landed last, what is at work now and for how long, the scout looking ahead, what is NEXT and when it begins (next in the direction: after the tech it needs, after the one at work, tomorrow once today's are used, when the Focus cap allows, after the scout's look, or paused), and the goal — with Limits, Pause and Stop, and its limits in a line under them.

Each tech has a Done when: one to three checks a person could make in the product, written by the scout for what is missing or by the person in the tech's dialog (tech_edit done). A research's brief carries it, and the same How to work for every research (the project's CLAUDE.md, one tech, a test for what it does, the project's checks on a node); before asking to land, the session gives evidence for each check (a test, a picture, or why it cannot be checked), or says its own checks when the tech had none, and the autopilot lands a brief with Done when only once it has. How it went, under the tree, is the goal's history: techs built a week by a session beside those the scout found built already, and its research sessions newest first, with when each started, how long it took, how it ended and what it cost (sessions on each tech: at, ended, cost; the cost read once from the session's usage lines when it ends and kept in costs).

Directions (Goals ▸ Directions, research/directions, designed in docs/screens/directions.html): several go at once, each toward its own goal in any project, in the person's order (↑ ↓, direction_order); heading for a goal already headed for changes that one's limits, and a tree from before is read with its one direction as the first (d0, migrate). Above their own limits stands one budget for all of them (budget_set): at once (three unless said), started a day (ten) and at once in one project (one). The watch looks at each direction in order (directions_step) and starts at most one research a look: the first that may, whose next tech's project has room — so directions that reach one project take turns there, and one waiting on a busy project does not hold up another's — and next says budget or project when that is what it waits on, with the project each works in. A tech whose change spans projects says so in lands_in (the scout's, in the order they land, the one depended on first; or the person's, tech_edit): it is researched one session per project in that order, each landing on its own, its brief naming its part (landed_in keeps what landed), and it is built once the last lands. The goal's page shows the direction toward it, and the goal bar links to Directions with how many go.

Map (Goals ▸ Map, research/map, designed in docs/screens/graph.html, graph.rs) is the level above one goal's tree: every hosted project at once, and only what is recorded between them. An arrow is code: a Cargo.toml or package.json on a project's main naming another hosted project by URL (…/<owner>/<name>.git, or …/archive/<sha>), drawn from the project used to the one using it, amber when the pin is more than five commits behind that project's main, with how far. A band is sessions that worked in both (their repos), a dashed curve techs of one that need a tech of another. Columns are the tree's: one past the deepest project a project uses; those that share no code stand apart. Tapping a project says what it uses and what uses it, its sessions and techs and its stale pins, and opens the project (research/map/<owner>/<name>), in three tabs. Over time: a stream for it, for each project it uses or that uses it and each other project three or more of those sessions also worked in, each session a bar from start to end coloured by how it ended, tied to the other projects it worked in, ◆ when it built a tech, and a dashed curve from the session that started it: from, which midas sessions start sends when run in a session's worktree (MIDAS_OWNER; sessions::set_from), or the session whose branch it began on (its base). Files (…/files/<path>): how to get it (the workspace's ssh clone, the https one when public, and main as a .tar.gz, GET /v1/repos/<o>/<n>/archive.tar.gz for a login), then its files at main and the README, read through /v1/repos/<o>/<n>/show and /about. Settings, an admin's: what it is, public or not (asked again before it goes public), its main branch, gate, gate nodes and check before landing (POST /v1/projects/set, which from the page takes an admin; an agent's key with project_set as before). A public project's own page (codeview.rs) says how to get it the same way. The hub draws the map (GET /v1/hosted/graph: graph and svg, read at most once a minute); the site's front page draws its public part for anyone (graph::public): public projects and the lines between them, techs built and what was built lately, never a session's count, title or cost. It is one file, hosted/tree.json: GET /v1/hosted/tree, POST /v1/hosted/tree (by op, role steer), and the runner's POST /v1/hosted/runner/scouted. A round can carry a focus: what the person asks it to look at, in their words, which the scout reads first. The page never names the moves: the goal and its themes are one bar above the tree (a block with a menu of the other goals and the goal's tools, then a tab per theme with how far it is; ← → step through them, and before it the project picker Sessions has, one choice for both: a project shown keeps the goals that name it or none, an empty one offers its first goal, and a new goal or a scout's first look is about it until the person picks otherwise), the tree is drawn in lanes by theme, and the scout is docked in it with one button, Research further, and a line for what to look at. That asks for a look (op: look): Map, Harvest, Group and Sketch as rounds of one look, each waiting for the one before (after), Group and Sketch skipped when there is nothing for them (when: wanted: no themes yet and eight techs or more; a tech still to build without a mockup); a theme reads its goal's projects. A goal reads no project until one is named (look refuses it): the goal's form asks for them as a step of its own, and saving the first ones also sends the scout (Make the goal and send the scout); a goal saved without one has the projects to pick in the tree, with Send the scout and the steps that follow, and its first look ticks them off over placeholder cards. While a look runs its bar is one line: what was asked, its moves as bars, what it reads now, how many questions wait, Details and Stop; and the scout is in the tree: its theme's lane glows, the card whose evidence names the file it reads says "reading this", and cards it read say "✓ read" (evidenceNames). Details folds open over the tree what was asked (and that it was asked in a conversation, via: talk), its moves in words with how much each read, about how long is left (from how long each move took before) and Stop (look_stop; an answer still on its way is not kept); under them what the scout reads now and what it said last between reads. The runner runs Claude Code with stream-json and tells the hub its last steps every few seconds (POST /v1/hosted/runner/scouting, kept on the round as live while it goes; once back only how much it read). A look asked while one goes is not refused: it waits behind it (after), at most three, each a line under the bar with × to take it back, and starts by itself. Each round records what it changed by id (changed), so what a look brought glows on the tree as it comes in and after it, the bar counts it and ‹ › walks through it, until Seen it (look_seen, per person). A tapped tech opens a popover with Keep / Not this and questions for the scout about that tech alone (what it needs first, make it smaller, draw it, is it built already, what comes after it, or your own words: a look with tech and ask), the same as in its dialog; a lane with something still to build ends in Look further here, a look at that theme. Under the tree, the scout's log is a chip per look, lighting what it brought. The tree takes the screen's height: a shorter one is spread over it, cards further apart (layout's fill). A tech is talked over in Discuss too open_tech opens it on the page and gives the voice all of it, with what its mockup shows in words (mockup_shows, written by the Sketch that drew it, as the voice cannot see the picture); tech_edit changes its name, what, who, differently, exists or size, the dialog showing old beside new with Undo (edited); remark keeps what the next drawing must change, and a Sketch of that tech is given its description and the remarks, which go once it is drawn. While a conversation is on, the dialog has no draw button: drawing it again is said. The tree is also talked over out loud: Discuss about the research tree (preselected on Goals) reads it, changes it as its buttons do, and sends the scout out with a focus; below.

Talking it over first. Beside the attach button, Discuss opens a voice conversation about the session before it starts (or about what to say to an open one next), on OpenAI's GPT-Live (gpt-live-1, as Podium's feedback coach talks: full duplex, the most like a person), whose backend model (gpt-6-luna) reasons and runs the tools for it; or, as Settings says, on a realtime model (gpt-realtime-2.1), which runs them itself. It is an operator, not a design coach: it takes the task as you put it, first asks the code what already does it, says when something you ask cannot be checked from the workshop, and asks only what it cannot go on without; you can cut in. As it goes it writes the brief into the message box, whole each time; edit it there and it hears the new text. Start (or Send) is still yours, by the button or by saying "start it": then it hangs up. Mute takes you off the record; End stops it and leaves the brief in the box. The brief is what you asked and what already exists, with no criteria, measurements or reports you did not name, and ends with a "Decided" list of what was settled. (Until 2026-10-29 it coached as Podium's coach does, one point a turn handed back with a question, and its briefs grew scope nobody had asked for.) The dialog's With picks who designs with you: the operator (the default, as above), a design coach (walks through it as its user meets it and asks about what is unclear), a CTO / CEO (why now, what it costs, what it puts off, the smallest version worth doing), or a customer (reacts as someone who would use it). Each keeps the brief by the same rules, with the same tools. Every role, Midas too, speaks in a woman's or a man's voice, picked beside it and remembered per role on that device. Pictures come into it: + adds a photo or a screenshot (or paste one on the design's page), Sketch opens a pad to draw on with a finger, and "Show it" hands the drawing over; the voice sees each (scaled to 768 pixels on its longest side), and they go with the brief when it is sent (five at most). Once a brief went out the coach builds along: it follows the session, and sends it the next step, answers its questions and requests (its "Shall it land?" too) or interrupts it, each on your word. It can look up earlier work in the sessions' conversations, and reads the board to say when a design collides with work in progress. It cannot read code itself, so it asks: a question about the code goes to the sessions runner, where Claude Code reads the project's main as it is now (or the session's own worktree, asked about one) with only its read, search and list tools, and answers in a few spoken sentences, which the voice says when they come (in seconds to a minute; it talks on meanwhile) and the page shows as a note. The model is the runner's MIDAS_ASK_MODEL, Sonnet when unset; the main it reads is a worktree of its own beside the sessions', ask-<project>, on the branch the project lands on (a deck's presentation). The voice is told the workspace's projects, each with its README's first paragraph from the hub's mirror, and names the one a question is about; the reader is told the others, and says which would hold what its own does not. A question is answered before anything is written into a brief. Talking about a session, the board or nothing in particular, Midas also manages, as the pages' buttons do and under your role: it creates a session by name and brief, sends a session a message, answers its permission requests and questions (its "Shall it land?" too) and the board's decisions, interrupts, ends, reopens, archives or renames a session, changes its mode or model, tells it to land, deploys a target, takes a node out of the pool, puts it back or takes it from its holder (the operator role's, as on Workspace), and leaves or closes open ends. A message it sends waits for the session's turn to end, or cuts into it when you say so, and carries the pictures you added when you ask. Every conversation follows the sessions it is about and those it started, sent to or acted on (the panel names them): what they report comes in by itself, read off their logs every four seconds while the call is on, so there is no need to ask how one is doing. A turn ended (with its last words), a request or question waiting for you, a picture it showed (which the voice sees), an error or its end: the voice tells you at a natural moment, and proposes the next step. Each only when you say so; before ending a session, landing, deploying or changing a node it says back what it will do and waits for your yes. It never deletes a session. The page follows it: to Home when it reads the board, to a session it reads or acts on, to Workspace for a node or a deploy. It answers in a sentence or two, without praise, and asks only what it cannot go on without. Told a language, it speaks it with that country's accent (the voices are American, and carry their accent into any language otherwise). About the research tree, Midas designs it with you: it reads the tree (goals, techs by state with what each needs, insights, the direction and what is next, the scout's last rounds), and on your word saves or changes a goal, keeps an idea as an insight, keeps a guess or says not this to it with why, sets, pauses or stops the direction, and starts a tech's research. A goal, a direction and a research it says back first and waits for your yes. Asked to find out what is built, missing or left open, it sends the scout out (a look, as Research further does, or one move alone) with what you want it to look at; it talks on meanwhile, and when the round is back tells you what it found and goes through its guesses with you. The page follows it to Goals. Every conversation is kept (talks.rs, hosted/talks/<id>.json, the newest 200): what was said, the brief and what it was about, saved a second after each change, when it ends, and as the page is closed. The one open on a device comes back after a reload, ended, with Carry on, which calls again with what was said so far; Close takes it off the page, and the dialog lists Earlier conversations to open again. (Until 2026-11-17 a conversation lived only in the page, and a phone that closed it in the background lost a whole design.) GET /v1/hosted/talks, GET /v1/hosted/talks/<id>, POST /v1/hosted/talks (saved, a new one given its id) and POST /v1/hosted/talks/forget, role steer for the posts. It is optional: the box works as ever without it. It needs an OpenAI key on the hub, which an admin sets on the page's Settings (the hub keeps it in /srv/midas/openai.key, readable by the midas user only, and never says it back: only its last four characters); without one the button is not shown. Settings also chooses the model (GPT-Live's or a realtime one; the call's answer says which, engine: live|realtime, as their events differ), GPT-Live's backend, and the two voices (a woman's, marin by default, and a man's, cedar), which a call asks for by voice: female|male, and the language it speaks and writes the brief in (kept in discuss.json in the state directory). The hub only signs the call (POST /v1/hosted/discuss, the steer role, as it spends the key; GET says whether there is a key; its code questions are /v1/hosted/discuss/ask and /answer, steering too): the page's microphone and the voice go between the browser and OpenAI over WebRTC, and OpenAI keeps no trace of it. The browser asks for the microphone, which it gives only to a page over HTTPS (or on localhost). Through a proxy that lists paths, /v1/hosted/* covers it, and /v1/settings* the Settings page.

Media. An agent shows the person a picture, a sound or a film with the midas MCP tool show, or midas show <file> [--caption "…"] (up to 100 MB); the runner tells each session's agent so. The hub keeps the file in the session's media/ and the page plays it in place, served with byte ranges (a phone seeks a film that way). Through a proxy that lists paths, add /v1/hosted/* to its readable ones.

Work it waits on. A deploy a session asks for goes on after its turn ends. Meanwhile its page and its card show it with the spinner ("atlas deploy: waiting for a vps node", "building on vps-1", "publishing"), read off the deploy's events. When it is published or fails, the hub leaves the session a note, which its agent reads at its next prompt or tool call. It wakes no idle session: nothing midas reports itself (a deploy, an overlap, a node back in the pool) starts a turn, only a note from another session or the person's answer to a decision does. Until 2026-10-29 a deploy's outcome was sent as a message, and an agent woken by it answered midas in the person's conversation, with nobody there. Only a deploy the hub itself recorded as that session's counts: anything on the tunnel may post a line to /v1/events, so a posted request is never believed, and a posted failure's reason is not passed on. The kinds the hub acts on — a lease released at an ssh session's end, a landing, a session's start and end, a deploy's outcome (events::drives_state) — it takes only from a caller key, or for ssh_session from the node named; the publisher reports with root's own key (/etc/midas/publisher.key, made by hub setup).

Carrying on later. A session can be set to carry on by itself at a time: its agent says so (the MCP tool session_later, midas later --in 4h "…" or --at 2026-10-30T09:00+01:00 "…"), with what it is to do then, whenever it promises work for later — the rest tomorrow, a task spread over days, each turn setting the next. The hub keeps one time per session (wake in its meta: when, what, by whom; at most 30 days ahead), and its watch, every half minute, sends it at that time as a message "From midas: …", reopening a session that had ended. Meanwhile the session is under Scheduled, the soonest first, in the list and on Home, its line saying when ("⏰ carries on tomorrow 09:00"), and above its message box a bar says when and what, with Now, Move (a time, in an hour, tomorrow at nine) and Cancel; the conversation records each. It is POST /v1/hosted/<id>/wake (the steer role) with {"at": <unix time or RFC 3339>, "text"?} or {"in": "4h", "text"} to set or move it, {"cancel": true}, or {"now": true}. A session set to carry on is neither finished for being idle nor asked whether to finish; one finished on the person's word drops its time.

Waiting on the person. A session can say it waits on the person for something only they can do (the MCP tool session_await, midas await "…"): a token, a DNS record, an OAuth app. The hub keeps one per session (awaits in its meta: what, the steps, where a secret goes, by whom, and snooze once put off). It is declared, never guessed from a session being idle: "Your turn" did that, and was dropped (2026-10-27). Until it is done the session is under Needs you in the list and on Home, landed or not, with a key for its mark and a push like a question's; above its message box a panel gives the steps, for a secret a field, Tomorrow 9:00 (under Scheduled until then, and pushed again) and Won't do it (the session is told to go on without). A secret goes where the session said — remote:<name>'s token (remote.rs) or bot:<target>:<NAME> (botsecrets.rs) — never into the conversation or a log; the session is told, as a message, that it is set. Giving one takes the admin role and a person on the page. It is POST /v1/hosted/<id>/awaits with {"text", "steps"?, "secret"?, "url"?} from the session ({"done": true} when it no longer waits), and {"value"}, {"snooze": <unix time>} or {"decline": true} from the page. A session that waits is neither finished for being idle nor asked whether to finish.

Reopening. A session that ended (stopped, failed) has Reopen where its message box was (/v1/hosted/<id>/reopen, the steer role): the runner starts its agent again in the same worktree and branch, loads the conversation it had (ACP session/load; the hub keeps the agent's id as agent_session), back in the mode it was last in, and hears only what is said to it from then on. A runner starts again on its own when a deploy replaces its binary, once none of its sessions is mid-turn, starting or waiting on the person (before that, a deploy never reached it: the files reports shipped a day before any runner sent one). A runner that starts again — a deploy, a crash — reopens the sessions it was running itself, so a restart costs a session its current turn, not its conversation. After each turn the page shows how full the agent's context is (tokens of the model's window) beside the mode.

Imported conversations. Claude Code conversations had elsewhere — a workstation's, the agent container's claude.ai/code sessions — come to the list with midas sessions import, run where the transcripts are, with a key of role steer:

midas sessions import ~/.claude/projects/-home-agent-cartopolis*   # transcripts, or directories of them
midas sessions import --claude-ai --cwd cartopolis   # every claude.ai/code session had in a cartopolis checkout
midas sessions import <dirs> --dry-run       # what it would send

A claude.ai/code session's machine keeps its transcript 30 days (Claude Code's own cleanup); claude.ai keeps it all. --claude-ai reads them from there with the machine's Claude Code login, as claude --teleport does: the account's session list (/v1/code/sessions), then each one's events, whose payloads are its transcript's lines; the token goes to curl on stdin. A conversation the machine also has a transcript of is the same conversation (Claude Code's id for it), imported once. --cwd keeps those had in a directory whose path says so — the session list names no repository for a bridged session. Since September 2026 a session's lines name no directory either; it is then its environment's (/v1/environments/<id>, a bridge's config.directory). A removed environment is not found, but the sessions it ran are older ones, whose lines do name theirs.

Each becomes an ended session marked imported, from the machine it names (--from, else its hostname): what the person said, the agent's text, its tool calls with what they were given and what came of them (2000 characters each), its plans. Thinking, subagents' own conversations and pictures stay behind; 116 MB of transcripts came to 5.7 MB. It is a record: no runner can reopen it, since its agent's conversation is on that machine. Run again, it sends only a conversation that is new or has grown (by Claude Code's id for it; a session midas ran is never imported from its own transcript). They are found by searching, or under imported at the foot of the Sessions list, as archived ones are under theirs. Each is in the project its checkout's origin names (the checkout a worktree was made from, once the worktree is gone); one imported before that was sent is given its project by the next import run.

Conversations. Activity (How it flows) counts every session's conversation, imported and run here alike (GET /v1/hosted/stats?since=): your messages per day and by the hour, the time worked (the gaps between things said or done, each at most ten minutes), tool calls and how many failed, the shell commands, cargo subcommands and skills the agents used, the files they changed most, and the longest sessions. Each session's tally is kept beside its log (tally.json) and made again when the log grows: 400 sessions are counted in 5 s the first time, and read in 0.1 s after. The project filter over the page narrows these and the build history alike to one project's sessions.

Search. The box on the Sessions list (and in the nav) searches every session, imported and archived ones too (GET /v1/hosted/search?q=): the ones whose title or conversation has every word, any case, newest first, each with the words around the first place that says them all; choosing one opens its conversation there. It reads what was said and the tools' titles and purposes, not their output, from an index beside each log (index.txt), made again when the log has grown.

From an editor. A session started in Zed on a workstation shows here too, and is steered from here, when Zed runs its agent through midas:

"agent_servers": {
  "Midas": {
    "type": "custom",
    "command": "/usr/local/bin/midas",
    "args": ["acp", "--mirror"],
    "env": {"MIDAS_CLAUDE": "/Users/you/.local/bin/claude", "MIDAS_MACHINE": "mini"}
  }
}

midas acp --mirror (tap.rs) runs midas acp behind it and passes everything through; each session appears at its first prompt, marked "in Zed on mini" with its checkout — and on Home, as a row under the checkout's name until it ends — and needs the workstation's caller key in hub.env (role steer or up). What the page says becomes a prompt in the same thread, shown in Zed as "ana (from midas): …"; a permission answered on the page is answered for Zed too; cancel, mode and model work as for any session. End session becomes Stop mirroring: the page stops following it, Zed goes on. When Zed closes, the session ends here; it cannot be reopened from the page, because its agent and conversation are on the workstation — open the thread in Zed again and the page follows it once more. MIDAS_MACHINE names the machine as the workspace does (default: its hostname); --agent '<command>' mirrors another ACP agent instead.

Archived in Zed (its sidebar's Archive), a mirrored session is archived on the page too, and brought back with it. ACP does not carry Zed's archive, so the mirror reads it from Zed's own database every 15 seconds (read-only, with the sqlite3 command) and follows what changed since it last looked: a session brought back on the page stays so until Zed's archive changes again, and one archived while Zed's mirror did not run follows at the next look. Archiving on the page leaves Zed's thread in Zed's list: Zed's archive is Zed's to write. But a person archiving a session that is still open in an editor means it is done: once no turn runs (a running one is stopped), the mirror closes its agent, as Continue on midas does, and says in the thread that it ended; its prompts are refused until the thread is opened again. Archive the thread in Zed as well to put it away there. The mirror's own archiving (after Zed archived or deleted it) ends nothing.

Continue on midas (on a live mirrored session) moves it to the runner, conversation and work: once no turn runs (a running one is stopped), the mirror closes it in Zed, commits the checkout's working tree — changes, new files, deletions — as a wip commit on session/<id> through an index of its own, so the checkout itself is untouched, pushes that, and sends the agent's transcript to the hub. The runner makes a worktree of that branch, puts the transcript where Claude Code looks for it there, and loads the conversation in the mode and on the model it had; the agent is told it moved. Zed's thread says where it went, and refuses prompts. Hand back to Zed reverses it: the runner stops its agent, pushes its worktree's work to the branch (a second round is a merge, never a force push) and sends the transcript. Open the thread in Zed again (Zed lists Midas threads from session/list) and the mirror brings the transcript back before loading it, so the whole conversation replays, and puts the branch's work in the checkout as uncommitted changes — only if the checkout has not changed since it left; otherwise it is left alone, and both the person and the agent are told the work is on origin/session/<id>. Transcripts are kept beside the session (transcript.jsonl, readable by the hub only) and go only to a key of role steer, never to a page.

Accounts

People have accounts; machines and agents keep caller keys. An admin makes one from any machine with an admin key (a key with no role set is one, as keys always were):

midas account add ana --role operator     # prints a setup link, good for a day
midas account list                        # role, set up or not, last seen
midas account role ana steer
midas account reset ana                   # lost phone, leaked password: a new setup link
midas account remove ana

The link is MIDAS_WEB_URL (hub.env, e.g. https://garage44.eu) or the hub's address, then /setup/<token>. There the person chooses a password (twelve characters or more), adds the one-time-code secret to an authenticator app from a QR code, proves it with a first code, and is shown ten recovery codes, once. Logging in takes the name, the password and a code (or a recovery code, used up by it). Five failures in a row lock the account for a quarter of an hour; logins and failures are in the log, with the person's address.

Roles, each including the ones before: viewer sees the page, operator changes the workspace (drain, release, deploy, decide), steer types into agent sessions, admin manages accounts. A caller key can be narrowed the same way: sudo midas hub caller role <name> operator, or caller add --role. A new key is steer unless --role says otherwise — what agents need to run sessions; give admin only to a key the person keeps. A key from before roles has none and is admin; midas hub setup names any such key.

Sessions come in only two ways: from the page (a person's login) and from an editor (midas acp --mirror, with that workstation's key). There is no key for a service: the starts-only key (caller add --starts, made for Podium to ask for its deck's media) was retired on 2026-11-06 to keep that surface closed, and the hub refuses a key that still carries its starts list.

A session is an HttpOnly, SameSite=Strict cookie (Secure over HTTPS), twelve hours from its last use and a week at most; a change made with it must come from the page itself (its Origin). Accounts and sessions — argon2id password hashes, code secrets, SHA-256 of session and recovery tokens — are in accounts.json beside the registry, readable by the hub's user only.

The proxy's own password can go once everyone who uses the page has an account; it keeps doing TLS. It need not add a key any more either.

8. Hear about problems

midas mails nobody. What it can fix it fixes: a build directory over its ceiling is trimmed by the warmer on a free node and by the node's own guard on a held one, once no session is on it (midas log --kind trim). What only a person can fix is on the Workspace page, over the network diagram — a node not reporting or out of the pool, short of disk or overloaded, the hub short of disk (under 10 GB free where its state is), a session waiting long for a node — and in midas check. A decision put to the person (midas ask) wakes a phone that turned on notifications (More ▸ Notify this device).

Web Push services ask the sender for a way to reach it; name the owner's address in the same file (no mail goes to it):

"contact": "you@example.org"

An alerts section left from before is ignored.

9. Keep a copy elsewhere

Caller keys, accounts, bot secrets, node identities and the history exist only here. sudo midas hub backup writes them as a gzipped tarball to stdout — the hub's home and /etc/midas, without the git mirrors and the LFS cache, which Forgejo holds (58 MB, six seconds, in October 2026). Fetch it from another machine, so this one needs no key into it. On a Mac, nightly, keeping two weeks — ~/Library/LaunchAgents/org.example.midas-backup.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
  <key>Label</key><string>org.example.midas-backup</string>
  <key>ProgramArguments</key><array><string>/bin/sh</string><string>-c</string><string>
    d="$HOME/Backups/midas"; mkdir -p "$d" &amp;&amp; f="$d/midas-hub-$(date +%Y%m%d).tar.gz" &amp;&amp;
    ssh -o BatchMode=yes you@hub.example.org sudo midas hub backup &gt; "$f.part" &amp;&amp;
    gzip -t "$f.part" &amp;&amp; mv "$f.part" "$f" &amp;&amp;
    ls -1t "$d"/midas-hub-*.tar.gz | tail -n +15 | xargs rm -f
  </string></array>
  <key>StartCalendarInterval</key><dict><key>Hour</key><integer>3</integer><key>Minute</key><integer>30</integer></dict>
  <key>StandardErrorPath</key><string>/tmp/midas-backup.log</string>
</dict></plist>

launchctl load ~/Library/LaunchAgents/org.example.midas-backup.plist. It needs an ssh key that logs in without a prompt; a Mac asleep at 03:30 runs it when it wakes. To restore, stop the hub and unpack it at / as root.

Updating and checking

Build a newer midas and run sudo /var/lib/midas/bin/midas hub setup again, with no options: it keeps its settings, replaces the binary and restarts the hub. midas check from anywhere says whether the hub and every node are healthy.

Files

wherewhat
/etc/midas/hub.confthe settings above
/etc/midas/mirror_ed25519the deploy key
/etc/midas/publisher.keyroot's own caller key, which the publisher reports deploys with
/etc/midas/release.pubthe owner's release key, public half: what self_update: "signed" checks a published midas against
/etc/midas/admin.jsonadmin windows: the agents' user, the page passkeys sign on, the passkeys that may grant (root's)
/etc/midas/admin-window.json, /etc/sudoers.d/midas-adminthe window root keeps, and the sudoers file only while it is open
/srv/midas/admin/grants and closes the hub spools for root
/var/log/midas-admin/every grant with its signature (grants.log), and with classic sudo what was typed under it (io/)
/srv/midas/callers.jsoncaller keys (and their git tokens)
/srv/midas/openai.keythe OpenAI key for talking sessions over by voice (optional)
/srv/midas/remote-mcp.jsonremote MCP servers and the tokens the hub calls them with (midas remote set)
/srv/midas/state/nodes, leases, the landing queue, readings, the log, the landing gate's receipts, and the history kept for good (builds, takes, pool, landings, sessions .jsonl, and power/ by day)
/srv/midas/deploy/deploys queued, being built, and built
/var/lib/midas/deploy/root's copy of what is about to be published
/srv/midas/.ssh/written by the hub itself from its node list