unsent
AutoRecover for your AI agent prompts.
unsent saves text you have typed and not sent yet, in two places: the input box of a coding agent that runs in your terminal, and the command line at your shell prompt. Today that means Claude Code, Codex, pi, agy and zsh. Those agents save your conversations, not the message you haven't sent yet, so a closed window, a reboot, a crash or one Ctrl+C too many loses the prompt.
The next time you start the agent in that folder, unsent tells you what it kept:
unsent: recovered a draft from 18:42 today, 23 lines. Run `unsent restore` to copy it.
Features
- Saves the agent's input box as you type, every 0.4 seconds, with atomic writes that survive a power cut.
- Puts a draft back into the box when you reopen its Claude Code, Codex or agy conversation. Nothing is sent for you.
- Recovers long drafts that scroll inside the box, and big pastes shown as placeholders.
- Keeps a log of the messages you sent, and a history of drafts you cleared or replaced.
- Saves your half-typed zsh command line too.
list --json, show --json and log --json for scripts and agents.
- Works in any terminal app, tmux and SSH. Drafts stay on your machine;
unsent makes no network connections.
- Says so when it could not read an agent's box, instead of failing silently.
Quick start
brew tap GeiserX/unsent && brew trust --formula GeiserX/unsent/unsent && brew install unsent # or: go install github.com/GeiserX/unsent@latest
unsent setup # from the next shell, your agents run through unsent
unsent restore # after a crash: copy the newest draft to the clipboard
Release binaries and the first run in detail: Getting started.
Documentation
- Getting started: Homebrew, Go, release binaries, and the first run
- Supported agents: which agent versions were checked, and how
- Using unsent: setup, recovering drafts, JSON output, the Claude Code hook, what differs in Codex and pi
- Sent messages: the sent log and its JSON shape
- Your zsh command line
- How it works: the mechanism, the one promise, and where drafts live
- Limits
- Development: tests, capturing fixtures, releasing, and the spec
License
GPL-3.0-or-later