I kept walking back to check if Claude Code needed me, so I made my locked Mac glow when it does
一位开发者创建了一个解决方案,以便在他们离开Mac时,当Claude Code或其他AI代理(如Codex、Gemini CLI、Cursor、Copilot CLI和Aider)需要关注时能收到通知。该解决方案涉及一个命令,该命令将通知和停止钩子写入~/.claude/settings.json。这些钩子运行“lockpaw ping”,应用程序通过分布式通知监听此ping,从而在代理需要交互时使Mac发光,而无需在应用程序未运行时启动它。
- 发布
- 2026年9月6日 13:20
- 来源类型
- 开发者社区
- 档位
- 社区
- 信源状态
- 正常
时间以 UTC 显示
更多信息
If you leave Claude Code running and step away, you know the walk. Back to the desk, wiggle the mouse, nothing, walk away again.
So I built Lockpaw, a small menu bar app for macOS. One hotkey covers the screen without putting the Mac to sleep, so the agent keeps running. When Claude hits a permission prompt or finishes, the covered screen glows. You can see it from the kitchen.
It is silent by default because I work in an open office. The glow is the signal. Touch ID to unlock. Native Swift, about 10 MB, no analytics, free and open source (MIT).
How it hooks into Claude Code. One command writes a Notification hook (matching permission and idle prompts) and a Stop hook into ~/.claude/settings.json. Both just run lockpaw ping. The app listens on a distributed notification, so a ping never launches the app when it is not running, and it backs up your settings file before touching it. The same command works for Codex, Gemini CLI, Cursor, Copilot CLI and Aider.
How Claude Code helped build it. Most of the app was written in Claude Code sessions. The parts it got right that I would have struggled with alone: the CGEventTap on a background thread (Carbon hotkeys are unreliable in menu-bar-only apps), the inside-out codesigning order for Sparkle, and this week a bug where Cmd+Q reached the app during the Touch ID password sheet. macOS turns on secure input there, which hides keystrokes from the event tap. Claude Code found the secure-input cause and wrote the quit guard, I reviewed and shipped it. The repo has a CLAUDE.md that carries all of those decisions, which is how each session picks up where the last one stopped.
A user sent a PR last month that fades the screen to pure black after a few minutes so OLED panels are safe while the agent works. That was a good day.
What do you do today when you walk away from a running agent? Curious whether people just leave the screen up.