Skip to main content

Claude Supervisor

CI License: MIT Python 3.12+ Status: alpha

A safe, human-in-control companion for Claude Code.

Claude Supervisor watches your existing Claude Code session. When you hit a legitimate usage-limit reset, it waits for the reset, resumes your session exactly where Claude stopped, and — if you opt in — answers the repetitive permission prompts for the currently active task. The moment the task finishes, it hands full control back to you and stops.

It is not a bypass. Claude Supervisor never circumvents authentication, subscriptions, or rate limits. It waits for real resets and respects every limit. It never starts new work on its own.


What it does (and does not do)

Claude Supervisor does Claude Supervisor never
Detect usage limits from Claude's output Bypass usage limits or subscriptions
Wait for the legitimate reset, then resume Reverse-engineer or patch Claude
Continue exactly where Claude stopped Inject code into or impersonate Claude
Optionally auto-answer prompts for the active task Start new work or invent tasks
Stop and return control when the task completes Run indefinitely on its own

Project status

Alpha — the unattended flow is validated against real Claude Code; the usage-limit path is not yet exercised on a live rate limit. Please read this before relying on it.

  • ✅ Validated against real Claude Code (CLI 2.x, headless claude -p): the supervisor launches Claude, runs a task, detects the clean-exit completion, and records the run — confirmed end-to-end on Windows.
  • ✅ Thoroughly tested: 184 tests, 97% coverage, strict type-checking, CI on Windows + Linux across Python 3.12–3.14, including real-PTY integration tests.
  • ⚠️ Usage-limit detection not yet confirmed on a live limit. The wording of the reset message is driven by external YAML; if it differs on your account, run with --capture and tune — see docs/ALPHA_TESTING.md.
  • 🔜 No interactive passthrough yet. Today's model is unattended (hand it a task via headless claude -p); an attach mode that rides along an interactive session is planned.

Sending real Claude output samples (a --capture transcript) is the single most valuable contribution right now. See ROADMAP.md for what's next.

On Windows the PTY backend needs pywinpty; on POSIX, pexpect. Installing with [dev] or the platform extra pulls the right one. Without it, start/resume fail with a clear message instead of crashing.

Install

1. Get the Claude Code CLI

The supervisor drives the claude command-line tool (separate from the desktop app):

npm install -g @anthropic-ai/claude-code   # then reopen your terminal
claude --version

2. Install the supervisor

Requires Python 3.12+. Not yet on PyPI — install from source:

git clone https://github.com/OnamSharma/claude-supervisor
cd claude-supervisor
python -m venv .venv
# Windows: .venv\Scripts\activate    macOS/Linux: source .venv/bin/activate

pip install -e ".[dev]"          # contributors (tests, linters, PTY backend)
# or, just to run it:
pip install -e ".[pty-windows]"  # Windows PTY backend
pip install -e ".[pty-posix]"    # macOS/Linux PTY backend

Quickstart

claude-supervisor init          # write a starter config with sensible defaults
claude-supervisor doctor        # checks Python, config, parser rules, and the claude CLI

# from a directory you want Claude to work in:
claude-supervisor start --task "add a docstring to utils.py"
claude-supervisor status        # what happened: resumes, approvals, hours saved

init writes a config that launches Claude headless with tools pre-authorized (claude -p --permission-mode acceptEdits) — the validated recipe. Edit it if your setup differs.

All commands

claude-supervisor version
claude-supervisor init        # write a starter config
claude-supervisor doctor      # environment + config + parser rules + claude CLI check
claude-supervisor config      # show effective configuration
claude-supervisor start       # supervise a Claude session (add --task for unattended)
claude-supervisor resume      # resume the latest session (waiting for a reset)
claude-supervisor status      # latest session + aggregate statistics
claude-supervisor logs -n 50  # tail the supervisor log file
claude-supervisor statusline  # one-line summary for Claude Code's status bar

Inside Claude Code

Surface it in the Claude Code UI — a status line (🛡 3 runs · 1 resume · 2.1h saved) and a /supervisor slash command. See docs/CLAUDE_CODE_INTEGRATION.md. (The supervising itself runs from your shell — it has to keep going while Claude is rate-limited — but its status is visible from within Claude Code.)

Unattended runs: --task/-t hands Claude a task up front; the supervisor babysits it across usage-limit resets and reports when done. --auto-approve answers the repetitive permission prompts for that run only (you're opting in, per run). How the task reaches Claude is set by task_delivery (append as an argument for headless claude -p, or type it into an interactive session).

Press Ctrl+C to stop supervising and hand control back to yourself. Every run is recorded to a local SQLite database, so status reports resumes, approvals, and "hours saved" (unattended waiting the supervisor absorbed for you):

$ claude-supervisor status
      statistics (all sessions)
  total_sessions           1
  completed_sessions       1
  resumes                  1
  approvals                4
  average_wait_seconds     3600.0
  hours_saved              1.0

Configuration

Configuration is YAML, loaded from a per-user path (claude-supervisor config shows the exact location) or --config path.yaml. Every key is optional; the defaults are safe. See examples/config.yaml for all keys.

auto_resume: true             # resume automatically after a reset
auto_permissions: false       # OFF by default — you opt in to auto-answering
permission_mode: active_task_only
default_reset_hours: 5        # fallback wait when Claude reports no reset time
approve_response: "1\r"       # how to answer a prompt (numbered-menu "Yes")
completion_mode: strict       # 'heuristic' also stops when Claude goes idle
notify_on_finish: false

Claude Code's permission prompt is a numbered menu, and a finished turn usually has no "done" marker — Claude just idles at the prompt. So approve_response defaults to selecting menu option 1, and heuristic completion mode treats sustained idle as "turn finished, hand control back."

Why auto_permissions defaults to false. Auto-answering permission prompts removes a human safety checkpoint. Per this project's guiding rule — when uncertain, choose the safest behavior — you turn it on deliberately, and every auto-answer is logged.

The compatibility layer

Detection rules live in external YAML, not in code, so wording changes in Claude Code don't require a new release. The bundled defaults are in src/claude_supervisor/parser/rules/claude.yaml. Point paths.pattern_rules at your own copy to customize:

version: 1
ignore_case: true
patterns:
  usage_limit:
    - "usage limit reached"
    - "try again (?:in|after|at)\\b"
  permission:
    - "\\(y/N\\)"
  completed:
    - "task completed"

Architecture

Clean architecture, one responsibility per module, everything independently testable and swappable (parser, permission engine, notifier, storage, plugins). The control flow is an explicit state machine — not scattered booleans — so the safety rules are auditable. See docs/ARCHITECTURE.md.

STARTING → RUNNING ⇄ WAITING_FOR_PERMISSION
              │
              ├→ WAITING_FOR_RESET → RESUMING → RUNNING
              │
              └→ TASK_COMPLETED → STOPPED     (never back to RUNNING)

Development

pytest              # run tests with coverage
ruff check .        # lint
black --check .     # format check
mypy src            # type check

Testing the alpha

Trying it out? Start with docs/ALPHA_TESTING.md — it covers the flow that works end-to-end today and the rough edges to watch for. The best way to help: run with --capture run.txt and open an issue with that file so we can tune detection against real Claude output.

Contributing

See CONTRIBUTING.md. By participating you agree to the Code of Conduct. Security issues: SECURITY.md.

License

MIT.


Claude Supervisor is an independent, unofficial tool and is not affiliated with or endorsed by Anthropic. "Claude" and "Claude Code" are products of Anthropic.

Metadata

Release files for claude-supervisor 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-supervisor 0.1.0
File Size Uploaded Provenance
claude_supervisor-0.1.0.tar.gz 74.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-supervisor 0.1.0
File Interpreter ABI Platform
claude_supervisor-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 132.0 kB

Release files / claude_supervisor-0.1.0.tar.gz

Download URL claude_supervisor-0.1.0.tar.gz
Size 74.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e054b8aef4990a592a2dab204404b6e14816136c274c659c3baa002368fedad3
BLAKE2b-256 checksum
How to use checksums
b14cf4ec0705106973dfb82f856e5e26ee43896f45ba1786c8f74a13ee53ede1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.

Transparency log

Release files / claude_supervisor-0.1.0-py3-none-any.whl

Download URL claude_supervisor-0.1.0-py3-none-any.whl
Size 57.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2041e413b4ae74a5119fe641e7f795f69830174ab310d4cdd07e2965345a99f
BLAKE2b-256 checksum
How to use checksums
293bb8622c1d920240d94ecfe4efc1f5a40115697cbd03be89cc08bccdc8145c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.

Transparency log

Security for claude-supervisor 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for claude_supervisor-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page