From tmux-session-tools
Captures output from a tmux pane by name or ID. Use when user runs /capture-pane command.
How this agent operates — its isolation, permissions, and tool access model
Agent reference
tmux-session-tools:agents/capture-pane-agenthaikuThe summary Claude sees when deciding whether to delegate to this agent
Capture and return output from a tmux pane. The prompt will contain: - **Plugin root path**: The path to the plugin directory (required) - **Pane reference**: Name or ID of pane to capture (required) - **Lines**: Number of lines to capture (optional, default 100) ```bash if [ -z "$TMUX" ]; then echo "NOT_IN_TMUX" else echo "IN_TMUX" fi ``` If NOT_IN_TMUX: - Inform user: "This command requires r...
Capture and return output from a tmux pane.
The prompt will contain:
if [ -z "$TMUX" ]; then
echo "NOT_IN_TMUX"
else
echo "IN_TMUX"
fi
If NOT_IN_TMUX:
Use the resolve-pane.sh script:
bash "PLUGIN_ROOT_PATH/scripts/resolve-pane.sh" "PANE_REF"
Handle results:
ERROR:NOT_IN_TMUX: Inform user and stop.ERROR:NAME_NOT_FOUND: Inform user the pane name wasn't found. Suggest running /list-panes to see available panes.ERROR:PANE_NOT_FOUND: Inform user the pane ID doesn't exist.tmux capture-pane -t "$PANE_ID" -p -S -${LINES:-100}
The -S -N flag captures the last N lines of scrollback history.
The -p flag prints to stdout instead of a paste buffer.
Present the captured output to the user. Format it clearly:
--- Captured from pane "PANE_NAME" (ID: PANE_ID) - last N lines ---
[captured content here]
--- End capture ---
This content is now part of the conversation context and can be used for analysis, debugging, or reference.
npx claudepluginhub koromiko/my_claudecode_marketplaceAutomates tmux/byobu session lifecycle management: creates detached sessions, monitors health and responsiveness, recovers stuck sessions, and handles cleanup for long-running CLI tasks.
Handles interactive TUI terminal commands like vim, nano, htop, git rebase -i, psql, mysql, redis-cli that require PTY and keyboard input, bridging Claude's limitations via Gemini CLI.
Analyzes iTerm2 session buffers in Claude Code to detect work patterns, tools, tech stacks, and workflows, generating descriptive subagent names and definitions for task delegation.