My working day ran through four command-line tools I had written. One makes a parallel checkout of a three-repo frontend. One runs it against a test environment and logs in. One deploys. One finds stray node processes and kills them as trees. Each lived in its own terminal tab.
Next to them sat the Claude sessions in iTerm, and they kept multiplying. When one stopped to ask for permission, nothing told me. I found out by clicking through tabs.
The console is an Electron app with six tabs on ⌘1 to ⌘6: Workspaces, Sessions, Logins, Processes, Deploy and Knowledge. Claude sessions live in the same window, with a card when one needs an answer and a notification when I’m looking elsewhere. One rule is written into the app: nothing commits, pushes or deploys without a click from me.
Agents wrote most of the code, under my direction. The app is 86 files and 12,663 lines, built in 20 commits between August 22 and October 7, 2026, and it went from v1.0 to v1.9 in three days. The decisions in this article were mine.
The CLIs became libraries
I didn’t rewrite the tools for the app. The main process imports them as TypeScript libraries through Vite aliases: the workspace library, the process scan and the dev-env modules, behind 18 small services. The deploy CLI stays a bash script, and the app spawns it.
The page and Node only meet in the preload script, and it is 13 lines long. It exposes a generic invoke and on, nothing else. Behind it are 79 request channels, kept in one handlers record, and 17 channels the main process pushes on.
Long-running work doesn’t belong to the window. Dev servers are spawned detached, with their output going to a log file, and unref()’d, so they outlive the app. The log panel tails that file every 500 ms. A deploy is the opposite: it is piped, streamed into the Deploy tab, and Cancel sends it SIGINT.
First try: read the screen
The first version put a real terminal in the window and read it. node-pty ran Claude, with a 400 KB ring buffer, and a headless copy of xterm kept a mirror of the screen. When the output had been quiet for 400 ms, I read the visible rows and guessed: busy, waiting, or asking. An Allow button typed a 1.
It worked most of the time, which was the problem. A long pause in a build looked like a question. A question that scrolled off the screen looked like nothing. Every bug was the same bug. I was reading pixels and calling it state.
The rest of that version was guessing too. To learn a new session’s id, the app polled for the newest transcript file every 1.5 seconds, up to 40 times. And the environment had to be scrubbed of the marker that tells the CLI it is running inside another Claude session. Left in, it turns off transcript saving, and the app found its sessions through their transcripts.
That was v1.3 to v1.5.
Second try: typed events
Since v1.6 the main path is the Claude Agent SDK. In streaming-input mode, query() takes a pushable AsyncIterable as its prompt. One Claude process stays alive per conversation, and each new message is pushed into it. What comes back is typed: an assistant message, a tool use, a result. Nothing has to be read off a screen.
The rest followed from that. Permission mode, model, effort and interrupt can all change in the middle of a session. The model list and the slash commands come from the SDK’s initialization result, so the app never hard-codes them. A message I type mid-turn is queued and sent when the turn ends.
The terminal path is still there for sessions where I want the full TUI. It just isn’t how the app knows what’s going on.
One promise, three processes
Knowing who was waiting on me was the reason for the whole app, and the SDK reduces it to one callback. canUseTool is called when a tool needs permission, and it returns a promise. Mine doesn’t decide anything. It parks the promise’s resolver in a map, sends the window a card, and waits.
const pending = new Map<string, (d: Decision) => void>()
const session = query({
prompt: inputQueue, // pushable AsyncIterable
options: {
canUseTool: (tool, input) => new Promise(resolve => {
const id = newId(); pending.set(id, resolve)
send("permission", { id, tool, input }) // the window shows a card
}),
},
})
ipc.handle("agent:decide", (_e, id, decision) => {
pending.get(id)?.(decision); pending.delete(id)
})
Three processes take part: the Claude process that wants to run a tool, the main process holding the map, and the window showing the card. All they share is an id. The promise can wait a second or an hour, and nothing polls.
Because the map is keyed by id, several sessions can wait at once, and I answer them in any order. When a session goes from busy to idle, or from busy to asking, and no window of the app has focus, a notification goes out. That was the problem I started with.
The sketch is simplified. A real decision is allow, with the tool’s input, or deny, with a message the agent reads.
Use the CLI’s own files
The app has no session store of its own. Sessions are the CLI’s transcript files, so a conversation started in the app can be resumed in the terminal, and the other way round. Renaming a session writes a title line into the same file.
I tried two ideas and threw them out: grouping sessions in the sidebar (twice), and a message bus between sessions. The SDK’s own messaging between sessions already worked.
The app uses 11 of about 60 SDK options, 6 of its 27 methods and none of its 31 hooks.
Two surprises are worth passing on. Grep and Glob were hidden from the agent unless I listed them in the tools option. And for a while assistant messages showed up twice, because thinking blocks shifted the block index in the stream. The fix is held in place by a test that replays a recorded stream, so it can’t come back quietly.
Your PATH isn’t your shell’s
An app launched from the Dock doesn’t get your shell’s environment. nvm, Homebrew and anything else your shell profile adds to PATH are missing.
The fix is to ask a login shell: zsh -ilc env. That takes 2 to 3 seconds, too slow for every launch, so the result is cached to disk with mode 600 and refreshed in the background. Two more details mattered. npm_* variables are stripped, because they break nvm. And the fallback paths go after the captured PATH, never before it.
Hidden tabs keep their size
Tabs stay mounted when you switch away, so a terminal keeps its scrollback. My first version hid them with display: none. The terminal’s fit addon then measured a box with no size and shrank the pty to 2 columns, and everything inside reflowed to fit.
Hidden tabs now use visibility: hidden plus inert. They keep their size, and they leave the focus order. Anything that polls runs only in the active tab.
A tiling tree, drawn flat
Sessions and file panes share a tiling window manager. The layout is a binary split tree, and the obvious way to draw it is one div per split. But React keys only hold among siblings. Split a pane, or close its neighbour, and its parent changes, so React throws the pane away and builds a new one. A rebuilt terminal has lost its scrollback.
Since v2.2 the tree is drawn flat. Every pane is an absolutely positioned sibling with a rectangle computed from the tree, keyed by its id. Splitting adds one sibling and moves the others. Nothing remounts.
The counters are real. Both sides are small React trees, and each pane counts its own mounts.
The window manager’s classes also collided with an existing .row. Everything it owns now starts with wm-.
The watcher that watched itself
File panes update live. One recursive fs.watch is shared by reference count. Changes are batched every 150 ms, and a batch of more than 400 paths becomes a single “a lot changed”. Inside .git, only the index and HEAD count. Git status is debounced by 600 ms, and never waits longer than 2 seconds.
The first version spun. Running git status can refresh the index, which writes .git/index. The watcher saw that write and refreshed the panel, which ran git status again. Setting GIT_OPTIONAL_LOCKS=0 for those calls tells git to skip that optional write, so looking at the repo is no longer a change to it.
With the loop gone, a file written on disk reaches the DOM in about 170 ms.
Keeping it fast
To check this without me, the app has a smoke harness driven by environment variables. It runs JavaScript in the window, takes screenshots with capturePage, and picks the cheapest model by its label rather than its place in a dropdown.
What’s wrong with it
I wrote this into the app’s own repo: the console is organised around directories, but my work is organised around tickets. A checkout is a folder. A task is a ticket, and one ticket touches a checkout, a few sessions, a login and, at the end, a deploy. The app leaves me to join those up in my head.
So the list of what’s missing is short and specific. A “today” screen. A trust surface that shows each session’s context used and cost. Packaging. And a loop that runs from the ticket to the deploy.
Part of that loop already exists. It lives in Claude Code skills, not in this window.