A safe, human-in-control companion that waits for Claude Code usage resets, resumes your session, and optionally automates repetitive permission prompts for the active task.
Project description
Claude Supervisor
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
--captureand tune — see docs/ALPHA_TESTING.md. - 🔜 No interactive passthrough yet. Today's model is unattended (hand it a
task via headless
claude -p); anattachmode 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/resumefail 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_permissionsdefaults tofalse. 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_supervisor-0.1.0.tar.gz.
File metadata
- Download URL: claude_supervisor-0.1.0.tar.gz
- Upload date:
- Size: 74.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e054b8aef4990a592a2dab204404b6e14816136c274c659c3baa002368fedad3
|
|
| MD5 |
9c44e8d475f1f2e3a8f7237c674275a3
|
|
| BLAKE2b-256 |
b14cf4ec0705106973dfb82f856e5e26ee43896f45ba1786c8f74a13ee53ede1
|
Provenance
The following attestation bundles were made for claude_supervisor-0.1.0.tar.gz:
Publisher:
release.yml on OnamSharma/claude-supervisor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_supervisor-0.1.0.tar.gz -
Subject digest:
e054b8aef4990a592a2dab204404b6e14816136c274c659c3baa002368fedad3 - Sigstore transparency entry: 2154218010
- Sigstore integration time:
-
Permalink:
OnamSharma/claude-supervisor@cb2e813dc8238a0befc2b49bc1c851a1f56526d4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/OnamSharma
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cb2e813dc8238a0befc2b49bc1c851a1f56526d4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file claude_supervisor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: claude_supervisor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 57.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2041e413b4ae74a5119fe641e7f795f69830174ab310d4cdd07e2965345a99f
|
|
| MD5 |
777305ff086786045fe50c4f5f1ceb36
|
|
| BLAKE2b-256 |
293bb8622c1d920240d94ecfe4efc1f5a40115697cbd03be89cc08bccdc8145c
|
Provenance
The following attestation bundles were made for claude_supervisor-0.1.0-py3-none-any.whl:
Publisher:
release.yml on OnamSharma/claude-supervisor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_supervisor-0.1.0-py3-none-any.whl -
Subject digest:
e2041e413b4ae74a5119fe641e7f795f69830174ab310d4cdd07e2965345a99f - Sigstore transparency entry: 2154218101
- Sigstore integration time:
-
Permalink:
OnamSharma/claude-supervisor@cb2e813dc8238a0befc2b49bc1c851a1f56526d4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/OnamSharma
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cb2e813dc8238a0befc2b49bc1c851a1f56526d4 -
Trigger Event:
push
-
Statement type: