Skip to content

feat(herdr): run a machine agent on every machine - #437

Merged
odsod merged 6 commits into
mainfrom
machine-agent
Nov 22, 2026
Merged

odsod merged 6 commits into
mainfrom
machine-agent

Conversation

@odsod

@odsod odsod commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Every machine gets a machine agent: Claude in a terminal named machine,
in space and tab machine, in this repo's original checkout. You talk to the
machine (hc send odsod-desktop/machine ...), and it manages this config and
Herdr. There is no leader: the Herdr cores and the repo are the state, and
the repo is its only memory. The protocol is in AGENTS.md, "Machine Agent".

  • Start and repair: herdr-machine-agent starts a kept shell named
    machine with Herdr's space and tab labels, then types claude into it.
    It's safe to run any time. herdr-machine-agent.path runs it when the
    core's socket appears. After a reboot the kept terminal is a shell again,
    and the same path brings Claude back.

  • Sidebar (spaces.patch): each machine's row stands for its machine
    space, shows its status, and starts or repairs it on a click. Rows show
    hostnames in HOSTS order. The machine space comes first on its machine
    for every client (mobile too), and its tab is named machine.

  • Toggle (machine mod): Ctrl+U Ctrl+M shows the machine space of the
    focused space's machine, and from there goes back to the space you came
    from. Tab rename moves to Ctrl+U Ctrl+R.

  • Fork out work (herdr-space start): any agent can make a jj
    workspace and open a space running an agent with a first task, on this or
    another machine (--on), without moving the user. The Ctrl+U Ctrl+T
    dialog runs the same command with --focus, so keys and agents share one
    path. Documented in agents/AGENTS.md.

  • Docs: both AGENTS.md files are rewritten from a Gemini 4 Neon copy
    review (root −41% words, global −18%). Child agents now start in a topic
    tab of their own space, in agents/AGENTS.md and the agent-team skill.

Tested on both machines: the path unit started each agent, a rerun changes
nothing, <host>/machine resolves across machines, herdr-space start opened
a space whose agent answered its first task (locally and with --on),
herdr-app check passes for every mod, and mise run check passes.

Follow-ups:

  • Try Ctrl+U Ctrl+M (twice) and Ctrl+U Ctrl+R from the laptop.
  • Try Ctrl+U Ctrl+T for a new workspace, an existing one, and the laptop.
  • Check that machine is at the top on the mobile app.

Each machine gets a Claude terminal named machine, in space and tab machine,
in the machine repo's original checkout. The Herdr cores and the repo are
its state, so it needs no leader and no notes.

- herdr-machine-agent starts or repairs it; safe to run any time.
- herdr-machine-agent.path runs it when herdr-core comes up.
- A kept terminal returns as a shell after a reboot; claude is typed in.
- AGENTS.md: the Machine Agent protocol.
- The machine row stands for its machine space and shows its status;
  a click shows it, after starting or repairing it there.
- Hostnames instead of This computer; sections in HOSTS order.
- The machine space comes first on its machine, for every client.
- Its tab is named machine, so the agents panel and mobile show it.
The machine mod asks, peeks at or goes to the machine agent of the focused
space's machine, starting it there when it isn't running.

- Ctrl+U a asks: the text goes with the space it was sent from.
- Ctrl+U p peeks at its terminal; Ctrl+U g shows its space.
@odsod
odsod force-pushed the machine-agent branch 3 times, most recently from 8d1bbb7 to 1a8f0cd Compare November 22, 2026 19:09
- Ctrl+U Ctrl+M shows the machine space, and from there goes back to the
  space you came from, so one key covers ask, peek and go.
- Drop the ask text box and the peek action: start with one key and add
  more on observed need.
- Move tab rename to Ctrl+U Ctrl+R to free m.
- Repair the agent on each toggle in, so a shell left by a reboot or an
  exited Claude gets Claude back.
- Add herdr-space start: prepare a folder or jj workspace, write the
  Linear context, then open a space running claude, codex, agy or pi
  with a first task. --on makes the folder on another machine.
- Without --focus it doesn't move the user and refuses a folder that
  already has a space; with --focus it shows the space.
- The Ctrl+U Ctrl+T dialog runs it too, so keys and agents share one
  path and one agent list.
- Document it in agents/AGENTS.md so any agent can fork out work.
- Rewrite both files from a Gemini 4 Neon copy review: say each rule
  once, cut what models do by default or read from code, and group
  Herdr and PR rules in one place each.
- Shrink Machine Agent to what agents act on; UI details live in code.
- Add mise run check and fmt, and -R / GH_REPO on every PR command.
- Start child agents in a topic tab of their own space (global and
  agent-team), so the user can watch them; keep builds hidden.
@odsod
odsod merged commit 467bc6f into main Nov 22, 2026
1 check passed
@odsod
odsod deleted the machine-agent branch November 22, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant