{"slug": "show-hn-bulchimbeon-a-night-watch-keep-your-mac-awake-while-ai-agents-work", "title": "Show HN: Bulchimbeon, a night watch keep your Mac awake while AI agents work", "summary": "Developer s3onghyun released Bulchimbeon, a macOS menu bar app that keeps a Mac awake only while AI coding agents are actively working, then releases the sleep block when they finish. Bulchimbeon 0.12.6 and later is signed with a Developer ID and notarized by Apple, installs via the Homebrew cask s3onghyun/tap/bulchimbeon, requires macOS 13 or later, and supports Claude Code, Codex, Gemini CLI, Cursor Agent, Copilot CLI, Aider and OpenCode, with a separate Linux daemon offering the same function. The app uses no hooks, daemon or installed root helper, and a --diagnose flag reports what it detects.", "body_md": "**Your Mac's night-watch soldier.**\nA menu bar app that keeps your Mac awake **only while your AI coding agents are actually working**,\nthen salutes *\"Shift over!\"* and lets it sleep.\n\n**No hooks, no daemon, no installed root helper. One app. macOS 13 and later.**\nOn Linux, a small daemon with a command line and a tray icon does the same job: see [Linux](#linux).\n\n*Bulchimbeon* (불침번) is the night-watch duty in the Korean army: someone stays up all night so everyone else can sleep.\nA pixel-art private takes that shift for your Mac.\n\n🌐 [한국어](https://github.com/s3onghyun/bulchimbeon/blob/main/README.ko.md) · [日本語](https://github.com/s3onghyun/bulchimbeon/blob/main/README.ja.md) · [简体中文](https://github.com/s3onghyun/bulchimbeon/blob/main/README.zh-CN.md)\n💡 [Ideas / 문의 / 建议](https://github.com/s3onghyun/bulchimbeon/discussions)\n🗳️ **Which agent do you use it with? Where did you get stuck?** [Vote and tell us](https://github.com/s3onghyun/bulchimbeon/discussions/64)\n\nInstall: `brew install --cask s3onghyun/tap/bulchimbeon` — or [download the latest macOS zip](https://github.com/s3onghyun/bulchimbeon/releases) and move it to `/Applications`.\n\n**First launch:** from 0.12.6 the app is signed with a Developer ID and notarized by Apple, so it just opens.\nAt most, macOS asks once whether to open an app downloaded from the internet: click **Open**. When it asks whether\nBulchimbeon may send notifications, allow it; notifications then come from Bulchimbeon itself.\n\n## 0.12.5 and earlier: Open Anyway is needed once\n\nThose versions are ad-hoc signed and not notarized, so macOS blocks them once:\n\n1. Open Bulchimbeon. macOS says it can't be opened; click **Done** .\n2. Go to **System Settings → Privacy & Security** and scroll down to**Security** .\n3. Next to *\"Bulchimbeon\" was blocked* , click**Open Anyway** , then confirm.\n(Since macOS 15, right-click → Open no longer bypasses this.)\n\nTheir notifications show up as **\"Script Editor\"**, because macOS won't grant an unnotarized app notification\npermission of its own. Updating to 0.12.6 or later removes both.\n\n**Supported agents:** Claude Code · Codex · Gemini CLI · Cursor Agent · Copilot CLI · Aider · OpenCode (and your own custom agents).\n\nPaste this into Claude Code, Codex, Gemini CLI or another coding agent. The agent follows\n[docs/install-for-agents.md](https://github.com/s3onghyun/bulchimbeon/blob/main/docs/install-for-agents.md) and leaves any first-launch prompt from macOS to you.\n\n```\nInstall Bulchimbeon (https://github.com/s3onghyun/bulchimbeon) on this computer by following\nhttps://raw.githubusercontent.com/s3onghyun/bulchimbeon/main/docs/install-for-agents.md step by step. Show me each command before you run it.\nRules: install only from the Homebrew cask s3onghyun/tap/bulchimbeon or github.com/s3onghyun/bulchimbeon releases,\nand check the SHA-256 of anything you download. No sudo for the Mac app. Never remove the quarantine attribute\n(xattr) or turn off Gatekeeper (spctl): if macOS asks about or blocks the first launch, stop and let me answer it myself.\nFinish by checking with me that Agent watch is ticked in the menu.\n```\n\n1. Click the private in the menu bar and check that **🤖 Agent watch (auto shift)** is ticked. Agent watch is on by\ndefault; if you turned it off, tick it. The app remembers your choice.\n2. Give an agent a task, for example ask Claude Code to run your tests.\n3. Within a few seconds the private in the menu bar turns his flashlight on.\n4. Open the menu. Below the welcome note (shown until you click **Got it** ), the status line reads**Bulchimbeon — On duty · 0:12 · …** , and the line under it says why, such as**Claude Code working** .\n5. Nothing happens? Run `/Applications/Bulchimbeon.app/Contents/MacOS/Bulchimbeon --diagnose` to see what it\ndetects, and[tell us where you got stuck](https://github.com/s3onghyun/bulchimbeon/discussions/64) .\n\nTo see the sleep block macOS itself is holding, run `pmset -g assertions`. While on watch:\n\n```\n2026-10-31 13:17:17 +0900\nAssertion status system-wide:\n   BackgroundTask                 0\n   ApplePushServiceTask           0\n   UserIsActive                   0\n   PreventUserIdleDisplaySleep    0\n   SoftwareUpdateTask             0\n   PreventSystemSleep             0\n   ExternalMedia                  0\n   PreventUserIdleSystemSleep     1\n   NetworkClientActive            0\nListed by owning process:\n   pid 2102(Bulchimbeon): [0x002847ba00019690] 13:31:53 PreventUserIdleSystemSleep named: \"Bulchimbeon on duty: keeping AI agents awake\"\nKernel Assertions: 0x100=MAGICWAKE\n   id=592  level=255 0x100=MAGICWAKE creat=  mod= description=en0 owner=IOSkywalkNetworkBSDClient\n```\n\n- `2026-10-31 13:17:17 +0900` : when the command ran.\n- `Assertion status system-wide` : every kind of sleep block, with how many are held right now.`PreventUserIdleSystemSleep 1` means something is keeping the Mac from idle sleep.`PreventUserIdleDisplaySleep 0` means the display may still sleep, the default watch mode. With**Keep display on** , Bulchimbeon takes a display\nblock instead, so`PreventUserIdleDisplaySleep` reads 1 and Bulchimbeon's own line below shows that kind.\n- `Listed by owning process` : who holds each block.`pid 2102(Bulchimbeon)` is the app (your pid will differ),`[0x002847ba00019690]` is the block's ID, and`13:31:53` is when the watch took it. That time has no date, so it\ncan be from an earlier day and read later than the header time.`PreventUserIdleSystemSleep` is its kind\n(`PreventUserIdleDisplaySleep` with**Keep display on** ), and`named: \"Bulchimbeon on duty: keeping AI agents awake\"` is the fixed name to look for.\nOther apps holding the Mac awake would be listed here too.\n- `Kernel Assertions` : macOS's own entries (here a network wake for`en0` ), not from Bulchimbeon; yours may differ.\n\nCaptured on macOS 26.6.2, Apple Silicon, Bulchimbeon 0.11.0.\n\nWhile idle (no agent working), Bulchimbeon releases its block, so `pmset -g assertions | grep -i bulchimbeon` prints no Bulchimbeon line.\n\n**Why not just use `caffeinate` or Amphetamine?** Those are great when you want a manual, fixed wake lock. Bulchimbeon starts and ends the lock around active AI-agent work, so it does not get left on overnight.\n\n**What does it inspect or send?** It uses no hooks. Its only network request is the once-a-day [update check](#updates), which sends nothing but its version and can be turned off. It observes only your own local process metadata to decide whether a supported agent is working; it never stores or prints process command lines or environment variables.\n\n**Can it keep a closed laptop awake?** Yes, but turning on the lid-closed mode requires an administrator approval. It restores normal lid sleep when the watch ends or the app quits.\n\n| State | The private | When | \n|---|---|---|\n| 💤 Off duty | Dozing in his helmet, zzz | Nothing to guard | \n| 👀 Standing by | Looking around | Waiting for an agent to clock in | \n| 🪖 On duty | Flashlight on, on patrol | The Mac won't sleep | \n| 🫡 Shift over | `^ ^` salute | Agents went quiet / watch time is up | \n| 🥵 Combat rest | Sweating, eyes closed | The Mac is overheating | \n\nThe private patrols just under your menu bar with a flashlight. While standing by he looks around in the corner; at shift change he salutes with a speech bubble. Clicks pass straight through, he fades when your pointer comes close, and he stays out of full-screen apps (presentations, screen sharing, video). Size 2× / 3×, or turn him off.\n\n| When | He says | \n|---|---|\n| On watch | \"Won't doze off! …probably.\" · \"Sleep tight. I've got this!\" | \n| Standing by | \"Polishing my rifle… standing by.\" | \n| Mac heating up | \"Heat advisory! Hydrating 🥵\" → \"Combat rest! Cooling down 🧊\" | \n| Low battery | \"Reporting to the duty officer 🔋 Battery at 15%… out of strength, standing down. Plug in within 10 minutes and I'll stand watch again.\" | \n| Sleep block lost | \"Not AWOL! Back on post! 🫡\" | \n| You come back | \"Handover report! 📋\" | \n\nTo leave an agent running overnight I used to do this:\n\n```\ncaffeinate -d                 # ...and forget to turn it off\nsudo pmset disablesleep 1     # ...and forget to turn it back on → battery at 0%\n```\n\nBulchimbeon stays awake **only while an agent is working** and hands the Mac back to normal sleep when it's done.\n\n| Feature | What it does | \n|---|---|\n| 🤖 Agent watch | Detects Claude Code, Codex, Gemini CLI, Cursor Agent, Copilot CLI, Aider, OpenCode (plus your own). **Only counts agents that are actually working** , not sessions that are merely open. Clocks in when one starts working and hands over 5 minutes (adjustable) after everything goes quiet | \n| 🪖 Timed watch | 30 min / 1 h / 2 h / 4 h / indefinitely | \n| Watch modes | Keep display on ( `caffeinate -d` ) · Display may sleep, Mac stays awake (`caffeinate -i` ) ·**Stay awake with the lid closed** (admin) — all three sit right in the menu, one click to switch | \n| 🔋 Battery stand-down | Stands down when running on battery below your threshold (default 20%), with one heads-up 5% before it. **Plug in within 10 minutes and the same watch resumes** (a lid-closed watch asks for admin approval again) | \n|  | Restores normal lid sleep ( `disablesleep` back to off) when the watch ends, the app quits, or the Mac restarts, shuts down or logs out. If it is still off when the app next starts (after a power loss, say), that watch carries on as a system watch and the menu offers**Restore lid sleep** (one admin password) | \n| 🌡️ Heat advisory → 🔥 combat rest | Warns when the Mac heats up; when it gets critical, pauses the watch to cool down and **resumes automatically** once it cools (no more cooking a closed Mac in a bag) | \n|  | If the sleep block disappears for any reason, it is re-engaged immediately | \n| 🕵️ Watchdog | In lid-closed mode, restores normal sleep within 5 s when the app quits or the watch ends (including a timed watch running out), and at once when macOS stops it for a restart or shutdown — no second password prompt needed; re-enabling replaces rather than stacks it | \n| 📋 Night-watch handover | Come back after 10+ minutes away and get a report of what happened while you were gone | \n| 🔁 Survives restarts | Remaining watch time carries over app restarts, updates and reboots (for security, a lid-closed watch comes back as a system watch for that watch only, also when lid sleep was left off; lid mode stays selected in the menu and asks for approval again on the next watch) | \n| 🖥️ Who else is holding the Mac awake | The menu shows other apps blocking sleep, e.g. \"Vivaldi (video)\" | \n| 🌐 Korean / English / Simplified Chinese | Follows the system language by default; pick one from **언어 / Language / 语言** in the menu | \n| 📒 Duty log | `~/Library/Application Support/Bulchimbeon/duty-log.txt` | \n\n[Adrafinil](https://github.com/kageroumado/adrafinil) solves the same problem and came first. The two take opposite\napproaches, so pick the one that fits. (As of October 2026.)\n\n|  | Bulchimbeon | Adrafinil | \n|---|---|---|\n| How it knows an agent is working | **Watches from outside** : the agent's`caffeinate` child and CPU use | **The agent tells it** : hooks (acquire on prompt submit, release when the reply ends) plus observation | \n| What installing changes | **Nothing.** One app; agent config files are never touched | Hooks added to agent configs (one-click install/uninstall), a user daemon, a root helper | \n| macOS | **13 and later** | 26.4 and later | \n| Awake with the lid closed | Admin password each time you turn it on; a watchdog guarantees the setting is restored | Approved once at install, no password afterwards | \n| Agent asks to stay awake (long builds) | — | CLI and MCP tool | \n| Heat | Warns even with the lid open; when it gets too hot, rests and **resumes automatically once cool** | Force-releases on overheating while the lid is closed | \n| Distribution | Developer ID signed and notarized (from 0.12.6), personal Homebrew tap | Notarized, official Homebrew cask | \n\n**Choose Adrafinil** if you're on macOS 26.4+ and want hooks to track turns precisely, or want agents to request\nwake time themselves.\n**Choose Bulchimbeon** if you're on macOS 13–15, don't want anything installed into your agent configs or system,\nor would rather have a private on watch.\n\n```\nbrew install --cask s3onghyun/tap/bulchimbeon\n\n# Update — refresh the tap first, Homebrew's auto-update interval is long\nbrew update && brew upgrade --cask bulchimbeon\n```\n\nOr download the zip from [Releases](https://github.com/s3onghyun/bulchimbeon/releases) and move it to `/Applications`.\nmacOS 13+, universal (Apple Silicon and Intel).\n\nFirst launch: macOS blocks the app once; the steps are in [Start here](#start-here).\n\nRelease zips are built only in GitHub Actions and carry a build provenance attestation.\n\n```\ngh attestation verify Bulchimbeon-<version>.zip --repo s3onghyun/bulchimbeon\nshasum -a 256 -c Bulchimbeon-<version>.zip.sha256\n```\n\nOnce a day the app (and the Linux daemon) asks GitHub whether a newer release is out. If one is, the menu shows\n**New version X.Y.Z — Update** and **Release notes**; a release that fixes a serious bug is marked\n**(recommended: important fix)**. Nothing is downloaded or installed until you click Update and confirm.\n\n- **Installed with Homebrew:** Terminal opens and runs`brew update && brew upgrade --cask bulchimbeon` in plain\nsight, then reopens the app.\n- **Installed from the zip:** the app downloads`Bulchimbeon-X.Y.Z.zip` and its`.sha256` from that release, checks\nthe checksum, and checks that the new app's code signature is valid, has the same signing identifier and team as\nthe running app, uses the hardened runtime and is exactly the offered version. Only then does it replace itself and\nrestart; the current watch carries on. If any step fails, the installed app is left as it was and the release page\nis offered instead. The app must sit in a folder you can write to, such as`/Applications` .\n- **Linux:** notify only.`bulchimbeon status` , the tray menu and`bulchimbeon doctor` show the update with the\ncommand for how you installed it (`brew upgrade bulchimbeon-linux` ,`sudo apt install ./….deb` ,`sudo dnf install ./….rpm` ,`yay -Syu bulchimbeon-bin` , or the tarball), and the daemon notes it in the journal.\n\n**Privacy.** The check is a single HTTPS `GET https://api.github.com/repos/s3onghyun/bulchimbeon/releases/latest`,\nat most once a day, with only `User-Agent: Bulchimbeon/<version>`, `Accept` and a fixed `Accept-Language: en`.\nNo settings, duty log, agent names, identifiers or cookies are sent, and there is no telemetry. As with any web\nrequest, GitHub sees your IP address. This is the only network access Bulchimbeon makes.\n\nTo turn it off, untick **Check for updates (once a day)** in the menu, or:\n\n```\ndefaults write io.github.s3onghyun.bulchimbeon checkForUpdates -bool false   # macOS\nbulchimbeon config set checkForUpdates false                                  # Linux\n```\n\n| Watch mode | Under the hood | \n|---|---|\n| Keep display on | `IOPMAssertion`` PreventUserIdleDisplaySleep` , same as`caffeinate -d` | \n| Display may sleep (default) | `IOPMAssertion`` PreventUserIdleSystemSleep` , same as`caffeinate -i` | \n| Lid closed | The above plus `pmset -a disablesleep 1` . Closing the lid is a hardware trigger that assertions can't block | \n\nBulchimbeon scans **your own user's** processes with libproc and matches agents by executable name, `argv[0]`,\ninstall path or script path. Never by substring (Claude Code hooks run `node -e \"...'.claude'...\"`, which would match).\n\n| Install method | What the process looks like | Matched by | \n|---|---|---|\n| Claude Code native installer | executable `~/.local/share/claude/versions/2.1.296` (named after the version!) | `argv[0]` =`claude` , or the install path | \n| Homebrew / IDE-bundled binary | `.../claude` ,`/opt/homebrew/bin/codex` | executable name | \n| npm global install | `node /opt/homebrew/bin/claude` | script name | \n| npx / package path | `node .../@anthropic-ai/claude-code/cli.js` | package path | \n| bun / deno | `bun .../@google/gemini-cli/...` | package path | \n\nSupported: Claude Code · Codex · Gemini CLI · Cursor Agent · Copilot CLI · Aider · OpenCode\n\n**Only while working.** People keep several Claude Code sessions open, so counting open sessions would never let the\nMac sleep. An agent counts as working when it shows its own recent activity:\n\n| Signal | Why (measured on a real machine) | \n|---|---|\n| The agent plus processes it started in the last 10 minutes use ≥ 2% CPU, averaged over 60 s | Covers replies and tool runs like builds and tests. Idle sessions sit at 0–0.1% (0.6–0.9% on Linux). A 5-second sample made periodic background jobs look busy forever | \n| A process running longer than 10 minutes counts only if it alone uses ≥ 5% CPU | Long builds still count. MCP servers (~0.3%) and hook pollers (~1%) do not, and no longer add up across a session | \n| A `caffeinate` child counts when another child started in the last 10 minutes runs next to it | Claude Code spawns `caffeinate -i -t 300` while a turn is in progress, but a Stop hook that waits for hours keeps the turn open. Tool calls and command hooks time out after 10 minutes by default | \n| An agent started under another agent (a `claude -p` helper run by a hook) is judged on its own | Its CPU is not added to the session that started it | \n| Headless sessions with no tools ( `--tools=` ) are ignored | Plugins such as claude-mem keep helper sessions running | \n\nTo go back to the old behaviour, where any open agent process keeps the Mac awake, turn on **Agent watch settings ▸\nCount idle sessions as working** (`agentWatchCountsIdle`). The 5-minute grace before handover is in the same submenu.\n`--diagnose` shows, for each agent, which of these rules decided it.\n\nCheck what gets detected on your machine, or add an agent that isn't on the list:\n\n```\n/Applications/Bulchimbeon.app/Contents/MacOS/Bulchimbeon --diagnose\ndefaults write io.github.s3onghyun.bulchimbeon customAgents -array goose amp\n```\n\nAgents running inside Docker or on a remote host over SSH are not processes on this Mac, so they aren't detected.\n\n```\npmset -g assertions | grep Bulchimbeon   # is it on watch right now?\n```\n\nThe duty logic lives in a pure state machine (`DutyEngine`) with no system calls, tested scenario by scenario with a\nfake clock. Design notes, including signals we tried and rejected: [docs/design.md](https://github.com/s3onghyun/bulchimbeon/blob/main/docs/design.md).\n\nBulchimbeon also runs on Linux as a small daemon with a command line and a [tray icon](#tray-icon).\nIt uses the same engine as the macOS app: a Go port that must pass the same golden test cases\n([`testdata/engine`](https://github.com/s3onghyun/bulchimbeon/blob/main/testdata/engine)) as the Swift core, in CI on every pull request.\nTested on Ubuntu 24.04 (systemd 255). It needs systemd and logind. While on duty it blocks automatic suspend\nwith your desktop's own inhibitor, or with logind's when there is no desktop ([below](#the-sleep-lock-on-each-desktop)).\n\nWith [Homebrew on Linux](https://docs.brew.sh/Homebrew-on-Linux) (no root; `brew upgrade` brings new versions):\n\n```\nbrew install s3onghyun/tap/bulchimbeon-linux\nbrew services start bulchimbeon-linux    # systemd user unit, started at login\n```\n\nPick one install method. If you use Homebrew, do not also install the tarball or enable the `.deb` or `.rpm` unit\n(`systemctl --user enable bulchimbeon`), or two daemons will run.\n\nOr download from [Releases](https://github.com/s3onghyun/bulchimbeon/releases): a tarball or a `.deb` for amd64 or arm64,\nor, from 0.9.0, an `.rpm` for x86_64 or aarch64.\n\n```\n# Tarball: no root needed. Installs ~/.local/bin/bulchimbeon and a systemd user unit, then starts it\ntar -xzf bulchimbeon_<version>_linux_amd64.tar.gz\ncd bulchimbeon_<version>_linux_amd64 && ./install-linux.sh\n\n# or the .deb: installs /usr/bin/bulchimbeon and the user unit; each user then enables it\nsudo apt install ./bulchimbeon_<version>_amd64.deb\nsystemctl --user enable --now bulchimbeon\n\n# or the .rpm (Fedora and others, from 0.9.0): the same files; each user then enables it\nsudo dnf install ./bulchimbeon-<version>-1.x86_64.rpm\nsystemctl --user enable --now bulchimbeon\n```\n\nComing soon, not published yet: a Fedora COPR repository (`dnf copr enable`) and the AUR package `bulchimbeon-bin`.\nUntil then, use the `.rpm` on Fedora, and on Arch the tarball, or `makepkg -si` in\n[`packaging/aur/bulchimbeon-bin`](https://github.com/s3onghyun/bulchimbeon/blob/main/packaging/aur/bulchimbeon-bin) of a checkout.\n\nVerify the download (optional): `sha256sum -c SHA256SUMS --ignore-missing`, and\n`gh attestation verify <file> --repo s3onghyun/bulchimbeon`.\n\nUninstall with `brew services stop bulchimbeon-linux && brew uninstall bulchimbeon-linux`,\n`./install-linux.sh --uninstall`, or `systemctl --user disable --now bulchimbeon` followed by\n`sudo apt remove bulchimbeon` or `sudo dnf remove bulchimbeon`. Your settings (`~/.config/bulchimbeon`) and duty log\n(`~/.local/state/bulchimbeon`) are kept.\n\nTo keep the service running while you are logged out, run `loginctl enable-linger` once.\n\n```\nbulchimbeon status                       # on duty or not, and why\nbulchimbeon doctor                       # check the desktop session, systemd, logind and polkit\nbulchimbeon config set agentGraceMinutes 10\nbulchimbeon config set customAgents goose amp\nbulchimbeon config set language ko       # ko | en | zh | system (default: follows LANG)\njournalctl --user -u bulchimbeon -f      # the daemon's log\nbash\n$ bulchimbeon status\n🪖 Bulchimbeon — on duty for 0:35 (agent watch)\nLock:      blocking auto-suspend via org.gnome.SessionManager · confirmed by the session\nWhy:       Claude Code pid 1174857 11.7% (own + recent processes CPU ≥ 2.0%, 60 s average)\nAgents:    Claude Code ×7 open, 1 working\nHandover:  5 min after the last agent goes quiet (agentGraceMinutes)\nPower:     battery: none · heat: normal (coretemp 49 °C, critical 105 °C) · lid: not handled (closing it still suspends)\n```\n\n`bulchimbeon run` is the daemon itself; the user unit runs it. It always does agent watch: the\nsame detection rules, a 5-second check, engage when an agent and the processes it started in the last 10 minutes\nuse at least 2% CPU (60-second average; Linux has no `caffeinate` signal), hand over after the grace time.\n\n`bulchimbeon tray` puts the private in your desktop panel, in the same poses as on the Mac menu bar and animated the\nsame way: asleep when the daemon is off, looking around while it waits for an agent, flashlight on while on duty,\nsweating through a combat rest. Hover for the full status. The menu shows every line of `bulchimbeon status` in the\nsame order, then a **🧥 Uniform** picker that sets `uniformTheme`, and **Quit tray**, which closes the icon only:\nthe daemon keeps watch without it.\n\nThe `.deb` and `.rpm` start it with every desktop session through an XDG autostart entry,\n`/etc/xdg/autostart/bulchimbeon-tray.desktop`; `install-linux.sh` puts the same entry in `~/.config/autostart/`.\nWith Homebrew, add `bulchimbeon tray` to your desktop's startup applications. Where there is nothing to show it in\n(SSH, a headless machine, a desktop without a tray), or for a user who has never started the daemon, it logs one line\nand exits.\n\nIt is a StatusNotifierItem, the tray protocol KDE, XFCE and the GNOME AppIndicator extension speak:\n\n| Desktop | What it needs | \n|---|---|\n| XFCE 4.16 or later | the **Status Tray** panel item (`systray` ), which the default panel has | \n| XFCE 4.14 or older | the `xfce4-statusnotifier-plugin` panel item | \n| GNOME | the AppIndicator extension ( `gnome-shell-extension-appindicator` , on by default in Ubuntu) | \n| KDE Plasma | nothing. Off duty or standing by, the item is Passive, so Plasma keeps it in the tray's hidden icons until the private goes on duty | \n\n```\nbulchimbeon tray &                          # show it now, in this desktop session\nbulchimbeon tray --lang ko                  # menu in Korean (ko | en | zh), whatever the language setting says\nbulchimbeon config set uniformTheme navy    # default | navy | arctic | desert: same as the Uniform menu\n```\n\nTo stop it starting at login, turn it off in your desktop's session and startup settings, or remove the autostart file.\n\n|  | Linux | \n|---|---|\n| Agents | Your own processes from `/proc` , with the same matching rules and the same privacy limits as on macOS | \n| Sleep lock | The desktop session's suspend inhibitor, or a logind `sleep` inhibitor without one ([per desktop](#the-sleep-lock-on-each-desktop) ). Never an idle lock. If the daemon dies, even with`kill -9` , the lock goes with it | \n| Battery stand-down | `/sys/class/power_supply` | \n| Heat | hwmon ( `coretemp` ,`k10temp` , …) or thermal zones: heat advisory 15 °C below the critical temperature, combat rest 5 °C below | \n| Duty log | `~/.local/state/bulchimbeon/duty-log.txt` , same format as on macOS | \n\n| Session | Lock while on duty | Still works | \n|---|---|---|\n| GNOME (Ubuntu, Fedora), Cinnamon, MATE, Budgie | `org.gnome.SessionManager.Inhibit` with the suspend flag only | the screen dims and locks; your own suspend from the menu. GNOME 46 (Ubuntu 24.04) backs any suspend inhibitor with a logind block lock of its own, so `systemctl suspend` in a terminal asks for`-i` | \n| KDE Plasma | `org.freedesktop.PowerManagement.Inhibit` , which PowerDevil applies to automatic suspend only | the screen dims, turns off and locks; manual suspend | \n| XFCE | by default a logind `sleep` inhibitor, as without a desktop, which does**not** stop xfce4-power-manager's automatic suspend on any systemd version (`block` and`block-weak` both let your own user's suspend through).`bulchimbeon config set xfceKeepAwake true` switches to`org.freedesktop.PowerManagement.Inhibit` | the screen blanks and locks; manual suspend. With `xfceKeepAwake` , automatic suspend is blocked too, but XFCE's power manager treats any inhibitor like presentation mode, so the screen then stays on and unlocked while on duty | \n| No desktop: headless, SSH only, sway, Hyprland, other compositors | a logind `sleep` inhibitor,`block-weak` on systemd 257 and later,`block` on 256 and older, held by a`systemd-inhibit` child tied to a pipe | your own suspend. It stops logind's `IdleAction` and other users' suspend requests. On systemd 256 and older,`systemctl suspend` in a terminal asks for`-i` | \n\nWhy not logind everywhere: on systemd 256 and older (Ubuntu 24.04, Debian 12) logind ignores a block inhibitor\nfor requests from the user who holds it, and GNOME's, XFCE's and Cinnamon's power managers ask logind to suspend as\nyou. Measured on Ubuntu 24.04 GNOME: gsd-power's automatic suspend request went through logind while Bulchimbeon held\nits lock. On systemd\n257 and later a logind `block` lock does stop them, but it also refuses your own manual suspend.\n\nThe daemon looks for the desktop on your session bus, the user bus that `systemd --user` gives its services. Log in\nto a desktop while it is on duty and the lock moves to the desktop within one check (5 seconds); log out and it moves\nback to logind. The desktop drops its inhibitor when the daemon's bus connection closes, so a crash releases it.\n`bulchimbeon status` shows which lock is held and why; `bulchimbeon doctor` tries each one.\n\n- \n**Closing the lid still suspends.** By default logind ignores inhibitors for the lid switch\n(`LidSwitchIgnoreInhibited=yes` ), and Bulchimbeon never changes logind's settings.\n- \n**Over SSH or on a headless machine, the sleep block needs a polkit rule.** By default polkit\nallows a`sleep` block inhibitor only from a local login (someone at the machine's screen). From an\nSSH session, or as a user service on a machine nobody logs into locally, logind refuses it,\nand`bulchimbeon status` says plainly that sleep is not blocked.\nTo allow it for one user, save this as`/etc/polkit-1/rules.d/50-bulchimbeon.rules` (owner root, mode`0644` ),\nwith your user name;`bulchimbeon doctor` prints it with your name filled in:\n\n``` js\n// Bulchimbeon: let YOUR-USER-NAME hold a logind \"sleep\" block inhibitor from an SSH or\n// systemd --user session (polkit's default only allows it from a local session).\n// Grants nothing else. Remove this file to undo.\npolkit.addRule(function (action, subject) {\n  if (action.id == \"org.freedesktop.login1.inhibit-block-sleep\" && subject.user == \"YOUR-USER-NAME\") return polkit.Result.YES;\n});\n```\n\n It grants only `org.freedesktop.login1.inhibit-block-sleep` to that user; delete the file to undo.\nBulchimbeon never runs this for you. A desktop session does not need it: its own inhibitor needs no polkit\npermission. Only the logind lock, used without a desktop, does.\n- \n**sway, Hyprland and other compositors without a desktop power manager get the logind lock only.** It does not stop\nan idle daemon that suspends as you (`swayidle` or`hypridle` running`systemctl suspend` ), because logind lets your\nown suspend through. Bulchimbeon holds no idle lock there either: on those compositors one would also stop the\nscreen from locking.\n- \n**On XFCE, automatic suspend is not blocked by default.** xfce4-power-manager treats any suspend inhibitor like\npresentation mode and keeps the screen on and unlocked, so Bulchimbeon leaves the screen lock alone and holds only\nthe logind lock, which xfce4-power-manager's own suspend gets past on any systemd version.`bulchimbeon status` and`doctor` say so. To block it anyway, accepting that the screen stays on and unlocked while on duty:`bulchimbeon config set xfceKeepAwake true` .\n- \n**The desktop inhibitor covers your own session.** Another user's session on the same machine (fast user switching)\ncan still suspend it. A desktop whose session bus is private (started with`dbus-launch` , without`dbus-user-session` ) is invisible to the service, which then keeps the logind lock.\n- \nOnly the \"Display may sleep\" watch mode exists on Linux ( `dutyMode` is ignored), there is no patrol mode, and\nnotifications go to the journal.\n- \nWindows is planned: the platform layer is in [`internal/platform`](https://github.com/s3onghyun/bulchimbeon/blob/main/internal/platform) .\n\nThe app runs `pmset` with admin rights and reads other processes' metadata, so it has its own threat model:\n[SECURITY.md](https://github.com/s3onghyun/bulchimbeon/blob/main/SECURITY.md).\n\n- No network access except the once-a-day [update check](#updates) , which sends only the app version and can be turned off; no third-party dependencies\n- Updates install only after you click: Homebrew installs go through `brew` in a visible Terminal, zip installs are replaced only after the checksum and code-signature checks pass\n- No shell-injection surface: absolute paths, minimal environment, and only an app PID, a safely quoted app-owned stop-flag path and the app's quoted start time enter the admin command\n- The root lid watchdog has no deadline to extend; the app owns all watch timing. A user-owned, non-world-writable empty stop flag can only make it run `pmset -a disablesleep 0` ; it never reads the flag, follows it elsewhere, or writes it\n- Never stores or prints other processes' arguments or environment; never reads AI transcripts\n- Hardened runtime, SHA-256 checksums and build provenance for releases, CI actions pinned by commit SHA\n\nOnly the Command Line Tools are needed, no Xcode. The Linux daemon is a Go module (Go 1.27 or later):\n`go test ./...` and `go build ./cmd/bulchimbeon`.\n\n```\nmake test       # unit + scenario tests\nmake app        # dist/Bulchimbeon.app (ad-hoc signed)\nmake run        # build and launch\nmake icons      # regenerate the app icon and preview after editing sprites\n\n# launch and start agent watch right away\nopen dist/Bulchimbeon.app --args --agent-watch\n\n# print the engine's effects to stderr (for tracing)\nBULCHIMBEON_DEBUG=1 dist/Bulchimbeon.app/Contents/MacOS/Bulchimbeon\n```\n\nWant to help? Start with [CONTRIBUTING.md](https://github.com/s3onghyun/bulchimbeon/blob/main/CONTRIBUTING.md).\n\n```\ngit tag vX.Y.Z && git push origin vX.Y.Z   # → the Release workflow builds, attests and uploads\n./scripts/bump-cask.sh X.Y.Z               # → verifies checksums and provenance, then updates the tap's cask and Linux formula\n./scripts/bump-aur.sh X.Y.Z                # → same checks, then updates packaging/aur for the AUR (packaging/aur/README.md)\n# Fedora COPR, once set up: copr-cli buildscm ... --commit vX.Y.Z (packaging/rpm/README.md)\n```\n\nSprites are ASCII grids in `Sources/BulchimbeonCore/Sprites.swift`: one character per pixel, drawn as vector\nrectangles so both the 16 pt menu bar icon and the 1024 px app icon stay crisp.\n\nThe menu-bar sprite advances at 2 frames per second while it can be seen. It stops completely when the screen is locked, the displays sleep, or AppKit reports the status item's window as fully occluded; it runs at 0.67 fps in Low Power Mode. The timer has tolerance, and a single-frame pose schedules no timer at all, so it creates no redraw.\n\nOne AppKit `NSStatusItem` is replicated by macOS to each menu bar. AppKit does not expose an independently drawable\nstatus item or active display for those copies, so Bulchimbeon cannot animate just one display without replacing the\nstandard menu-bar item. The visible animation therefore remains identical on every active display.\n\nMeasured on 2026-11-06 on an M5 Pro on AC with the built-in panel plus two LG 4K displays: `top` reported 2.04% CPU\nand 167 context switches/s before this change, 1.58% CPU and 186 context switches/s after it (five 2-second samples,\npatrol mode enabled). `top` on this macOS release has no per-process wakeups counter, so context switches are recorded\nas the available wakeup proxy; normal visible animation is intentionally not claimed as a speed-up. The saving is the\nzero scheduled menu-bar frames while it is not visible (rather than 2/s), and 67% fewer frames in Low Power Mode.\n\nTracked as [milestones](https://github.com/s3onghyun/bulchimbeon/milestones). 1.0 means settings keys, command-line\nflags and the duty log format stop changing: see the [compatibility promise](https://github.com/s3onghyun/bulchimbeon/blob/main/docs/compatibility.md) (in Korean; the\ntables are self-explanatory) and the [CHANGELOG](https://github.com/s3onghyun/bulchimbeon/blob/main/CHANGELOG.md).\n\n- Pixel-art private, patrol mode, Korean/English/Simplified Chinese UI\n- Detect working vs. idle agents\n- Homebrew cask (personal tap)\n- Apple notarization (0.12.6)\n- Official Homebrew cask\n- Privileged helper to remove the admin prompt in lid-closed mode\n- Unlockable skins: Joseon night watchman, scholar\n\nBug reports (\"🚨 soldier misbehaving\"), agent requests, translation fixes, and ideas for lines or sprites are\nall welcome. Issues and PRs in English, Korean, Japanese or Chinese are fine. Look for\n[`good first issue`](https://github.com/s3onghyun/bulchimbeon/labels/good%20first%20issue) to get started, and read\n[CONTRIBUTING.md](https://github.com/s3onghyun/bulchimbeon/blob/main/CONTRIBUTING.md).\n\nHeavy, long-running work with the lid closed makes the Mac warm. Plug in power when you can.\n\nMIT", "url": "https://wpnews.pro/news/show-hn-bulchimbeon-a-night-watch-keep-your-mac-awake-while-ai-agents-work", "canonical_source": "https://github.com/s3onghyun/bulchimbeon", "published_at": "2026-11-20 07:01:41+00:00", "updated_at": "2026-11-20 07:14:30.901622+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Bulchimbeon", "s3onghyun", "Claude Code", "Codex", "Gemini CLI", "Cursor Agent", "Copilot CLI", "Aider"], "also_reported_by": [], "takeaway": "Bulchimbeon 0.12.6+ holds a macOS sleep assertion only while a supported coding agent (Claude Code, Codex, Gemini CLI, Cursor Agent, Copilot CLI, Aider, OpenCode) is working, with no hooks or root helper; run the bundled --diagnose flag if detection fails.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-bulchimbeon-a-night-watch-keep-your-mac-awake-while-ai-agents-work", "markdown": "https://wpnews.pro/news/show-hn-bulchimbeon-a-night-watch-keep-your-mac-awake-while-ai-agents-work.md", "text": "https://wpnews.pro/news/show-hn-bulchimbeon-a-night-watch-keep-your-mac-awake-while-ai-agents-work.txt", "jsonld": "https://wpnews.pro/news/show-hn-bulchimbeon-a-night-watch-keep-your-mac-awake-while-ai-agents-work.jsonld"}}