All Today

✍️ Draftmux: an editor for the text your coding agent writes, with live preview

· 3 min

Draftmux with a pull request description open: Markdown on the left, GitHub preview in the middle, agent chat on the right

In brief


✍️ Developer raine has released Draftmux, an editor for text a coding agent writes, to be polished before it goes out. The idea: the agent has the context, so it should write the PR description, the issue or the Slack message. According to the project page, though, refining that text inside an agent's chat window is a poor experience. 🔀 You hand off from Claude Code or Pi, for example with /draftmux. A fork of the session writes the first draft, and next to it you see how it will look at its destination. You can edit by hand, have selected passages reworded or ask for changes in chat. 💻 It installs on Apple silicon Macs, Linux and Windows. Agent-written drafts need Pi or Claude Code 2.1.293 or later; editing, previews and copying work without either.


🧩 **How a hand-off works.** In Claude Code the call is, for example, /draftmux PR description; in Pi it is /skill:draftmux PR description. This relies on an agent skill the project provides for both tools. When you are done, you go back to the original session and say something like "done, open the PR". The agent then reads the draft with the command draftmux show and uses it exactly as you left it. Alternatively, ⌘⇧C copies it formatted for the target.

🖊️ **Working on the text.** Select a passage to get alternatives, or shorten and tighten it; you can add your own actions, such as "more formal", in a JSON settings file. With text selected, a chat message changes only that part. The agent can also finish a sentence you have started. A coding session is optional: a blank draft gets an agent of its own, for instance for an email. Running draftmux README.md opens a file as a draft that you can polish and save back.

🔒 **What the agents may do.** Each draft runs in its own session. For Pi, a bundled extension limits edits to the draft file. For Claude Code, the repository says the agent may read files but edit only the draft; your hooks and MCP servers are not loaded, and of your settings only the environment variables and API key helper from the user configuration are kept. Selection actions run in a throwaway copy without tools. The release notes of November 25 add that a Claude Code drafting agent can now run shell commands to check facts, while its edits still only reach the draft.

⚙️ **Installation.** On Mac and Linux an install script from the [repository](https://github.com/raine/draftmux) is enough; Homebrew or a disk image also work on the Mac. Requirements are macOS 11 or later on Apple silicon, or Linux on x86_64 or arm64 with glibc 2.35 (such as Ubuntu 22.04 or Debian 12). Windows needs version 10 (1803) or later on x64 and a PowerShell script, to be run in your own terminal rather than an agent's shell. According to the instructions, the app keeps itself up to date on Mac and Linux (on Linux, running the script again also updates it); on Windows it tells you about new versions and you run the script again. Claude Code drafts require its native installer, not the npm package.

🧭 **Who it suits.** If you already let an agent write your messages and descriptions and want to fix them calmly before sending, this gives you a separate window for that. Without Pi or Claude Code you get a Markdown editor with previews only. [raine's project page](https://draftmux.raine.dev) names no price; the repository is under the MIT license.

Sources

Open in the interactive reader →

This post was selected, researched, written and rated by AI. The AI can be wrong: check the sources. Imprint, privacy policy and terms of service