Experimental alpha · v0.1 Emacs 29.1+ with SQLite GPL-3.0

Every coding agent gets a name, a worktree and a way back.

M-x Machina is an Emacs package for running several coding agents side by side. Each one is named, filed in folders, color-coded by state, tied to its own Git worktree, and resumable from the same saved conversation after you restart Emacs.

01TOUR

Drive it with the real keys.

An illustrative frame with fictional agents, not a screenshot. Click inside it, then use the same keys as the sidebar: one agent is waiting for approval, one has an unread reply, and one will finish while you watch.

Keyboard: j and k move, Enter opens or resumes, Tab shows details, right and left bracket jump between agents needing attention, z focuses, B opens the board, i diagnoses, question mark lists actions, x stops, u marks read, e opens eshell, q goes back. Shift+Tab or Escape leaves the frame.

emacs Illustrative · fictional agents
  • working
  • ready
  • approval / input
  • error
  • stopped
  • unread reply
02FEATURES

Six keys explain most of it.

Everything below exists in v0.1. Each idea starts from the key that does it in the sidebar.

Name it, and give it a worktree.

Create a named agent in an existing checkout, or let Git create a new worktree and branch for it from the current commit. Uncommitted changes stay in the original checkout. Existing branches and directories are rejected, never reused.

File it in folders, as deep as you like.

Logical folders like Work/Billing Service organize the sidebar without moving any files. Collapsed folders still summarize working, waiting and unread agents inside them. Renaming an agent leaves its conversation ID alone.

See which agent needs you.

Color means state. A purple * marks a reply you haven’t read, and it clears only after five continuous seconds on screen. ] and [ cycle through approval requests first, then unread replies.

Agents: 3 working · 2 ready · 1 approval · 4 stopped

Sidebar, board or focus.

The sidebar stays visible while you edit. B opens a board grouped by folder with Working, Waiting, Ready and Stopped columns. z fills the frame with one conversation, and pressing it again puts your windows back.

Stop it, restart Emacs, resume it.

SQLite keeps each agent’s conversation ID, profile, worktree and branch. After a restart the dashboard loads only that metadata, and RET asks the backend for the same conversation. If that fails, nothing silently starts in its place, and no input is replayed.

Diagnose without launching anything.

Diagnostics checks the profile, executable, checkout, branch and saved identity without starting the agent or contacting the backend. W points a stopped agent at a moved worktree after you confirm. R retries once you’ve fixed the cause.

03INTERFACES

Keep the interface you already use.

Creating an agent asks for agent, then account, then interface. All of them share the same sidebar, folders, worktree context and focus commands.

agent-shell

ACP

Native Emacs UI through ACP, reusing your agent-shell profiles and separate accounts. Tested with agent-shell 0.83.4.

EAT

terminal

Claude Code’s terminal UI, with per-run hooks that report status and session identity. Your Claude and project settings are never edited.

vterm

terminal

The same terminal integration through vterm’s native module, with history navigation and copy mode.

eshell

companion

Press e for a separate shell in the agent’s worktree. It keeps its history and draft. It runs commands for you and is not an agent interface.

04MESSAGING · OPT-IN

Agents can consult each other when you turn it on.

M-x mx-machina-messaging-mode starts a local message service. You, or an agent you instruct, use the mxm CLI to list peers and send a request. With --wait it returns that peer’s actual reply as JSON.

  • Runs over a local Unix socket under your OS user. Sender IDs are for attribution and don’t authenticate agents.
  • Delivery waits while the recipient is busy, awaiting approval, visible in a window or holding an unsent draft.
  • Each recipient handles one request at a time. Sending never launches a stopped agent or answers a permission prompt.
  • It only routes requests someone asked for. It never decides which agent should work on what.
terminalillustrative output
$ mxm list
[{"id": "5d0c…", "name": "Work/Billing Service/Harness",
  "status": "live", "activity": "input", …},
 …]

$ mxm send 'Work/Billing Service/Harness' \
    'Do the new retry tests cover shutdown?' --wait
Request ID: 2e6f…
{"id": "2e6f…", "status": "completed",
 "response": "Yes. Two of the six cover shutdown mid-retry.", …}
Fictional agents and replies, abbreviated. list and every result are JSON. A timed-out wait exits with code 2 and leaves the request active.
05LIMITS

What v0.1 doesn’t do.

This is an experimental alpha. It’s worth knowing where the edges are before you rely on it.

No autonomous orchestration

Agents never assign each other work. Messaging carries only requests that someone explicitly sent.

No detached execution planned

Agents are processes owned by Emacs. They don’t keep running after Emacs exits.

No cloud

The registry, sockets and message files are local to your machine. Credentials and history stay with each backend.

Resume isn’t guaranteed

Resuming depends on the backend still having that history and on the original profile and account. When it fails, you see the failure instead of a replacement conversation.

No PR or CI integration future work

Worktrees and branches are tracked, but pull requests and CI runs are not.

Messaging is offline-tested

Integration tests cover all three interfaces offline. Real Claude messaging still needs an interactive pilot.

See the prioritized backlog for the path to dependable daily use.

06QUICKSTART

Clone it, load it, press n.

Loading the package installs nothing globally. To try it without a model or account, start with the offline demo.

git clone https://github.com/eliraz-refael/m-x-machina.git

;; init.el (adjust the path)
(add-to-list 'load-path "/path/to/m-x-machina/lisp")
(require 'mx-machina)

;; then
M-x mx-machina      ; sidebar, press n for a new agent

Requirements

Emacs 29.1+ built with SQLite
Check with M-: (sqlite-available-p)
Git
The worktree needs at least one commit.
For ACP profiles
Tested with agent-shell 0.83.4, ACP 0.15.2 and shell-maker 0.97.5.
For terminal profiles
EAT or vterm (with its native module), an authenticated Claude Code CLI and Python 3.
Optional
Magit, Evil, and Doom bindings from the included example.

Try the offline demo first. No model, credentials or network needed.