Harbar
a harbour for your fleet of agent sessions.
you run a whole fleet of coding agents at once โ Claude Code and Codex sessions scattered
across iTerm and Terminal tabs, VSCode and Cursor panes, JetBrains terminals, wherever they run.
Harbar is the harbour they all report into: one macOS menu bar panel showing every session at a
glance โ which are working, which need your input, which are idle โ so you stop alt-tabbing through
windows hunting for the one blocked on a prompt. click any session to sail straight to it.
๐2 ๐ค3 โธ1 โ5 โ menu bar badge
โโโโโโโโโโโโโโโโโ
๐ PERMISSION (claude) (2)
โ api@fix-login ยท refactor session ยท iTerm ยท 12s
โ webapp@feat-search ยท add filters ยท Cursor ยท 1m
๐ค IDLE PROMPT (waiting on you) (3)
โ ...
๐ APPROVAL (codex) (0)
โธ WORKING (1)
โ worker@main ยท add retry logic ยท VSCode ยท 4s
โ IDLE (5)
๐ โ worker@main ยท clear bug queue ยท ร6 ยท every 5m ยท โฒ next ~2m
โ ...
โ = claude, โ = codex. each session shows project@branch ยท task.
how it works
every Claude Code / Codex session fires hooks from your user-level config. a single dispatcher
(harbar-hook.py) writes a tiny JSON state file per session to ~/.harbar/sessions/. a native menu
bar app (Harbar.app) reads those files, groups by status, and shows the panel. no server, no
polling of the agents โ the hooks push state, the app reads it (every 2s, pruning dead sessions by
pid).
states: working (prompt submitted) ยท needs input split into ๐ permission ยท ๐ codex approval ยท
๐ elicitation/form ยท ๐ค idle-prompt ยท idle (turn done) ยท error. the label is project@branch
plus the first few words of the latest prompt; a working row also shows the current tool
(editing focus.sh, $ git, searching, โฆ) so the panel stays useful even when nothing's blocked.
๐ on the loop: a session running /loop is marked ๐ wherever it sits โ the loop is a flag,
not a state, so the row stays in working/idle as usual. it shows the cycle count (ร6), the
cadence (every 5m parsed from the command, or avg ~6m measured for self-paced loops), and
either the current tool or a โฒ next ~2m countdown while it sleeps. a loop that hits a permission
prompt shows in ๐ tagged ๐ (it's genuinely blocked โ approving resumes the loop); between-cycle
๐ค idle-prompts are muted (the loop wakes itself, it's not waiting on you). cancelled loops drop
the mark on their own after a couple of missed cycles. only loops started after harbar was
installed are tracked.
reminders: a session that's been blocked on input keeps getting a reminder banner on an
interval, so a stuck agent never goes silent if you miss the first ping. the interval is set
per kind from the menu (off, 1, 2, 5, 10, 15, 30 min) โ defaults: permission / approval /
form = 5 min, idle prompt = 15 min.
hooks it registers
every hook calls harbar-hook.py <agent> --notify, which writes a per-session state file and never
blocks the agent (silent stdout, always exits 0). Claude hooks are registered automatically by the
plugin (option A) or merged into ~/.claude/settings.json by install.sh (option B). Codex hooks
live in ~/.codex/hooks.json and must be trusted with /hooks.
Claude Code:
| hook | matcher | โ |
|---|
SessionStart | โ | idle (registers the session) |
UserPromptSubmit | โ | working (+ captures git branch + prompt label + /loop tracking) |
PreToolUse | โ | working (+ shows the current tool: editing X, $ git, searching, โฆ) |
PostToolUse | โ | working (flips a session back out of ๐ the moment an approved tool finishes) |
Stop | โ | idle |
StopFailure | โ | error |
SessionEnd | โ | removes the tile |
Notification | permission_prompt|idle_prompt|elicitation_dialog | needs input (๐ / ๐ค / ๐) |
Codex (subset โ Codex has no StopFailure / SessionEnd / Notification):
| hook | โ |
|---|
SessionStart | idle |
UserPromptSubmit | working |
PreToolUse | working (+ current tool) |
PostToolUse | working (flips out of ๐ when an approved tool finishes) |
Stop | idle |
PermissionRequest | needs input (๐ approval) |
requirements
- macOS (uses AppKit,
osascript, launchctl)
- Xcode Command Line Tools (
swiftc) โ xcode-select --install
python3
- Claude Code and/or Codex CLI with hooks enabled
terminal-notifier (optional, for clickable notifications) โ brew install terminal-notifier;
the installer adds it automatically if Homebrew is present
install
two ways โ pick one (don't run both; you'd get duplicate Claude hooks).
option A โ Claude Code plugin (no clone)
inside Claude Code:
/plugin marketplace add olexandryermilov/harbar
/plugin install harbar@harbar
/harbar:install-app