Help us shape the future of Go! Take the 2026 Go Developer Survey

unsent

command module
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2026 License: GPL-3.0 Imports: 36 Imported by: 0

README

unsent

Release CI License Coverage

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.
  • Adds context to Claude Code messages: what the agent had just said or asked when you answered, read from its transcript.
  • Imports the messages you sent to Claude Code in the last year into the sent log, once, with unsent import claude.
  • 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

The full documentation is at geiserx.github.io/unsent.

  • Getting started: Homebrew, Go, release binaries, and the first run
  • Configuration: every environment variable, and how to turn unsent off for a while
  • Using unsent: setup, recovering drafts, JSON output, the Claude Code hook, what differs in Codex, agy and pi
  • Sent messages: the sent log and its JSON shape
  • Context: what each sent message answered, the one-off import, and the Stop hook
  • Your zsh command line: the half-typed command line, and what is never saved
  • Supported agents: which agent versions were checked, and how
  • How it works: the mechanism, the one promise, and where drafts live
  • Limits: what the screen cannot carry, agent by agent
  • Development: tests, capturing fixtures, releasing and the spec

License

GPL-3.0-or-later

Documentation

Overview

Command unsent is AutoRecover for AI agent prompts: it keeps the text you are typing into Claude Code saved on disk, so a closed window, a crash or a reboot never takes an unsent message with it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL