Multi-agent session handoff framework for Claude Code and Codex CLI
Project description
superharness
Multi-agent task coordination for Claude Code and Codex CLI
superharness lets AI coding assistants work on the same project without stepping on each other. It provides a shared contract, queue-based delegation, and handoff/ledger state so tasks survive across sessions.
AI agent installing this? Read
docs/INSTALL-AGENT.md— it tells you exactly what to detect, what to ask the user (just two questions), and how to set everything up without human terminal interaction.
Using superharness
Via Claude Code or Codex CLI (recommended)
Step 1 — Install superharness once (terminal):
pipx install superharness
Alternative: install from source
curl -fsSL https://raw.githubusercontent.com/celstnblacc/superharness/main/scripts/install-remote.sh | bash
# export PATH="$HOME/.local/bin:$PATH" # add to ~/.zshrc or ~/.bashrc if needed
Or clone manually:
git clone https://github.com/celstnblacc/superharness.git ~/.local/share/superharness
bash ~/.local/share/superharness/scripts/install-wrapper.sh
Step 2 — Go to your project and open Claude Code or Codex CLI.
Step 3 — Type these phrases directly to the agent:
shux init # bootstrap .superharness/ for this project
shux doctor # check prerequisites and protocol health
shux contract # show all tasks with status and next-task suggestion
shux continue # resume active contract automatically
shux delegate <id> # create task + enqueue in one step
shux test-type <id> # set mandatory test types for a task
shux verify <id> # record verification result (pass/fail)
shux close <id> # mark done (requires verify), append ledger, write handoff
shux status # dashboard: tasks, watcher, profile
shux recall <keywords> # search past handoffs and ledger
shux uninstall # remove watcher and system artifacts for this project
shux hygiene # validate protocol compliance (contract, handoffs, ledger)
shux monitor # open browser dashboard
shux watch # start continuous watcher in foreground
shux update # pull latest superharness + refresh CLAUDE.md, AGENTS.md, templates
shux discuss # start or manage a cross-agent discussion (topic, owners, optional ID)
shux help # show all shux shortcuts in the terminal
That's it. Steps 1 and 2 are one-time. From then on, shux contract starts every session.
Via Terminal (alternative)
For scripting, CI, or users who prefer direct shell access.
Requires:
bash,python3. See Prerequisites.
# Try first — no install needed
PYTHONPATH=src python3 -m superharness demo
# Install CLI
pipx install superharness && superharness --version
# Initialize project
cd /path/to/project
superharness init --interactive # or: superharness init "Name" "Stack" "active"
# Verify
superharness doctor --project .
# Contract snapshot
superharness contract today --project .
# Delegate to agent
superharness delegate --to codex-cli --project .
# Queue management
superharness enqueue --project . --to codex-cli --task my-task --priority 1
superharness dispatch --project . --to codex-cli
# Protocol hygiene + browser monitor
superharness hygiene --project .
superharness monitor-ui --project .
Run tests:
uv sync --dev
pytest tests/ -q
Full terminal reference: docs/GUIDE.md
Quick Links
📘 User Guide — Commands, background watcher, troubleshooting 🏗️ Architecture — Why it exists, how it works, design decisions 🔒 Security — Threat model and operational safety notes
What You Get
shuxshortcuts — Control superharness from inside Claude Code or Codex CLIsuperharness init— Bootstrap protocol files (.superharness/)superharness delegate— Launch agent with contract context (auto model routing)superharness verify— Record verification result before closing a tasksuperharness close— Close a verified task (done + ledger + handoff)superharness enqueue|dispatch|watch— Queue-based task routingsuperharness hygiene— Protocol compliance checkssuperharness watch --foreground— Cross-platform continuous watchersuperharness monitor-ui— Browser dashboard: inbox, tasks, watcher state, plan approvalssuperharness doctor— Prerequisite and setup health checksuperharness uninstall— Clean removal of system artifacts- Background watcher — Unattended execution via macOS launchd or Linux systemd (opt-in)
Is this for me?
superharness is for you if any of these are true:
- You use Claude Code or Codex CLI and find yourself re-explaining project context at the start of every session
- You want to hand off a task to one agent while you work with another
- You need an append-only audit trail of what each agent did and decided
- You run agents unattended in the background (e.g. via launchd/systemd)
You probably don't need superharness if you only ever run a single agent interactively and don't switch between sessions.
What you need to use it
| Feature | Requirements |
|---|---|
| Core protocol (contracts, handoffs, ledger) | bash, python3 |
Agent shortcuts (shux) |
+ claude or codex CLI |
| Background auto-dispatch | + launchd (macOS) or systemd (Linux) |
| Browser dashboard | + python3 -m http.server (built-in) |
You can start with just the core and add agent CLIs and background services later. --print-only mode lets you preview every dispatch without launching anything.
Platform Support
Cross-platform: macOS, Linux, Windows. All user-facing commands are Python and work everywhere python3 is available. CI runs on all three platforms.
- Background watcher has automated installers for both macOS (
launchd) and Linux (systemd).superharness watch --foregroundworks everywhere including Windows.
Prerequisites
python33.9+ +pyyaml—uv sync --dev(orpip install pyyaml click ruamel.yaml)bash(only needed for background watcher installer on macOS; not required for core commands)claudeCLI (for Claude delegation commands):npm install -g @anthropic-ai/claude-codecodexCLI (for Codex delegation commands):npm install -g @openai/codex- macOS
launchdor Linuxsystemdfor background watcher (see Platform Support);--foregroundmode works everywhere
Project Runtime State
Per-project state lives in .superharness/:
.superharness/
├── contract.yaml # tasks, decisions, failures
├── handoffs/ # session handoff state
├── ledger.md # append-only event log
├── decisions.yaml # cross-agent ADRs
├── failures.yaml # failure memory
└── inbox.yaml # dispatch queue
Architecture details: docs/ARCHITECTURE.md
Repository Layout
superharness/
├── superharness # thin Bash shim → delegates to Python
├── src/superharness/ # Python CLI + engine + command modules
├── protocol/ # protocol spec + templates
├── adapters/ # Claude/Codex adapter assets
├── scripts/ # launchd installer + CI guard scripts
├── docs/ # architecture and user guide
├── tests/ # unit/integration/e2e tests
└── CHANGELOG.md
Security Note
The background watcher enables unattended execution (agents run without human supervision). This is powerful but requires explicit confirmation:
macOS (launchd):
bash scripts/install-launchd-inbox-watcher.sh \
--project /path/to/project \
--interval 30 \
--confirm-non-interactive yes \
--confirm-skip-permissions yes
Linux (systemd):
CONFIRM_NON_INTERACTIVE=yes bash scripts/install-systemd-inbox-watcher.sh \
--project /path/to/project \
--interval 30
Read the full threat model: SECURITY.md
Current Version
Current version: v0.8.0
See CHANGELOG.md for the full iteration log.
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 superharness-0.9.6.tar.gz.
File metadata
- Download URL: superharness-0.9.6.tar.gz
- Upload date:
- Size: 73.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e388298efe9779e0699bd5e51b069e91f0be5ed5d4ef603f2145ecd4a28ef3f
|
|
| MD5 |
734d487fc751b968bc4285ad626657ed
|
|
| BLAKE2b-256 |
e4d91c1a2168ede4ce6a48df44ea962b040069eae2908b792a035f7a421dbdba
|
Provenance
The following attestation bundles were made for superharness-0.9.6.tar.gz:
Publisher:
publish.yml on celstnblacc/superharness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superharness-0.9.6.tar.gz -
Subject digest:
2e388298efe9779e0699bd5e51b069e91f0be5ed5d4ef603f2145ecd4a28ef3f - Sigstore transparency entry: 1108165712
- Sigstore integration time:
-
Permalink:
celstnblacc/superharness@8402ce9d0328c2112585bb0dc594b7fb48240acc -
Branch / Tag:
refs/tags/v0.9.6 - Owner: https://github.com/celstnblacc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8402ce9d0328c2112585bb0dc594b7fb48240acc -
Trigger Event:
release
-
Statement type:
File details
Details for the file superharness-0.9.6-py3-none-any.whl.
File metadata
- Download URL: superharness-0.9.6-py3-none-any.whl
- Upload date:
- Size: 93.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1608fbaa298159a0ff9a0621aa57499f1c58b8a795ac78324b078f12cf782fd
|
|
| MD5 |
44a6fd588bc524ead2062adda4e3a128
|
|
| BLAKE2b-256 |
93dec4302b2a7a0d82a8842847578d134da9f6bb8cf088c36329ec73281fe436
|
Provenance
The following attestation bundles were made for superharness-0.9.6-py3-none-any.whl:
Publisher:
publish.yml on celstnblacc/superharness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superharness-0.9.6-py3-none-any.whl -
Subject digest:
e1608fbaa298159a0ff9a0621aa57499f1c58b8a795ac78324b078f12cf782fd - Sigstore transparency entry: 1108165724
- Sigstore integration time:
-
Permalink:
celstnblacc/superharness@8402ce9d0328c2112585bb0dc594b7fb48240acc -
Branch / Tag:
refs/tags/v0.9.6 - Owner: https://github.com/celstnblacc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8402ce9d0328c2112585bb0dc594b7fb48240acc -
Trigger Event:
release
-
Statement type: