Your agents haunt you. Haunt them back.
Which of your agent sessions needs you, on what, and for how long.
bogyman watches the Claude Code and Codex sessions you already started,
wherever you started them, and keeps one list: who is blocked, on what, and
since when. It never spawns, schedules, or attaches to anything. Hooks push
events into a local SQLite file; the CLI reads it.
It covers the Claude Code hook stream, the Codex hook / notify stream, a cheap
poll of Claude Code's per-session status files, and a poll of
claude agents --json that adds background sessions and the exact reason a
session waits, and a tail of Codex rollout files for each Codex session's model,
token totals and last reply. Claude Desktop sessions pick up Desktop's own
post-turn summary from its session index. bogyman focus brings any of them in
front of you.
An optional daemon keeps it all current in the background and can notify you
when a session gets blocked or fails.
One line, no package manager:
curl -fsSL https://raw.githubusercontent.com/soleo/bogyman-cli/main/install.sh | shIt picks the tarball for your OS and CPU (macOS arm64 or x86_64, Linux x86_64
or arm64) from the latest release,
verifies it against SHA256SUMS, and installs bogyman into ~/.local/bin.
Set BOGYMAN_INSTALL_DIR to install elsewhere, or BOGYMAN_VERSION=v0.1.0 to
pin a version. Prefer to read it first? install.sh is at the repo root.
Or with Homebrew (macOS and Linux):
brew install soleo/tap/bogymanOr build from source:
cargo install --path crates/bogyman-cli # puts `bogyman` in ~/.cargo/binThen:
bogyman install # wires Claude Code (+ Codex) hooks
bogyman doctor # confirms events arrivebogyman install merges handler entries into ~/.claude/settings.json and
~/.codex/hooks.json, writing a .bogyman-bak first. Existing hooks are left
alone. A second run is a no-op; bogyman uninstall removes only bogyman's
entries. Pass --dry-run to preview.
| Command | What it does |
|---|---|
bogyman ls |
Every live session, blocked first. --all adds failed and stopped from the last 24 h, --watch redraws each second and polls claude agents --json every poll.claude_agents_secs. |
bogyman waiting |
Blocked sessions only, oldest wait first. Exit 3 when empty, so it works in && chains. |
bogyman status |
One line for prompts: ⏳2 ▶3 ✓1. Cache only. --format '{blocked} waiting' to template. |
bogyman show <id> |
Full record plus the last 20 events. <id> is a bogyman id, a unique prefix, the vendor id, or the name. |
bogyman focus <id> |
Bring a session in front of you. A live terminal session gets its tab selected: Ghostty, iTerm2 and Terminal via AppleScript, WezTerm and kitty via their CLIs, a tmux pane first and then the terminal showing it; on Linux the window is raised with xdotool or wmctrl. A background Claude session runs claude attach, a Desktop one brings Claude forward, and an ended one resumes in its directory. Attach and resume take over the terminal, so under --json or in a pipe the command is printed instead. |
bogyman send <id> "msg" |
Deliver a message without attaching. Claude Code sessions get it over their inbox socket and read it between tool calls, or start a turn with it when idle. Codex goes through the [send] codex command template. - reads the message from stdin. |
bogyman install / uninstall |
Register or remove hooks. --claude, --codex, --dry-run. |
bogyman daemon start / stop / status |
Optional background poller. Runs claude agents --json every poll.claude_agents_secs, refreshes session files, transcripts and rollouts every poll.codex_rollout_secs, and prunes old events every 6 h. One instance at a time (it holds a lock on daemon.lock); status shows its last tick and how each poll is doing. ls --watch leaves the claude agents poll to it when it runs. With notify.enabled = true it sends a desktop notification when a session enters a state in notify.on. daemon notify-test sends a sample. |
bogyman daemon install / uninstall |
Run the daemon at login: a launchd agent (~/Library/LaunchAgents/dev.bogyman.daemon.plist) on macOS, a systemd user unit on Linux. Your PATH is copied in so claude and codex resolve. --dry-run prints the file. |
bogyman doctor |
Vendor versions, hooks registered, store health, last event per vendor. --verbose dumps recent events. |
bogyman gc |
Prune events older than retention_days (default 7). |
bogyman version |
Version, git commit, build date, target. Same line as --version. |
bogyman hook <vendor> |
Hook entry point, invoked by the vendor. Reads stdin, appends one row, exits 0. |
Every command takes --json, --vendor claude|codex, --cwd <path> and
--no-color. Human output is a table on a TTY and header-less TSV when piped.
Exit codes: 0 ok, 1 error, 2 bad usage, 3 empty result (waiting), 4 vendor
command unavailable.
--json is the contract for scripts and supervising agents. Every command
answers with the same envelope, schema 1:
{"schema":1,"command":"ls","ok":true,"data":{"sessions":[]}}
{"schema":1,"command":"show","ok":false,"error":{"message":"no session matches 'zzz'","exit":1}}command names the command that ran, so a reader can tell responses apart
without tracking what it asked for. What sits under data:
| Command | data |
|---|---|
ls, waiting |
sessions — the same session records the tables are built from |
status |
blocked, working, done, failed, stale, total, line |
show |
session, events |
focus |
id, vendor, action (raised, activated, attach, resume), app, tty, command, detail |
send |
id, vendor, detail |
install, uninstall |
changed, dry_run, lines |
daemon |
running, pid, state (started_at, last_tick, per-poll last_ok / last_error), service; start/stop/install add action, detail |
doctor |
bogyman, build, store, config, claude, codex, daemon, warnings |
gc |
retention_days, events_removed, sessions_removed |
version |
version, commit, dirty, commit_date, built_at, target, profile, rustc, binary |
Four rules the output keeps, so a consumer does not have to special-case anything:
- Failures are JSON too, on stdout, with
ok: falseand anerrorof{message, exit}. One stream is always parseable; the exit code says the same thing aserror.exit. - Pretty on a TTY, one line when piped, the same split the tables use. Pipe
through
jq .to read a piped response by eye. ls --watch --jsonis an NDJSON stream — one envelope per line per second, with no screen clear, sowhile readandjq --unbufferedboth work.- An empty result is a success.
waitingwith nothing blocked isok: truewith an empty list and still exits 3, so&&chains behave.
bogyman ls --json | jq '.data.sessions[] | select(.state=="blocked") | {name, host, waiting_for, since}'Session records carry their own schema field; it is the stored record's
version and tracks the envelope's.
| Path | Purpose |
|---|---|
~/.local/share/bogyman/bogyman.db |
Event log and session snapshot (SQLite, WAL). |
~/.local/share/bogyman/bogyman.log |
Hook-path and daemon errors. Hooks never print. |
~/.local/share/bogyman/daemon.lock, daemon.json |
The running daemon's lock (holds its pid) and its per-tick status. |
~/.config/bogyman/config.toml |
Optional. See below. |
BOGYMAN_HOME puts everything under one directory. CLAUDE_CONFIG_DIR and
CODEX_HOME are honored the same way the vendors honor them.
BOGYMAN_DESKTOP_DIR points at Claude Desktop's app data folder
(default ~/Library/Application Support/Claude on macOS, ~/.config/Claude
on Linux).
Local Cowork sessions aren't covered: Cowork keeps its transcripts inside its VM's disk image, which bogyman can't read.
[store]
retention_days = 7
redact = false # true drops free-text detail (what a session waits on)
[collectors]
claude_sessions = true # poll ~/.claude/sessions/*.json on each query
claude_transcript = true # read each live session's transcript tail for the model in use
claude_agents = true # poll `claude agents --json --all` (daemon and `ls --watch`; ~100 ms a run)
codex_rollout = true # tail ~/.codex/sessions rollouts changed in the last day, on each query
desktop_index = true # Claude Desktop's session index: post-turn summaries for sessions bogyman tracks
[poll]
claude_agents_secs = 5 # how often the daemon (or a watch) re-runs `claude agents`
codex_rollout_secs = 2 # how often the daemon refreshes files and rollouts
[notify] # sent by the daemon
enabled = false
on = ["blocked", "failed"] # also "done"
debounce_secs = 30 # least time between two notifications for one session
sound = true # macOS
# command = ["terminal-notifier", "-title", "{title}", "-message", "{body}", "-execute", "bogyman focus {id}"]
[focus]
terminal = "auto" # or ghostty, iterm2, terminal, wezterm, kitty when detection guesses wrong
[send]
codex = ["codex", "queue", "--session", "{id}", "{message}"] # how `send` reaches a Codex sessioncargo test --workspace
cargo clippy --workspace --all-targetsVendor payload shapes live under tests/fixtures/<vendor>/<version>/ and are
checked by golden tests, so a vendor format change fails a test rather than a
user. Add a fixture when a vendor adds or changes an event.
The ghost in bogyman version is rendered from bogyman.svg by
scripts/logo-art.py (see its docstring); regenerate it rather than editing
the array by hand.
Bump version in the workspace Cargo.toml, commit, then tag and push:
git tag v0.1.0 && git push origin v0.1.0The release workflow checks the tag against Cargo.toml, runs fmt, clippy and
tests, builds all four targets, and publishes a GitHub release with tarballs
and a SHA256SUMS file. A tag with a suffix such as v0.2.0-beta.1 becomes a
pre-release.
A stable release then updates the Homebrew tap,
soleo/homebrew-tap, by
rendering Formula/bogyman.rb with scripts/homebrew-formula.sh. That job
needs a HOMEBREW_TAP_TOKEN repository secret: a fine-grained token with
Contents read and write on the tap repo only. Without it the job skips with a
notice. To update the tap by hand:
gh release download v0.2.0 -p SHA256SUMS
scripts/homebrew-formula.sh 0.2.0 SHA256SUMS > ../homebrew-tap/Formula/bogyman.rbCrates: bogyman-core (session model, events, reducer), bogyman-store
(SQLite), bogyman-collectors (vendor parsers), bogyman-cli (the binary).