Dev.to AI 🤖 Ai 👁 0 📖 3 min read

Answer Claude Code approvals from the MacBook notch

Originally published at hushtop.app. Claude Code stops for a "yes" while you're in another window, and nothing tells you. I built a small Mac app that registers Claude Code's own permission hook and shows the request in

Answer Claude Code approvals from the MacBook notch

Originally published at hushtop.app.

Claude Code stops for a "yes" while you're in another window, and nothing tells you. I built a small Mac app that registers Claude Code's own permission hook and shows the request in the MacBook notch, so you look up, answer, and go back. It never allows anything on its own, and if the app is off, Claude asks in the terminal as usual. This post is about how that works, because the hook protocol is the interesting part and you could wire it to anything.

The wait

Running a coding agent is twenty minutes of silence, then a three-second question. Miss the question and the three seconds quietly become another twenty minutes. Notifications get buried. A second monitor is one more place you aren't looking. Auto-approving everything is tempting until you think about what "everything" includes.

The one spot on a MacBook you always see is the notch. That's where the question goes now.

What you see

The Dev panel in the notch: Claude Code and Codex limits, sessions, and the one that needs you first

When Claude Code asks for permission, the notch grows and shows the request: the command it wants to run, the file it wants to edit, the question it's asking, or the plan it wants approved, with its steps and the files it touches. You answer there. Allow and Deny go straight back to Claude. Answer in terminal hands it back and jumps to the session, including the exact tmux pane. Allow all clears a batch of ordinary requests, but never a question, a plan or a risky command.

If you answer in the terminal first, the app watches the session transcript and withdraws the prompt from the notch.

The same panel lists every Claude Code and Codex session, the one that needs you first, and your 5-hour and weekly limits, with a warning at 75% and 90%.

How it works

Claude Code has a PermissionRequest hook. Hushtop adds one entry to ~/.claude/settings.json that runs a small helper shipped inside the app:

if [ -x '/Applications/Hushtop.app/Contents/Helpers/mynotch-statusline' ]; then exec '/Applications/Hushtop.app/Contents/Helpers/mynotch-statusline' claude-ask; fi # mynotch-ask

The helper reads the request JSON from stdin, sends it over a local Unix socket to the app, waits for your decision, and prints it as the hook's output. That's the whole protocol.

  • The hook's timeout is 600 seconds. No answer, and the helper says nothing, so Claude asks in the terminal.
  • App not running, or the feature off: the helper says nothing, Claude asks in the terminal.
  • There is no automatic allow and no automatic deny. Every decision is yours.
  • Move or delete the app and the [ -x … ] guard makes the hook inert.

Every change to settings.json is shown as a diff before it's written, a backup is kept, and Remove puts the file back. The exact entries, including the three small session hooks (Notification, Stop, UserPromptSubmit) that only write a tiny JSON file into the app's own folder, are public with removal notes: github.com/FarhanRiuzaki/hushtop-hooks.

Codex too

Codex reads hooks in Claude's shape from ~/.codex/hooks.json and sends the same request, so it connects the same way; Codex asks you to trust the new hook once. One difference: Codex shows nothing in its terminal while a hook waits, so the wait is shorter (two minutes), then Codex asks there.

Awake while it works, asleep when it's done

Keep awake's automatic mode keeps the Mac awake while an agent or a build is still running and releases it three minutes after the last one exits, lid closed included. No laptop that stayed on all night because a session ended at 11 PM.

The rest of the notch

Once that spot was useful, other things moved in: what's playing with synced lyrics, the next meeting with a Join button, AirPods battery per bud, a drop shelf with AirDrop, clipboard history, Mac vitals. Every module is optional, so it can stay as small as "tell me when Claude needs me".

Native Swift, Apple silicon, macOS 15 or later. No account and no telemetry; the only network calls are the license check, the update check, and lyrics if you turn them on. Free for 7 days, then one payment ($9.99). hushtop.app

I'm Farhan, an IT architect at a bank in Jakarta by day; this is the evening project. If you run agents on a laptop, I'm curious how you find out they're waiting: notifications, a second monitor, or "eventually"?

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.