Subscription Agent Scheduler (subsched)
subsched is a deterministic, subscription-aware coding agent scheduler that turns GitHub Issues into a durable task queue and routes tasks to coding agents (Claude Code, OpenAI Codex) with zero metered API fallback.
Key Features
- 🔒 Subscription-Only Execution: Strictly operates within flat-rate subscription quotas (Claude Pro/Team, ChatGPT Plus/Team). Prevents accidental pay-as-you-go API key charges with fail-closed safety.
- 🌳 Worktree Isolation: Creates isolated Git worktrees (
subsched/issue-<number>) for each task to prevent workspace collision. - ⚡ Multi-Agent Capacity & Failover: Monitors rate limits across providers in real time, automatically failing over between agents (Claude ↔ Codex) or pausing until reset time.
- 🛡️ Automated TDD & Quality Gates: Enforces test-driven development, running repository verification (
ruff,mypy,pytestwith $\ge 80%$ coverage,pip-audit) before pull requests. - 🔀 Merge Conflict Protection: Automatically attempts
git rebase mainand cleanly aborts (git rebase --abort) on conflict, safely escalating toNEEDS_HUMAN. - 📊 Observability & Metrics: Tracks autonomous completion rates, task success metrics, structured JSON Lines event logs, and markdown run reports.
Requirements
- Python
>=3.12 uv- Git
>=2.40 - GitHub CLI (
gh) - Coding agent CLI tools:
claudeand/orcodex
Quickstart
1. Installation
Option A: Run immediately without installation (uvx)
uvx agent-scheduler doctor
uvx agent-scheduler run --repo owner/project --issues 101 --dry-run
Option B: Global CLI install (uv tool)
# Install from source
uv tool install -e .
# Or install from PyPI (once published)
uv tool install agent-scheduler
Option C: Development setup
git clone https://github.com/takurot/agent-scheduler.git
cd agent-scheduler
uv sync --extra dev
uv run subsched doctor
Usage
Environment Diagnostic
Verify local executables and GitHub token scope:
subsched doctor
Running Tasks
Dry-run Mode (Safe Queue Preview)
Discovers issues and populates the durable queue without calling agent subprocesses or creating PRs:
subsched run --repo owner/project --issues 101,102 --dry-run
Live Agent Execution (--allow-native)
Executes coding agents in subscription mode, runs tests, and creates Pull Requests:
# Run specific issues
subsched run --repo owner/project --issues 101,102 --allow-native
# Run by label
subsched run --repo owner/project --label ai-ready --allow-native
# Run with natural language instruction
subsched run "Execute all open issues" --repo owner/project --allow-native
# Run using configuration file
subsched run --config subsched.yaml --allow-native
Monitoring & Operations
# Check queue and cooldown status
subsched status
# View Productivity, Reliability, and Capacity metrics
subsched metrics
subsched metrics --json
subsched metrics --report run_report.md
# Emergency pause and resume
subsched pause
subsched resume
# Cancel a specific task while preserving worktree state
subsched cancel 101
Configuration (subsched.yaml)
You can place a subsched.yaml in your project root to customize repositories, concurrency, and verification commands:
github:
repo: owner/project
mode: all-open # or label: "ai-ready"
execution:
concurrency: 1
# Custom test and lint commands for your language
verification:
commands:
- pytest
- ruff check .
# For Node.js / TypeScript:
# - npm test
# - npm run lint
CLI Reference
| Command | Description |
|---|---|
subsched doctor |
Check prerequisite binaries and inspect GitHub token scope |
subsched run |
Discover issues, initialize queue, and dispatch tasks |
subsched status |
Display queue breakdown, cooldowns, and scheduler state |
subsched metrics |
Output Productivity, Reliability, and Capacity metrics |
subsched pause |
Pause task execution cleanly after current step |
subsched resume |
Resume scheduler execution from paused state |
subsched cancel <id> |
Cancel a task and preserve its worktree files |
Documentation
docs/SPEC.md: Ground-truth specification and safety invariants.docs/RUNBOOK.md: Operator runbook for running, monitoring, and disaster recovery.docs/WORKFLOW.md: Contributor and development workflow.
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 agent_scheduler-0.1.0.tar.gz.
File metadata
- Download URL: agent_scheduler-0.1.0.tar.gz
- Upload date:
- Size: 158.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fcc33e348c6392036de54937f7e9df2cef3216d678ca97dd6976fe67692a68e
|
|
| MD5 |
3a8b9a5864e1ab30a63387fd851ee26a
|
|
| BLAKE2b-256 |
ae109f711d149eb57109e849042ca00103e628c069d20b4bf984ff423e061301
|
Provenance
The following attestation bundles were made for agent_scheduler-0.1.0.tar.gz:
Publisher:
release.yml on takurot/agent-scheduler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_scheduler-0.1.0.tar.gz -
Subject digest:
1fcc33e348c6392036de54937f7e9df2cef3216d678ca97dd6976fe67692a68e - Sigstore transparency entry: 2561937615
- Sigstore integration time:
-
Permalink:
takurot/agent-scheduler@827fd38dd087c6067a1b65dd8a0d07a385e535a9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/takurot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@827fd38dd087c6067a1b65dd8a0d07a385e535a9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agent_scheduler-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agent_scheduler-0.1.0-py3-none-any.whl
- Upload date:
- Size: 71.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b77d611474d1d189827f32cffb797f18bbf2322f14c2710232320c821dae181
|
|
| MD5 |
56c58ac6d5a4d0e03f3573d0bd995f8e
|
|
| BLAKE2b-256 |
0b86233fe474248f8986ba72e2b41a02381c92137bb3efb8a8bab8bb1ec75642
|
Provenance
The following attestation bundles were made for agent_scheduler-0.1.0-py3-none-any.whl:
Publisher:
release.yml on takurot/agent-scheduler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_scheduler-0.1.0-py3-none-any.whl -
Subject digest:
9b77d611474d1d189827f32cffb797f18bbf2322f14c2710232320c821dae181 - Sigstore transparency entry: 2561937825
- Sigstore integration time:
-
Permalink:
takurot/agent-scheduler@827fd38dd087c6067a1b65dd8a0d07a385e535a9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/takurot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@827fd38dd087c6067a1b65dd8a0d07a385e535a9 -
Trigger Event:
push
-
Statement type: