repo-harness
A file-backed workflow harness that keeps Claude Code and Codex sessions resumable, reviewable, and bounded by plans, contracts, checks, and handoffs stored in your repo.
- Source repo
- aimpact-inc/repo-harness
- Stars
- ★ 436
- Last updated
- today v0.37.5
- FARS reviewed
- Sep 18, 2026 +20 new
- License
- MIT
- Primary language
- TypeScript
- FA score
- 35/100 · Major gaps
At a glance
- How it runs
- Works with
- Portable with changesChatGPT · Codex · Claude Code
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A developer running both Claude Code and Codex on one repository who wants the next session to resume the exact next step, blockers, and changed files instead of re-deriving them.
- Not a fit if
- Teams that cannot install the external herdr runtime and Bun
- Windows users who need native persistent review hosting (WSL required)
- Projects unwilling to commit plans/, tasks/, and .ai/harness/ artifacts
- Website
- repoharness.com ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-27latest release v0.37.5 (2026-11-26)
- Source review
- 35/100 · Major gaps
What does this agent do, and when should you use it?
repo-harness is a TypeScript CLI and hook runtime published on npm ([email protected]) that makes the repository itself the durable memory for Claude Code and Codex sessions. Running repo-harness init writes a repo-local contract — docs/spec.md, plans/, tasks/contracts/, tasks/reviews/, .ai/harness/handoff/, and .ai/harness/checks/ — while user-level adapters in ~/.claude/settings.json and ~/.codex/hooks.json route host events into the typed repo-harness-hook registry. That registry binds eight shared routes (SessionStart, PreToolUse.edit, PreToolUse.subagent, PostToolUse.edit, PostToolUse.bash, PostToolUse.always, UserPromptSubmit, Stop) plus three Codex-only delegation routes, each to exactly one in-process handler that injects the prior handoff, guards edits against plan/contract/worktree policy, and records verification evidence. A second layer of authorized programs adds operator-minted ProgramAuthorizationV1 grants, a per-goal budget ledger, renewable leases, and an unattended controller under hard step, duration, and retry caps, so campaign, refactor, collaboration, and external-source work advances without a human stepping each task. Optional surfaces include a loopback-only operator board, an MCP planner sidecar that lets ChatGPT author PRDs, sprints, and Codex goals, and a read-only Claude acceptance reviewer hosted in a herdr session. It runs on Bun ≥ 1.4.0 inside a Git working tree, and host readiness requires the external herdr ≥ 0.9.0 binary.
repo-harness install performs the global bootstrap: it installs the npm package as the global CLI, refreshes skill aliases, installs user-level hook adapters, and records an install profile; repo-harness init (previewable with --dry-run) then writes docs/spec.md, plans/, tasks/, .ai/context/, .ai/harness/, helper scripts, and .ai/hooks/ into the target repository. At runtime repo-harness-hook handles host events: SessionStart injects the prior handoff, sprint status, minimal-change guidance, and read-only config-security findings; PreToolUse.edit enforces plan, contract, and worktree policy through PlanStatusGuard, ContractGuard, and WorktreeGuard; PostToolUse.edit writes at most one journal event with dirty bits per qualifying edit; PostToolUse.bash captures verification evidence; Stop finalizes the handoff and blocks ending with unresolved draft plans or evidence gaps. Verification runs bash scripts/check-task-workflow.sh --strict and bun test, lands structured evidence in .ai/harness/checks/latest.json and .ai/harness/runs/*.json, and surfaces the decision in the ## Human Review Card of tasks/reviews/<task>.review.md. Structural questions are answered from a pre-built CodeGraph index instead of repeated grep-and-read passes. Unattended work is driven by automation grant mint, automation budget show|repair, automation controller start|step|status|stop, engineer acquire-next, campaign audit|author|adopt|step, refactor discover|materialize, collaboration exchange|post|handoff, external-source refresh|bind, and claude-review round, with every step projected back into the same plan, contract, and review artifacts.
- A developer running both Claude Code and Codex on one repository who wants the next session to resume the exact next step, blockers, and changed files instead of re-deriving them.
- A solo developer or team that wants every task to leave a contract, structured check evidence, and a one-screen Human Review Card for pass, residual-risk, and rollback decisions.
- A team running long unattended sprints that requires a stored authorization, budget caps, leases, and acceptance receipts before an agent may advance work.
- A ChatGPT user who wants to draft PRDs, sprint backlogs, and Codex goals against real repository state, then hand execution to Codex.
- A maintainer adopting an existing repo who wants to preview the tasks-first agent contract with
repo-harness init --dry-runbefore committing to it. - A team that needs an independent read-only Claude review round against prepared verify-sprint evidence.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
curl -fsSL https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.sh | shirm https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.ps1 | iexbunx repo-harness@latest install # Bun one-shot bootstrapbun add -g repo-harness # or install the persistent CLI first
- Config files
.ai/harness/checks/latest.json- Runtime
- Bun 1.4.0+
- Install notes cover
- Windows · macOS · Linux
How do you install or deploy this agent?
Prerequisites: a Git working tree and Bun ≥ 1.4.0; macOS/Linux also need bash, Windows needs Git for Windows including its Bash and usr/bin tools, and host readiness requires a usable herdr ≥ 0.9.0. jq is optional and no Node.js is required.
Install with the shell installer:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.ps1 | iexWith Bun ≥ 1.4.0 already on PATH you can skip the shell installer and bootstrap from the package:
bunx repo-harness@latest install # Bun one-shot bootstrap
bun add -g repo-harness # or install the persistent CLI first
repo-harness install
npx -y repo-harness@latest install # npx fallback; the CLI still runs on BunInstall the peer terminal runtime separately from herdr.dev and confirm it resolves:
herdr --versionrepo-harness install is the global bootstrap: it installs the global CLI, refreshes skill aliases, installs the Claude and Codex user-level hook adapters, and records an install profile. It is idempotent, does not apply repo-local workflow files to the current directory, and can be previewed with --dry-run --json. On Windows keep Git for Windows on the install/update PATH and rerun repo-harness update after relocating or replacing it.
How do you use this agent?
From the target repository root, preview and then apply the repo-local contract:
repo-harness init --dry-run
repo-harness init
bash scripts/check-task-workflow.sh --strict
bun testinit never creates an application stack; new projects and modules use repo-harness-setup's scaffold mode. Apply ends with a === Migration Report === naming the hook adapter targets, the repo-local surfaces, the .ai/harness/scripts/* helper runtime, and an --- External Tooling --- readiness block.
Day to day the lifecycle is plan → contract → review: mark a plan Approved in plans/, project it into tasks/contracts/, implement under the hooks, collect evidence in .ai/harness/checks/latest.json, then read the ## Human Review Card in tasks/reviews/<task>.review.md.
To run unattended work you must mint an authorization first — there is no unauthenticated start path:
repo-harness automation grant mint
repo-harness automation grant list
repo-harness automation budget show
repo-harness automation controller start --maximum-steps 20 --maximum-duration-ms 300000
repo-harness automation controller statusOptional surfaces:
repo-harness operator serve
repo-harness mcp setup chatgpt --repo .
repo-harness mcp serve --repo . --transport http --host 127.0.0.1 --port 8765 --profile planner
repo-harness claude-review round --timeout-ms 1800000Keep the CLI current and remove it cleanly:
repo-harness update --check
repo-harness update
repo-harness uninstall --dry-runSafety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
What are this agent's strengths and limitations?
- Session state lives in the repo, not the chat thread: SessionStart injects the prior handoff and Stop writes the next one, so Claude and Codex sessions resume across hosts and restarts.
- Hard guards at the edit boundary: PlanStatusGuard, ContractGuard, and WorktreeGuard block writes without an executable plan, a missing contract, or from the wrong worktree, with failures recorded in
.ai/harness/failures/latest.jsonl. - Every task leaves a contract, structured check evidence, and a Human Review Card covering verdict, intended vs actual files, commands passed, residual risk, and rollback.
- Unattended work is bounded by artifacts: no start without a ProgramAuthorizationV1, budget reserved before each attempt, tasks held through renewable leases, acceptance requiring its own receipt.
- Token-lean context: a stable ~12KB root context plus ~1KB capability contracts loaded on demand, backed by a pre-built CodeGraph index instead of repeated grep-and-read passes.
- MIT licensed and published on npm, with shell-script, bunx, global-install, and npx install paths.
- Requires Bun ≥ 1.4.0 and the external herdr ≥ 0.9.0 binary; a missing or unusable herdr blocks host readiness outright.
- Windows needs Git for Windows on PATH plus an explicit protected-runtime ceremony, and persistent review hosting needs POSIX process groups, so Windows users must use WSL.
- Hook and skill adapters install at user level (
~/.claude/settings.json,~/.codex/hooks.json), while repo-local.claude/settings.jsonand.codex/hooks.jsonare legacy config you must migrate away from. - Real adoption cost in files:
initwrites docs/spec.md, plans/, tasks/, .ai/context/, .ai/harness/, and helper scripts, which a team has to accept as a convention. - Some capabilities depend on third parties: GPT Pro consults need the Oracle binary (a missing binary is a hard
ORACLE_NOT_INSTALLEDfailure), cross-review relies on Waza skills, and CodeGraph is an external package. - Still at 0.19.x with documented migrations: the tmux → herdr runtime cutover requires draining reviewers first, and backlog schema v2 needs
repo-harness sprint migrate-schema.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| repo-harness This agent | 35 · Major gaps | CLIFree + model costs | ★ 436 | today | TypeScript | ChatGPT · Codex · Claude Code |
| Forge Orchestrator | 43 · Major gaps | CLIFree + model costs | ★ 168 | today | Rust | Claude Code · OpenAI API |
| OpenRig | 79 · Good | CLIFree + model costs | ★ 9k | today | TypeScript | Codex · Claude Code |
| aisync | 70 · Some gaps | CLIFree | ★ 50 | 1d ago | Python | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
README describes authorization, budget, lease, rollback, and fail-closed guards, but only as textual claims; no verifiable permission list, confirmation flow, or data-flow diagram is provided. Dependencies (express, MCP SDK, archctx) lack security audits or version pinning notes. External effects and rollback are mentioned without implementation evidence. Each criterion scores 1 for present but thin.
CI workflows and test scripts exist, but no actual run results or failure message samples are provided. Dependency availability relies on external tools like Bun and herdr; README lacks fallback or offline plans. Self-consistency is only documented, not code-verified. Each scores 1.
README targets Claude Code and Codex users with broad scenarios, but lacks explicit capability boundaries, trigger conditions, or environment fit details (e.g., Windows requires WSL). No configuration examples for different environments. Each scores 1.
README is well-structured with install notes and a table of contents, but lacks FAQ, known limitations, changelog, and maintenance responsibility. License file is complete (MIT), so license scores 2; others score 1 due to insufficient information.
Output usability, marginal value, and cost-benefit are based on README claims without actual usage data or benchmarks. Only design intent is assessable, not real-world effectiveness. Each scores 1.
Claims in README (e.g., token savings, review-ready evidence) lack traceable references or independent corroboration. Test fixtures exist but are not directly linked to claims. Fact and inference are not clearly separated. Each scores 1.
- Security and reliability claims in README lack verifiable implementation evidence; treat with caution.
- Dependencies lack security audit or version pinning details, posing supply-chain risks.
- No changelog or maintenance responsibility provided; long-term maintainability unclear.
- Environment fit details are insufficient; Windows users require additional WSL configuration.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
v0.37.5 repo-harness 0.37.5
Release notes excerpt
Fixed - I2: managed sweep rotates its live-checkout and pruned-intent batches, so an entry that stays kept cannot starve the rest across runs. Each queue saves its last visited key in the existing Git common-directory intent store, the next run starts after that key and wraps at the end, and the two queues alternate which one goes first. Progress is recorded under the topology lock before an inspection can use the remaining time, the combined batch still holds at most eight entries with the existing live checkout reservation and deadline, and an overlapping run cannot overwrite newer prog …View on GitHub ↗ -
v0.37.4 repo-harness 0.37.4
Release notes excerpt
Added - Pi receives the managed Global Working Rules block in ~/.pi/agent/AGENTS.md on full-target install and update, only when the Pi plugin is selected. A new block needs a reporting language: --report-language or a language save in the operator console. Install, update, operator language settings and rh setup-check share one filename-precedence check against the Pi 1.6.0 loader order (AGENTS.override.md, AGENTS.md, AGENTS.MD, CLAUDE.md, CLAUDE.MD). A refused write names the file that would shadow the block or be shadowed by it. Uninstall and its preview apply the same …View on GitHub ↗ -
v0.37.3 repo-harness 0.37.3
Release notes excerpt
Changed - I2: rh seats launch starts agy seats with --dangerously-skip-permissions instead of --mode accept-edits and keeps --settings (trustedWorkspaces, permissions.allow and permissions.deny). The Antigravity guard readiness probe now also sends a protected-file overwrite and requires deny for it and for the .env read. A hook that returns force_ask fails antigravity-direct-command, and rh seats launch refuses the seat with antigravity_guard_unready. (#3487, #3493) …View on GitHub ↗
FAQ
Do I need both Claude Code and Codex installed?
Does the tool itself cost anything?
Does my workflow data leave the machine?
.ai/harness/. repo-harness operator serve binds to loopback only and does not expose repository paths, and the MCP server is a local HTTP service on 127.0.0.1:8765 that you expose yourself through an HTTPS tunnel.A hook blocked my edit — where do I look?
guard, reason, fix, failure_class, run_id. Durable records are in .ai/harness/failures/latest.jsonl and surrounding tool activity in .claude/.trace.jsonl. The common guards are PlanStatusGuard, ContractGuard, and WorktreeGuard.Can unattended automation be left running?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.