Skip to content

About

Claude Code sessions in the macOS menu bar: status, alerts, and permission prompts in a Liquid Glass panel

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Watch

Your Claude Code sessions in the macOS menu bar — see what every session is doing, get told when one needs you, and answer permission prompts without switching windows. The idea of Codex Pets, done as a native menu bar item with a Liquid Glass panel.

Unofficial community project; not affiliated with or endorsed by Anthropic.

What it does

  • Menu bar item — a monochrome ✦ and the number of active sessions, like the system's own items. It turns orange when a session needs input, green when one is ready, red when one is blocked.
  • Liquid Glass panel — click the item for one row per session: state, title, latest progress ("Editing auth.ts", "Running npm test"), and elapsed time. Click a row to jump back to that session: the exact Claude desktop session (via claude://code/continue?session=…), or the terminal/IDE a CLI session runs in. Opening a finished row clears it; Clear clears them all.
  • Alerts — when a session starts needing you, the panel drops down on its own for 4 seconds.
  • Permission prompts — when Claude asks to run a command, read a file or fetch a URL, the panel drops down with the whole request and Deny · Always Allow · Allow Once, and stays until you answer or click elsewhere. Claude shows its own dialog at the same time and takes whichever answer comes first, so either place works. Edits, MCP tools and requests too long to show whole (see Security) are shown but must be answered in Claude.
  • Everything else that waits for you — questions, plan reviews, an MCP server asking for input, sandboxed network access, and the desktop app's next-step questions (with their choices) show the session as needing you, not as finished. Answer those in Claude; clicking the row opens the session.
  • /watch — toggles the item; /watch on, /watch off, /watch status.
  • Phone approval (optional) — answer those permission prompts from your phone, through a Telegram bot that only you control: Allow once · Deny on the message. Off until you set it up; see Phone approval.

Requirements

  • macOS 26 or later (Liquid Glass)
  • Xcode Command Line Tools (xcode-select --install) to build
  • Claude Code — the desktop app, the CLI, or an IDE extension
  • A Telegram account, only if you want phone approval

Install

git clone https://github.com/sueun-dev/claude-watch.git
cd claude-watch
scripts/install.sh

The installer builds the app into ~/.claude-watch, adds the /watch command, and adds one hook entry per Claude Code event to ~/.claude/settings.json (backed up first as settings.json.claude-watch-backup). To remove everything it added:

scripts/uninstall.sh            # hooks and /watch
scripts/uninstall.sh --purge    # also the app and its state in ~/.claude-watch

Everything stays on your Mac: no network access, no analytics — unless you turn on phone approval.

Phone approval (optional)

Answer a permission prompt from your phone instead of walking back to the Mac. It uses a Telegram bot that only you control, and it is off until you set it up:

  1. In Telegram, message @BotFather, send /newbot, and copy the token.
  2. In a terminal, run ~/.claude-watch/bin/claude-watch phone setup. Paste the token (it isn't shown), then send the bot the /pair 123456 line it prints. That ties the bot to your Telegram account and nobody else's.
  3. Run ~/.claude-watch/bin/claude-watch phone test to send a harmless request to your phone and check the whole path.

From then on, while Claude Watch is on (/watch on), every permission prompt the panel can show also arrives as a message with Allow once and Deny. Whichever you answer first wins, on the phone or on the Mac, and the message shrinks to a one-line outcome. Everything else that waits for you (a request too long to show whole, a question, a plan review, an MCP form, a next-step question with its choices) arrives as a notice without buttons: answer those in Claude. Always Allow stays on the Mac.

claude-watch phone setup | on | off | status | test | remove

Security

Answering permission prompts outside Claude must not become a way around them.

  • Only Claude Watch can answer. The panel's answer reaches the waiting hook over a Unix socket, never a file. The hook accepts it only from a process running the Claude Watch executable — signed with the hardened runtime, so nothing can be injected into it — and only if that process then echoes a one-time challenge, which a process that connects and only afterwards turns into Claude Watch (exec) cannot do. The release build has no command-line way to answer.
  • Only what you saw. Buttons appear only when the panel can show the whole request: a shell command, a file to read or a URL, at most 1,500 characters and 30 lines, with no control or invisible formatting characters and no long runs of spaces. Each answer names the exact request it was given for, and the hook refuses it if that differs from what Claude asked — so editing the session file the panel reads can't redirect your click. Edits (whose diff the panel can't show), MCP tools and everything else must be answered in Claude.
  • Read-only install, private state. The installed app and hook binary are read-only, so an agent that can write files can't swap in a hook that approves everything; ~/.claude-watch is readable only by you (700/600).

What no local helper can do is stop code that already runs as you without asking: an agent allowed to run arbitrary programs could change Claude Code's own settings. Claude Watch doesn't widen that; keep such permissions narrow.

Phone approval

The phone is a second place to answer, so it follows the same rules and adds its own:

  • Only your account, only Claude Watch's message. A press counts only if it comes from the account you paired, on the message Claude Watch sent for that request, still reading as it was sent. Someone who gets hold of the bot token can send messages as the bot, but can't approve anything by pressing a look-alike message or by editing the text of a real one.
  • Only what you can see. The phone gets the same all-or-nothing rule as the panel, and only Allow once and Deny. Always Allow never works from the phone.
  • Opt-in, and quiet. Nothing runs until you set it up, and Claude Watch contacts Telegram only while a request is waiting. Setup needs a terminal, so an agent can't point it at a bot of its own.
  • What leaves the Mac. While a request is open: its text (command, path or URL) and the session title, sent to Telegram. Bot messages are not end-to-end encrypted, so leave this off if that matters. Once answered, the message becomes a one-line outcome without the command.
  • What it doesn't defend against. The bot token lives in ~/.claude-watch/phone.json, owner-only like everything else there, so a program running as you could read it or rewrite the file. If your Telegram account is taken over, whoever holds it could approve a request that is waiting at that moment (each lasts about 10 minutes at most). phone remove deletes the token; send /revoke to @BotFather to kill it everywhere.

How it works

Claude Code ──hook event (JSON)──▶ claude-watch hook ──writes──▶ ~/.claude-watch/sessions/<id>.json
                                         ▲                                │
                 prompts/<id>.sock ──────┘                                │ kqueue file watch
                 (Allow / Deny)                                           ▼
/watch, Hide ──▶ config.json ─────────────────────────────▶ menu bar item + Liquid Glass panel
  • One binary, two roles. With no arguments it is the menu bar app; with a command it is the CLI that Claude Code's hooks call.
  • No polling. The app watches ~/.claude-watch with kqueue and reacts to file changes; a 15 s timer only ages out stale sessions. The menu bar label redraws only when its icon or count changes, and the panel's rows only while the panel is open.
  • Permission answers. The PermissionRequest hook listens on a socket, records the prompt, and waits (up to 570 s, under its 600 s hook timeout) for the panel's answer, then prints the decision. If you answer in Claude instead, the hook sees the prompt close and exits without one.
  • Phone. With phone approval on, the app sends each open prompt to Telegram and listens for the button press (a 3 s long poll) only while one is waiting. A valid press is handed to the waiting hook exactly like a click in the panel.

Measured on Apple silicon: about 8 ms per hook event; with busy sessions and the panel closed, the app sits at about 0.1 % CPU and 20 MB of memory.

Known limitations

Claude Code doesn't tell hooks when you answer its own dialog. If you answer there, the panel's prompt clears when that command finishes, or when Claude's turn ends if you denied it. Pressing its buttons in the meantime does nothing, and the same goes for the phone message.

Some prompts never reach hooks, so nothing outside Claude can show them: the workspace trust dialog, MCP server approval at startup, and sign-in or onboarding screens. And Claude Watch can show a next-step question but not answer it: the Claude app takes no reply from another program, so clicking the row opens the session instead.

Development

scripts/build.sh            # build/ClaudeWatch.app
tests/run_tests.sh          # CLI, hook state machine and answer security, against a throwaway CLAUDE_WATCH_HOME
tests/run_phone_tests.sh    # phone approval: pairing and the bridge, against a mock Telegram (tests/mock_telegram.py)
tests/run_app_checks.sh     # the real menu bar app, driven by synthetic clicks (needs a GUI session)
Sources/
  main.swift                       CLI dispatch and app entry
  Core/Store.swift                 ~/.claude-watch files, session model, app lock and launch
  Core/AnswerChannel.swift         the socket that carries the panel's answer to the waiting hook
  Hook/HookHandler.swift           hook event → session state; waits for permission answers
  MenuBar/MenuBarController.swift  status item, dropdown panel, file watching, actions
  MenuBar/SessionViews.swift       SwiftUI: menu bar label, Liquid Glass panel, rows, prompt buttons
  Phone/PhoneBridge.swift          opt-in: open prompts → Telegram messages, button presses → answers
  Phone/TelegramAPI.swift          the few Bot API calls Claude Watch makes; the token is never logged
  Phone/PhoneCommand.swift         claude-watch phone setup | on | off | status | test | remove
  Phone/PhoneConfig.swift          ~/.claude-watch/phone.json
commands/watch.md                    the /watch slash command
scripts/                           build, install, uninstall
tests/                             run_tests.sh, run_phone_tests.sh, run_app_checks.sh, mock_telegram.py, app_checks/

License

MIT

About

Claude Code sessions in the macOS menu bar: status, alerts, and permission prompts in a Liquid Glass panel

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages