Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By nkmr-jpv0.1.5In 1 marketplace
See which Codex or Claude Code sessions are running, awaiting input or idle in the xbar menu bar. Hooks on every prompt and tool call store each session's latest prompt excerpt in a local sessions.jsonl.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
1 critical · 2 cautions to review before installing
A hook runs before every tool call and can block or approve it
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
session-monitoring, xbar, menu-bar, session-status, hooks, token-usage, idle-detection, claude-code ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A plugin that monitors active Codex / Claude Code sessions through hooks and lists them in the xbar menu bar.
⚡2 🔔1 ⏸3 ← Counts of concurrent running / awaiting / idle sessions
The dropdown shows each session's cwd, git branch, model, latest prompt excerpt, cumulative tokens, and last update time. Click an entry to open its cwd or transcript.
Hook script paths are quoted so installation directories containing spaces, such as Orca's Application Support, work correctly.
SessionStart / UserPromptSubmit / PreToolUse / PostToolUse / Notification / PermissionRequest / Stop / SessionEnd) invokes hooks/scripts/update-session.sh.session_id / transcript_path / cwd / hook_event_name from JSON on stdin.tail -n 400) to find the latest gitBranch, model, user prompt, and usage.$CLAUDE_PLUGIN_DATA/sessions.jsonl:
SessionStart → idleUserPromptSubmit / PreToolUse / PostToolUse → runningNotification / PermissionRequest → awaitingStop → idleSessionEnd → Remove the entryxbar/claude-sessions.5s.sh) reads sessions.jsonl every five seconds and renders the menu bar.setup/
├── plugins/session-monitor/
│ ├── .claude-plugin/plugin.json # Claude Code manifest
│ ├── .codex-plugin/plugin.json # Codex manifest
│ ├── hooks/
│ │ ├── hooks.json # Register update-session.sh for all hook events
│ │ └── scripts/update-session.sh # Hook that upserts sessions.jsonl
│ └── README.md
└── xbar/
├── claude-sessions.5s.sh # xbar plugin (refreshes every five seconds)
│ # Managed in the repository's root xbar folder
└── click-handler.sh # Dispatch menu item clicks
# (focus cmux / activate an app / delete an entry)
xbar scripts live in the repository's root xbar/ directory so future xbar plugins can be managed together.
Without jq, the hook exits silently without affecting Claude Code.
codex plugin marketplace add ~/ghq/github.com/nkmr-jp/setup
codex plugin add session-monitor@setup
After installation, start a new thread to load the hooks.
To enable it in Claude Code, use this repository's marketplace:
/plugin marketplace add nkmr-jp/setup
/plugin install session-monitor@setup
/reload-plugins
To enable it in Antigravity (AGY), use the AGY CLI native importer:
agy plugin install ~/ghq/github.com/nkmr-jp/setup/plugins/session-monitor
Symlink the repository's xbar/claude-sessions.5s.sh into xbar's Plugin Folder (~/Library/Application Support/xbar/plugins/):
ln -sf "$HOME/ghq/github.com/nkmr-jp/setup/xbar/claude-sessions.5s.sh" \
"$HOME/Library/Application Support/xbar/plugins/claude-sessions.5s.sh"
Start or refresh xbar to display ⏸ 0 (zero sessions) in the menu bar. The count increases when Claude Code starts.
The hook writes $CLAUDE_PLUGIN_DATA/sessions.jsonl. The xbar script resolves the data directory through the anchor file ~/.claude/session-monitor/data-dir, so Claude Code can manage the actual storage path.
Each line represents one session and contains a snapshot of its latest state.
{
"session_id": "abc-123",
"cwd": "/Users/your-user/ghq/github.com/nkmr-jp/setup",
"git_branch": "master",
"status": "running", // running | awaiting | idle
"model": "claude-opus-5-5",
"last_prompt": "Create a plugin to monitor the current session...",
"updated_at": "2026-05-10T20:11:42Z",
"last_event": "PostToolUse",
"transcript_path": "/Users/your-user/.claude/projects/.../session.jsonl",
"last_assistant_at": "2026-05-10T20:11:40Z",
"input_tokens": 1234,
"output_tokens": 567,
"cache_read_input_tokens": 89012
}
When status becomes ended, the entry is removed rather than retained.
# Data directory referenced by the anchor
cat ~/.claude/session-monitor/data-dir
# Current sessions.jsonl
DATA_DIR=$(cat ~/.claude/session-monitor/data-dir)
jq -r '"\(.status)\t\(.cwd)\t\(.last_prompt)"' "$DATA_DIR/sessions.jsonl"
# Inspect xbar script output directly
xbar/claude-sessions.5s.sh
Use claude --debug to observe hook events and their behavior.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub nkmr-jp/setup --plugin session-monitorPlugins from other owners that cover similar ground