I use Claude Code most of the day (Codex CLI too), and three small things kept getting in my way.
The first one: I'm halfway through writing my next prompt while Claude is still working on the last one. Then I notice it heading the wrong way, or I realise I need to ask something quick first. My draft is sitting in the input box. I either delete it and retype it later, or copy it into a notes app and paste it back. Claude Code's Ctrl+S helps a little, but it holds one draft and loses it when the session ends.
The second one is less about code. When I'm building something, thoughts keep showing up while Claude is busy: "we should add this feature", "this screen could work differently", "look into that later". I don't want to interrupt what Claude is doing, and I don't want to lose them.
And the third: the prompts I reuse all the time, like "review my staged changes for bugs and missing tests". I had them saved in a notes file, but getting to one meant switching windows, finding it, copying, coming back, pasting.
So I built prompt-shelf.
What it does
You run claude (or codex) as usual. Two keys get added, and they cover three situations.
A draft that has to wait. You're mid-prompt and need to steer Claude first. Ctrl+F, Enter: the draft is parked and the box is clear. Later, Ctrl+Q opens a list right above the input box. Pick the draft, press Enter, and it's back in the box. Park as many as you like; they survive closing the session.
A thought you don't want to lose. "We should add this feature." "This screen could work differently." Type it into the box, press Ctrl+F, use ←→ to pick a list like "Ideas" or "To explore", and press Enter. It's off your mind and out of Claude's way, and it's waiting in that list whenever you open Ctrl+Q.
A prompt you use again and again. Put it on a list like "Common". When you need it: Ctrl+Q, pick it, Enter. It goes in the box and stays on the list for next time.
You can make your own lists, rename them (r) and delete them (D) right from the Ctrl+Q view. There's also a Skills tab showing the skills Claude can use in the current folder. Parked drafts are kept per repo, and lists are the same in every repo.
How it works
Neither Claude Code nor Codex gives you an API for the input box, so prompt-shelf sits in between. claude resolves to a small shim that starts the real binary inside a pseudo-terminal (node-pty). Your keystrokes and its output pass straight through, so the agent behaves exactly as it would on its own.
On the side, prompt-shelf keeps its own copy of the screen with a headless xterm. When you press Ctrl+F, a small adapter for that agent finds the input box in the copy and reads the text out of it. Putting a draft back is just a normal paste. Nothing is ever sent to the agent for you.
What was harder than expected
The agents redraw their UI constantly, and every assumption about what the input box looks like breaks sooner or later: a placeholder that looks like text, a long paste shown as "[Pasted text #1 +12 lines]", a line wrapped across two rows. Unit tests didn't catch most of it. What worked was driving real Claude Code and Codex sessions from a script, pressing the real keys and checking what's on screen.
Try it
npm i -g prompt-shelf && stash enable
Or with Homebrew: brew install sourabhshegane/tap/prompt-shelf, then stash enable. Open a new terminal tab and run claude or codex as usual. It's free, MIT licensed, and tested on macOS.
Code and docs: https://github.com/sourabhshegane/prompt-shelf
How do you handle this today? If there's a built-in way I've missed, or something you'd want it to do, I'd like to hear it.

Top comments (0)