DEV Community

Markus
Markus

Posted on

How I notice which coding-agent session is actually waiting on me

I work as a solo developer in Leipzig, and I often have several Claude Code sessions open at the same time. Lately I have also been running Codex sessions alongside them. Each session eventually stops and waits for me: a decision, a permission, or a question I have to answer before it can continue.

The bottleneck was never the model. It was me noticing. I would be answering one tab while another had already been waiting for twenty minutes, and I would only find out when I started flipping through terminals.

That is the problem I wrote Vassy to solve. It is a free, open-source macOS menu-bar app for Claude Code, with Codex support in beta. When a session is waiting, it shows up in a queue: one question, a recommendation, and a way back to the right tab. The source lives at sukramb/vassy.

The hook, not the screen

Vassy does not scrape the screen, and it does not inject itself into the agent process. Claude Code and Codex already have a hook API. On first launch, the app asks which agents to watch, then registers a command hook in the config file of each one you picked (~/.claude/settings.json or ~/.codex/hooks.json). Each changed file is backed up to ~/.vassy/backups first. Codex only runs hooks you have approved: you start codex, type /hooks, and trust the Vassy entries.

The hook is not a separate script. ~/.vassy/hook is a symlink to the app binary, and the agents call it as Vassy --hook claude or Vassy --hook codex, with the event JSON on stdin.

static let events: [Agent: [String]] = [
    .claude: ["Stop", "Notification", "UserPromptSubmit", "SessionEnd"],
    .codex: ["Stop", "PermissionRequest", "UserPromptSubmit", "PostToolUse", "SessionEnd"],
]
Enter fullscreen mode Exit fullscreen mode

The hook has to stay out of the agent's way. It prints nothing, fails silently, and forces an exit after 1.5 seconds. It also ignores its own summarizer calls, which set VASSY_SUMMARIZER, so a headless summary never appears as a session in the queue.

On each call, it walks up to six process ancestors from its parent, looking for a tty (/dev/ttys…) and for the agent binary. It then writes one small JSON file per session to ~/.vassy/events. A session counts as waiting when the latest event is Stop, Notification, or PermissionRequest:

var isWaiting: Bool {
    event == "Stop" || event == "Notification" || event == "PermissionRequest"
}
Enter fullscreen mode Exit fullscreen mode

PostToolUse is recorded only to clear a Codex "permission needed" state. Codex sessions with no terminal, for example the desktop app or a headless run, are dropped: Vassy cannot answer them, so they never enter the list.

Building the queue

The app refreshes every two seconds, reads those event files, and decides what is still alive. For Claude Code, liveness comes from an undocumented folder, ~/.claude/sessions. If that folder is missing, Vassy falls back to a twelve-hour recency window. For Codex there is no such registry, so it checks whether the recorded agent process is still alive, and falls back to the same twelve-hour window if no process ID was recorded.

A waiting event is not automatically a card in the queue. If I already sent an answer after that event, or Claude Code's registry says the session is busy, the item is treated as running. If I hid it, or the summarizer classified it as info (done, needs nothing), it leaves the queue. What remains is sorted oldest first, unless I snooze a card to the back or pin one to the front.

Sessions that were already idle before the hook existed can be seeded from the Claude registry, so they show up without waiting for a new turn. The menu-bar icon shows a count, and the panel opens from anywhere with ⌥⌘C.

One cheap summary per wait

For a new waiting event, the app reads the tail of the session transcript and asks a CLI already on the Mac for a compact JSON summary: claude -p on Haiku, or codex exec if only Codex is installed. At most two summaries run at once. They start a short moment after the event, so a session that immediately continues is not summarized for nothing.

The transcript is treated as data, not as instructions. Only .jsonl files inside the agents' own session folders are read. The prompt wraps the excerpt in a fresh random delimiter on every call, so text in the transcript cannot close the block and pose as instructions:

