Ancienttwo/repo-harness

File-backed workflow harness for reliable Claude Code and Codex sessions.

What it solves

repo-harness provides a structured, file-backed workflow for AI agents (specifically Claude and Codex) to manage software development. It solves the problem of "chat memory loss," where agents lose context between sessions, by storing plans, task contracts, and handoffs directly in the repository files. It also addresses the risk of unattended AI autonomy by introducing a system of authorizations, budgets, and leases for long-running programs.

How it works

The system operates in two layers:

  1. Session Contract: A human-driven layer where tasks are managed through a lifecycle of Plan $\rightarrow$ Contract $\rightarrow$ Review. Hooks route agent events into typed handlers that enforce guards at the edit boundary.
  2. Authorized Programs: An automation layer for unattended work (like refactor campaigns or sprint controllers) that requires operator-minted authorizations and operates under a strict budget ledger.

It integrates with a CodeGraph index for structural queries and uses progressive context loading to keep token usage low by loading only the necessary capability blocks for the files being edited.

Who it’s for

  • Developers using AI agents like Claude or Codex for complex, multi-session coding tasks.
  • Teams wanting to implement agentic development flows with durable, reviewable evidence of work.
  • Operators who need to run unattended AI automation with hard caps on budget and duration.

Highlights

  • File-backed state: Resumes sessions from repository artifacts rather than chat history.
  • Bounded autonomy: Uses authorizations, budgets, and renewable leases to keep unattended programs accountable.
  • Token efficiency: Employs a pre-built CodeGraph and progressive context loading to minimize token overhead.
  • Structured evidence: Every task generates a contract and review card, making human verification concrete rather than based on agent claims.
  • MCP sidecar: Allows ChatGPT to plan PRDs and Sprints while Codex executes them without direct source-code write access.

Related

  • Project
  • Project
  • Project
  • Project