claude-code-supervisor
Supervise Claude Code sessions running in tmux. Uses Claude Code hooks with bash pre-filtering (Option D) and fast LLM triage to detect errors, stuck agents, and task completion. Harness-agnostic — works with OpenClaw, webhooks, ntfy, or any notification backend. Use when: (1) launching long-running Claude Code tasks that need monitoring, (2) setting up automatic nudging for API errors or premature stops, (3) getting progress reports from background coding agents, (4) continuing work after session/context limits reset. Requires: tmux, claude CLI.
Why use this skill?
Manage long-running Claude Code tasks with intelligent triage. Supervise sessions, detect errors, and automate agent nudging in tmux using OpenClaw.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/johba37/claude-code-supervisorWhat This Skill Does
The claude-code-supervisor skill acts as an intelligent bridge between the Claude Code CLI and your local OpenClaw agent harness. By hooking into the Claude Code lifecycle, this skill monitors background sessions running in tmux. It employs a two-tier verification system: a bash-based pre-filter (Option D) that discards routine noise and an LLM-powered triage step (using lightweight models like Haiku) to evaluate the health of the coding agent. It detects when agents are stuck, require human intervention for permissions, or have finished a task, notifying your preferred output channel—whether that be an OpenClaw notification, ntfy, or a custom webhook. This effectively automates the management of autonomous coding sessions.
Installation
To begin, ensure you have tmux and the Claude CLI installed on your machine. You can install this skill by running: clawhub install openclaw/skills/skills/johba37/claude-code-supervisor inside your terminal. After installation, execute the script at {baseDir}/scripts/install-hooks.sh /path/to/your/project to wire the supervisor into your project directory. This generates the necessary .claude/ configuration files. Configure your notification preferences and LLM endpoint in the generated .claude-code-supervisor.yml file, and ensure your session state is registered in ~/.openclaw/workspace/supervisor-state.json to enable active tracking.
Use Cases
- Automated Long-Running Tasks: Perfect for large refactoring jobs or comprehensive test suites that exceed standard timeout limits.
- Proactive Nudging: Automatically triggers a nudge (via
tmux send-keys) if the agent hangs on a 500 error or requires a specific user interaction that was previously missed. - Progress Reporting: Receive concise updates from long-running background tasks without needing to monitor the terminal buffer manually.
- Failure Recovery: Automatically detect when an agent hit a token limit or rate limit and reset or pause the session state accordingly.
Example Prompts
- "OpenClaw, launch a new claude-code-supervisor session for the user authentication refactor in the backend repo."
- "Check the status of my active tmux coding sessions and notify me if any have stalled or require a nudge."
- "Configure the supervisor to escalate to me on Slack if the 'data-migration' session hits a blocking error after three retries."
Tips & Limitations
- Efficiency: Use the fastest available LLM for triage (e.g., Haiku) to minimize latency and costs. The bash pre-filter is your primary defense against unnecessary API calls—customize it to fit your specific workflow.
- Security: The supervisor can perform
send-keysto your terminal sessions. Ensure you restrict access to the tmux socket files. - Limitations: This skill relies on the stability of the Claude Code CLI and tmux. If the underlying tmux server crashes, the supervisor will lose the connection to the session.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-johba37-claude-code-supervisor": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, external-api, code-execution