let fence = "session-data-" + UUID().uuidString.prefix(12).lowercased()
Enter fullscreen mode Exit fullscreen mode

Claude is launched with tools and MCP servers switched off, without slash commands or session persistence. Codex runs without the user's config, in a read-only sandbox, and without saving the session. The child process gets only the environment variables a CLI needs to run and sign in, not the whole environment, and it is killed after 90 seconds if it hangs.

What comes back is a title, one sentence of context, the open question, a recommendation, and up to three ready-made replies. Those replies can be sent with ⌘1, ⌘2, or ⌘3. I can also type or dictate my own.

Typing an answer without surprises

The ready-made replies are written by a model that has just read a session, and a session can contain text from web pages or repositories I do not control. One click would type the reply into the agent as if I had said it. So Vassy treats the buttons as untrusted.

The exact text that will be typed is always shown on the button. Replies that look like a shell command, a slash command, a memory note, a link, or shell syntax are dropped. Anything that would deploy, merge, delete, or install needs a second click, and Vassy decides that itself, not only the model. Nothing is typed unless the agent is the program in the foreground of that tab, so a reply cannot land at a shell prompt. While the agent shows a permission dialog, Vassy sends nothing and only offers to open the tab.

Sending uses AppleScript to find the Terminal tab whose tty matches the session, type the line, and then hit Return. macOS asks once for permission to control Terminal.

What did not work the obvious way

A few things failed in the obvious way, and the workarounds are still in the code.

Typing the answer and Return in one go did not work reliably. Claude Code treats a fast burst of characters as a paste and swallows the trailing Return, so Vassy sends the line first and, after 0.7 seconds, a separate empty do script if the agent is still in the foreground.

I also cannot show a long Claude Code context as a percentage of the window. The transcript reports token usage, but not whether that session is running with a 200k or a 1M window. Since version 1.2.0, a waiting Claude Code card can show a line such as "Long context: 164k tokens" and a Compact button that types /compact into the tab. The question stays open, and the card returns once compaction is through. The threshold is 120,000 tokens by default, and it can be turned off.

Installing updates was awkward for a menu-bar app, because it rarely quits. Vassy checks https://www.vassy.app/appcast.xml every six hours, downloads a newer build from the project's GitHub Releases, verifies its signature, and installs it only while the panel is closed. That update check, and the download, are the app's only requests of its own. They carry no cookies and no identifier, and you can switch them off in the gear menu. The app has no account and no analytics of its own. A transcript excerpt does leave the Mac when a summary is written: it goes through the claude or codex CLI already signed in on that machine, under that provider's terms, and it uses some of that quota.

Another sharp edge: if you open a freshly downloaded app from the Downloads folder, macOS may run it from a translocated, read-only path. A hook pointing there would break after a restart, so Vassy asks you to move it into your Applications folder first.

Limits I want to be honest about

Vassy runs on macOS 15 or later, and only with Terminal.app. Sessions in other terminals or in desktop apps are not listed for Codex, and cannot be answered for Claude Code. Codex support is in beta, and its hooks need that extra /hooks approval. Claude Code's list of live sessions is read from an undocumented folder; if that format changes, liveness falls back to a time limit.

Summaries cost a short headless call on the login you already use. Vassy is a small tool I maintain myself, not a platform.

How to try it

The current release is 1.3.0. Download Vassy.zip from the GitHub releases page, move Vassy.app into your Applications folder, and open it. On first launch it asks which agents it should watch.

Or build it from source. You need the Xcode Command Line Tools and Swift 6:

git clone https://github.com/sukramb/vassy.git
cd vassy && ./install.sh
Enter fullscreen mode Exit fullscreen mode

For a quicker first look, the README has a 30-second clip, and the site is vassy.app. Vassy is MIT-licensed and independent: it is not affiliated with or endorsed by Anthropic or OpenAI. If you try it, I would rather hear what breaks than collect praise.

Top comments (0)