samleeney/tmux-agent-status
Über uns
See at a glance which tmux sessions have Claude/Codex working vs idle
KI und maschinelles LernenWhat you can do
- Persistent sidebar in every tmux session
- Hierarchical fzf target switcher for quick jumps and close actions
- Hook-based Claude Code and Codex tracking
- Wait and park modes for triaging work
Gemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +2
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
Originaltmux-agent-status
Sidebar-first AI agent session manager for tmux. It gives each tmux session a persistent status sidebar, keeps a compact summary in the status line, and adds a hierarchical fzf target switcher for fast jumps and cleanup across agent sessions, windows, and panes.
Claude Code and Codex CLI are both integrated through hooks, so their states come from agent lifecycle events rather than fragile process polling. Custom agents can still integrate through status files or collector extensions.
Demo video: demo/full.mp4
Features
- Persistent sidebar in every tmux session
- Hierarchical
fzftarget switcher for quick jumps and close actions - Hook-based Claude Code and Codex tracking
- Wait and park modes for triaging work
- Persistent unread completion inbox, separate from live agent status
- Compact status-line summary with finish notifications
- Works across multi-pane sessions, worktrees, and remote tmux sessions
Supported Agents
| Agent | Integration | Status |
|---|---|---|
| Claude Code | Hook-based via hooks/better-hook.sh |
Stable |
| Codex CLI | Hook-based via hooks/codex-hook.sh |
Stable in plugin, hooks still experimental upstream |
| Devin CLI | Hook-based via hooks/devin-hook.sh (local CLI only) |
Stable in plugin |
| Custom (Aider, Cline, Copilot CLI, etc.) | Status files or collector extensions | Stable |
All agent sessions can run simultaneously across tmux sessions and panes, each tracked independently.
Install
With TPM:
set -g @plugin 'samleeney/tmux-agent-status'
Then press prefix + I to install.
On macOS, install a modern Bash before using the sidebar:
brew install bash
The plugin auto-detects Homebrew Bash at /opt/homebrew/bin/bash or /usr/local/bin/bash when macOS launches scripts with the system Bash 3.2.
If Bash is installed somewhere else, set TMUX_AGENT_STATUS_BASH to that path.
The collector uses flock, or Perl when flock is unavailable, to prevent
duplicate daemons. Install either one if neither is available on your system.
Use fzf 0.71 or newer to keep the popup selection on the same item when expanding or refreshing the list. Older fzf versions retain their previous selection behavior.
By default the plugin:
- Appends the live summary to
status-right - Starts the sidebar collector daemon
- Auto-creates a sidebar in existing and new tmux sessions
- Binds the popup switcher, wait, park, and next-ready actions
Claude Code Setup
Add hooks to ~/.claude/settings.json:
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "~/.config/tmux/plugins/tmux-agent-status/hooks/better-hook.sh UserPromptSubmit"
}
]
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "~/.config/tmux/plugins/tmux-agent-status/hooks/better-hook.sh PreToolUse"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "~/.config/tmux/plugins/tmux-agent-status/hooks/better-hook.sh Stop"
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "~/.config/tmux/plugins/tmux-agent-status/hooks/better-hook.sh Notification"
}
]
}
]
}
}
Claude Code state is tracked entirely through hooks, so the plugin gets precise working/done transitions directly from the agent. If a turn ends while a background task is still running (e.g. a run_in_background Bash command), the Stop payload's background_tasks array keeps the session marked working until a later Stop reports the task finished — so backgrounded work doesn't show a premature green checkmark.
Codex CLI Setup
tmux-agent-status supports official Codex hooks.
Enable hooks in ~/.codex/config.toml:
[features]
hooks = true
For a one-off session, you can also start Codex with codex --enable hooks.
To enable Codex tracking globally, add ~/.codex/hooks.json:
{
"hooks": {
"SessionStart": [
{
"matcher": "startup|resume",
"hooks": [
{
"type": "command",
"command": "bash ~/.config/tmux/plugins/tmux-agent-status/hooks/codex-hook.sh SessionStart"
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "bash ~/.config/tmux/plugins/tmux-agent-status/hooks/codex-hook.sh UserPromptSubmit"
}
]
}
],
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash ~/.config/tmux/plugins/tmux-agent-status/hooks/codex-hook.sh PreToolUse"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bash ~/.config/tmux/plugins/tmux-agent-status/hooks/codex-hook.sh Stop"
}
]
}
]
}
}
Restart Codex, then run /hooks in the CLI and trust the new command hooks if Codex marks them as pending review. Non-managed command hooks must be trusted before Codex will run them.
Codex state is also hook-based. The handler marks the tmux session or pane working on UserPromptSubmit and PreToolUse, resets it to done on Stop, and seeds resumed sessions on SessionStart.
For repo-local tracking while working on this plugin, put the same hook shape in <repo>/.codex/hooks.json. Codex loads project-local hooks once the project .codex/ layer is trusted.
Devin CLI Setup
This integrates the local Devin CLI (the devin binary that runs in your terminal), not cloud Devin sessions. The Devin CLI uses a Claude Code-compatible hooks format.
Add hooks to ~/.config/devin/config.json
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash ~/.config/tmux/plugins/tmux-agent-status/hooks/devin-hook.sh SessionStart"
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "bash ~/.config/tmux/plugins/tmux-agent-status/hooks/devin-hook.sh UserPromptSubmit"
}
]
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "bash ~/.config/tmux/plugins/tmux-agent-status/hooks/devin-hook.sh PreToolUse"
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "bash ~/.config/tmux/plugins/tmux-agent-status/hooks/devin-hook.sh PostToolUse"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bash ~/.config/tmux/plugins/tmux-agent-status/hooks/devin-hook.sh Stop"
}
]
}
]
}
}
Run /hooks in the CLI to confirm the command hooks are loaded, and trust them if Devin marks them as pending review.
Devin state is hook-based. The handler marks the session or pane working on UserPromptSubmit/PreToolUse/PostToolUse, resets it to done on Stop, and seeds resumed sessions on SessionStart.
Without hooks, the collector still auto-detects a running devin process inside a pane (presence only); hooks are required for live working/done state.
Custom Agent Integration
Integrate any AI coding tool with either of these approaches:
- Write
working,done, orwaitto~/.cache/tmux-agent-status/<session>.status - For pane-level parking or per-pane state, write to
~/.cache/tmux-agent-status/panes/<session>_<pane>.statusand~/.cache/tmux-agent-status/parked/<session>_<pane>.parked - Extend the collector scan in
scripts/lib/collect.shif you want automatic process-based tracking
Usage
Default mode is sidebar-first:
- Every tmux session gets a sidebar pane automatically
prefix + Sopens the hierarchicalfzftarget switcherprefix + ofocuses or creates the sidebar in the current window
| Key | Action |
|---|---|
prefix + S |
Open the hierarchical fzf target switcher |
prefix + o |
Focus or create the sidebar |
prefix + N |
Jump to the next inbox item in inbox order |
prefix + W |
Put the current session or pane into timed wait mode |
prefix + p |
Park the current session or pane for later |
The status bar shows one glyph per agent. The glyph identifies the agent, the colour identifies its status:
| Agent | Glyph |
|---|---|
| Claude | ✳ |
| Codex | ⬢ |
| Devin | ◆ |
| Other | ● |
| Status | Colour |
|---|---|
| working | yellow, pulsing (✳/✻, ⬢/⬡, …) |
| waiting | cyan |
| ask | magenta |
| done | green |
For example two Claude agents working alongside a finished Codex agent
renders as two yellow Claude glyphs next to a green ⬢. Each working
glyph flips frames every second, staggered by position (✳ ✻ one second,
✻ ✳ the next) so a row of busy agents pulses rather than blinking in
unison. Glyphs and colours are defined in
scripts/lib/status-summary.sh if you want
different ones.
Parked sessions stay visible in the sidebar and switcher, but are excluded from the status-line summary.
Inside the popup switcher:
Enterswitches to the selected session, window, or paneTabexpands or collapses the selected session or windowCtrl-Xcloses the selected pane immediatelyCtrl-Xon a window immediately closes that window and all child panesCtrl-Xon a session immediately closes that session and all child windows and panesCtrl-Pparks or unparks the selected session, window, or paneCtrl-Wopens wait mode for the selected target, or cancels an existing waitCtrl-Rresets tracked stateCtrl-Amarks unread completions in the selected pane, window, or session as read
Inside the sidebar:
x,p, andwperform the same close, park, and wait actions without interfering with popup search inputamarks the selected pane, window, or session's completions as read
prefix + N visits unread completions first, in their displayed order. When none
are available, it follows the existing INBOX order: session name, then tmux
window order within each session.
Unread completions
The sidebar's RECENTLY READY section and the switcher's [recently ready]
rows remember completed work you have not visited. Claude Code, Codex CLI and
Devin CLI record completions when a Stop hook changes an active pane to done.
Startup events, repeated Stop events and Claude's still-running background
tasks do not create new entries. Existing hook configuration is sufficient.
Entries are saved on disk and survive sidebar/collector restarts and switcher resets. Each pane has one unread entry, updated by a later completion, with the most recent completions first. The record remains even if the agent starts working again; its live status is still shown separately in the normal views.
Visiting the pane through any tmux navigation marks it read. A completion in a
pane already active in an attached tmux client is considered read immediately.
Highlighting a row or showing its preview does not mark it read. Use a in the
sidebar or Ctrl-A in the switcher to acknowledge work without visiting it;
window/session rows acknowledge all panes in that scope. Reading a completion
does not change the agent's working, done, or ask state.
Parked and timed-wait panes keep their unread entries, hidden until they are
available again. Both tree and agents views show unread completions. The live
INBOX continues to show current done/ask work independently, so a pane may
appear there after its unread entry is cleared. Popup rows refresh every two
seconds when curl is installed.
Completion records are local to a tmux server and pane process. Renaming a session preserves them; closing or respawning a pane retires its old records when the inbox is next collected. This does not restore agents after a tmux server restart, or collect completion history from remote status files and custom agents that only write status files.
Disable the additional inbox with set -g @agent-completion-inbox "off".
Parking, waiting, and closing always apply to the selected scope only:
- selecting a session row affects the whole session
- selecting a window row affects only that window
- selecting a pane row affects only that pane
In multi-window sessions, sidebar and inbox rows labeled with a window name operate on that window, not just the first pane inside it.
Configuration
set -g @agent-status-key "S"
set -g @agent-sidebar-key "o"
set -g @agent-next-done-key "N"
set -g @agent-wait-key "W"
set -g @agent-park-key "p"
set -g @agent-switcher-style "both" # popup | sidebar | both
set -g @agent-status-display-method "popup" # popup | window
set -g @agent-sidebar-width "42"
set -g @agent-completion-inbox "on" # on | off; unread completion history
# Switcher view (prefix + S). "tree" is the hierarchical
# session/window/pane list (default). "agents" is a flat list of every
# agent pane sorted by status. Toggle mid-session with ctrl-f.
set -g @agent-switcher-default-mode "tree" # tree | agents
# Collector poll rate. The daemon wakes every @agent-tick-seconds to animate
# the spinner and re-collects every @agent-ticks-per-collect wakeups.
# Lower values are more responsive but cost noticeably more CPU.
set -g @agent-tick-seconds "1"
set -g @agent-ticks-per-collect "5"
Polling options are read when the collector starts. The tick interval must be a positive number of seconds; the collection count must be an integer from 1 to 999999999. Invalid values produce a warning and use the defaults.
@agent-switcher-style "both" is the default. It keeps the persistent sidebar and leaves prefix + S as the lightweight popup switcher.
The switcher popup has two views. Tree (default) is the hierarchical session/window/pane list; tab expands/collapses. Agents is a flat list of every agent pane (any status) sorted by priority — ask, done, working, wait, parked — with a live preview pane and 2-second refresh. Press ctrl-f inside the popup to toggle between views.
The sidebar has the same two views, toggled with m from inside the sidebar pane (alongside w/p/x for wait/park/close). In tree mode the SESSIONS section lists every session and collapses single-agent sessions to one row; the INBOX section surfaces done/ask work. In agents mode the SESSIONS section is filtered to sessions/worktrees that contain agent panes and every agent pane is expanded; the live INBOX is suppressed because it would duplicate the same rows. RECENTLY READY remains visible in both modes until its completions are acknowledged.
Notification Sounds
Play a sound when an agent finishes:
set -g @agent-notification-sound "chime"
Options: chime (default), bell, fanfare, frog, speech, none.
Multi-Agent Deploy
Launch parallel AI coding sessions with isolated git worktrees:
bash ~/.config/tmux/plugins/tmux-agent-status/scripts/deploy-sessions.sh manifest.json
Each session gets a deploy/<name> branch, and the plugin tracks the spawned sessions automatically.
SSH Remote Sessions
Monitor AI agents on remote machines:
./setup-server.sh <session-name> <ssh-host>
Works with cloud VMs, GPU boxes, and any SSH-accessible tmux host.
How It Works
┌──────────────┐ hooks ┌──────────────────────────┐
│ Claude Code ├─────────────►│ ~/.cache/tmux-agent- │
└──────────────┘ │ status/ │
│ <session>.status │
┌──────────────┐ hooks │ panes/*.status │
│ Codex CLI ├─────────────►│ wait/*.wait │
└──────────────┘ │ parked/*.parked │
└─────────────┬────────────┘
┌──────────────┐ status files │
│ Custom agent ├────────────────────────────┘
└──────────────┘
▼
┌──────────────────────────┐
│ sidebar-collector.sh │
│ writes shared cache and │
│ status summary │
└─────────────┬────────────┘
│
┌──────────────────┼──────────────────┐
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ sidebar pane │ │ status line │ │ fzf switcher │
└──────────────┘ └──────────────┘ └──────────────┘
- Claude Code support is hook-based
- Codex CLI support is hook-based
- Custom agents can be file-based or process-detected
- The sidebar is the main live view; the
fzfswitcher is the quick jump and close tool
License
MIT
Ähnliche Projekte entdecken
Wird geladen…
