concord-agent-harness

agent
Security Audit
Fail
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Fail
  • rm -rf — Recursive force deletion command in concord/tests/acclint_test.sh
  • eval() — Dynamic code execution via eval() in concord/tests/cpptools_test.sh
  • rm -rf — Recursive force deletion command in concord/tests/cpptools_test.sh
  • rm -rf — Recursive force deletion command in concord/tests/delegate_test.sh
  • eval() — Dynamic code execution via eval() in concord/tests/delta_test.sh
  • rm -rf — Recursive force deletion command in concord/tests/delta_test.sh
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

A governed workflow for AI coding agents: plans you approve, tests first, independent review, a ledger of every verdict.

README.md

Concord
A governed workflow for AI coding agents

tests Website Docs: workflow Case study License: MIT Python 3.9+ stdlib

The demo in a terminal: a scripted executor edits outside its scope and fails, then passes.

A harness is the system around a model that lets it act as an agent: prompts, tools, skills, orchestration. Governance is what keeps a person accountable for what the agents ship: who decides, what counts as evidence, and what a verdict means.

Concord is a governance layer for coding agents. It separates three roles that one agent session would otherwise hold:

  • Who decides. You settle the plan's open questions, approve it and commit.
  • Who writes. A strong model plans and writes tests and small changes; low-cost models write bulky code inside each phase's declared files.
  • Who judges. A standard-library Python dispatcher runs the acceptance commands and records verdicts with their causes; a fresh reviewer reads each change at its risk tier.

The Concord loop: plan, grill, verifier, your go, failing tests, implement, check, review, report, your commit.

Online: the explainer (the loop, step by step) and the interactive map (every command, skill and record).

Over 46 days of production use by one developer, Concord recorded 1,315 verdicts. Low-cost models made the first attempt on two-thirds of the phases: in their checkout, 84% of those phases received a recorded PASS on the first attempt and 95% by the second. Executor list-price charges came to US$0.10 per phase with a recorded PASS (US$1.79 with the same tokens repriced at Claude Opus 5.5 rates); planning, checks and reviews ran on a flat-rate frontier subscription.

Contents

Principles, How it differs, How it works, Install, Try it, Run a ticket, Components, Safety, Results

Principles

Each promise is kept by code up to its limit. A test asserts each refusal in the table: guards_test.sh for P1 and P6, delegate_test.sh and testquality_test.sh for P2, papers_test.sh for P3, P4 and P7, and prgate_test.sh for P5, all in concord/tests/ (exit codes).

Promise Mechanism Refusal you can reproduce Limit
P1. Runs follow the approved plan text A recorded APPROVE binds to the text's hash An edited plan's run exits 11, even with --user-approved The code checks only that a recorded APPROVE quotes the text's hash, not who wrote it, and it neither records nor checks your go/no-go
P2. Tests fail before the code exists The red run: acceptance runs on the untouched tree first A delegated phase whose tests already pass exits 6 A session run (--begin) only warns
P3. A PASS rests on recorded results The dispatcher re-runs the acceptance commands on a copy of the run's result An unexpected or missing result: PASS exits 7 A forced PASS, or one with no acceptance command, is listed first; weak tests pass weak code
P4. Each phase declares its files first A change outside Files: and Follow-through: rejects the run REJECTED (not graded); PASS exits 7 Only OpenCode refuses the edit while the run is in progress; on the other executors the edit is found after the run
P5. Review rises with risk Each file in a pull request needs its riskiest run's tier; high needs two model families --pr-status exits 1 until every file is covered, no BLOCKER, HIGH or clause FAIL open A review covers only what its reviewer read, at the rank of the reviewer name the caller records
P6. Every run is recorded; overrides come first Ledgers keep every verdict, cause and finding, and the report's first section lists every override, such as a forced PASS --report exits 2 while a run lacks a verdict The planner alone assigns the causes; the report is a status export, not a check that every phase passed
P7. You commit Concord never commits to a branch (the only commit object it writes is the snapshot wt.py fork makes with git commit-tree, which no branch or ref points to); any index change or moved HEAD rejects a run A file staged after the run began makes --grade and a later PASS exit 7 and names the file No code stops the planning session from committing; that rule is an instruction

How it differs

Of the systems compared, only Concord binds an approval to the hash of the plan text its verifier read and re-runs the acceptance commands itself. Its dispatcher refuses a run whose plan text has no recorded APPROVE, and a PASS unless every acceptance command it re-ran gave the expected result. Source: docs/COMPARISON.md.

Kind of harness What you approve What a PASS rests on Who reviews What is recorded
Plan mode and subagents (Claude Code) Permission prompts and the plan Nothing built in Optional Nothing built in
Role-play frameworks (MetaGPT, ChatDev) Nothing during a run Unit tests or execution feedback Author or same model Typed documents or chat chains
Workflow plugins (ECC, agentic-sdlc) Prompt-text gates, advisory sign-offs Reports quoting commands and exit codes A separate agent Gate reports, persisted state
Self-improving harnesses (Harness²) Nothing during a run Execution contrasts Automated selector or judge Rollout ledgers
Concord Every plan; the commit Acceptance results the dispatcher re-ran A fresh agent by risk tier; two families at high Every run, verdict, cause and finding

How it works

  1. Plan. The planner reads the code, writes PLAN_<ticket>.md and asks at most five questions.
  2. Verify and go. A verifier checks the plan against the code; you give the go.
  3. Tests first. Failing tests are written and checked to fail for the stated reason.
  4. Implement. The planner writes each phase, or low-cost models write bulky ones in parallel.
  5. Check and review. The dispatcher grades each run; a reviewer reads each change at its risk tier.
  6. Report and commit. The report lists overrides first; you read it and commit.

Details: docs/WORKFLOW.md.

The overview of the interactive Concord map: from your ticket to your commit, the steps of a run, and the skills you can call at any time.

Install

git clone https://github.com/bqp007/concord-agent-harness.git && cd concord-agent-harness
bash install.sh --dry-run   # previews; writes nothing
bash install.sh

The install backs up and edits ~/.claude/CLAUDE.md and ~/.claude/settings.json, letting gh, git push, git fetch, git pull and git clone run outside Claude Code's sandbox in every project. It needs bash, git, Python 3.9+ and Claude Code; --plugin uses the marketplace instead. To update: git pull, then bash install.sh (or bash install.sh --plugin and the two claude plugin update commands for a marketplace install), then restart Claude Code (setup).

Try it without credentials

bash scripts/demo.sh

The demo runs both modes in about a minute with a scripted executor in a temporary folder: no network, no account. In delegate mode the first attempt edits outside its files and fails with cause EXECUTOR; the second passes. Execute mode follows (walk-through).

Run a ticket

You type What happens
python3 ~/.claude/concord/wt.py new <TICKET> A worktree and branch for the ticket
/concord:run delegate <task> (or execute) in Claude Code Plan, questions, verifier, your go; each phase written, checked, reviewed
git commit, after reading the report The report lists every override first

Commands, exit codes, causes: docs/REFERENCE.md. The five skills also work alone (names).

Components

Concord's governance layers and what this repository builds

Path What it is
concord/concord.py The dispatcher
concord/wt.py One git worktree per ticket
concord/*.md, *.conf Executor contract, review task, plan format, model registry, settings
adapters/claude-code/ The plugin: command, skills, agents, hook rules
concord/tests/, tests/ Suites and repository checks

Full table: docs/REFERENCE.md.

Safety and limits

  • Enforced by the dispatcher: plan approval, red run, PASS rule, scope rejection, review tiers, a billing guard on model names, an executor environment allow-list that never passes Claude or Anthropic variables.
  • Advisory: the executor contract and hook rules.
  • Not a sandbox: agents run commands as your user; the red run and the acceptance commands run before and after each run, unsandboxed, with your environment (SECURITY.md).

The executors are OpenCode and the pi CLI; the native qwen, dsh and kimi adapters also ship but are untested in this release. The demo needs no executor. In execute mode the planning session writes every phase, so an executor is needed only for the reviews that run on a cheap flash model: the low-tier review, and the second review from another model family that a high-risk change needs (setup).

Results

One developer's ledger, 11 October to 25 November 2026, shipping a production mobile security product:

Measure Value
Plans 130, across 119 checkout groups (ticket worktrees, main checkouts, scratch checkouts)
Recorded verdicts 1,315: 1,156 PASS, 159 FAIL
Failure causes, as the planner labeled them 72 executor, 51 plan gaps, 18 blocked, 13 test defects, 5 flaky
Phases first attempted by low-cost executors 696 of 1,047 (66%)
Executor phases with a recorded PASS on the first attempt, per checkout 585 of 696 (84%)
Executor phases with a recorded PASS by the second attempt, per checkout 664 of 696 (95%)
Executor phases without a PASS on their checkout 25 of 696; 13 of them passed in another checkout of the same ticket
A typical executor phase (medians) 6.7 minutes of summed executor time (n = 696), about 190 changed lines (n = 497), 3 files in scope (n = 478), 2.1 million tokens processed (n = 692)
Executor list-price charges per phase with a recorded PASS US$0.10: US$64.27 for the 866 runs with a verdict, over 671 phases; US$0.12 with the 170 runs without a verdict (US$79.43)
The same executor tokens repriced at frontier list prices (price-only) US$0.89 per phase with a recorded PASS at Claude Sonnet 5.5 rates, US$1.79 at Claude Opus 5.5 rates
Matched Claude Code activity plus executor verdict runs, at list prices US$6 to US$9 per phase with a recorded PASS (1,016 phases, any runner) in three matching scenarios; executors are 0.7 to 1.1% of these charges

Method: the rates are per checkout. An attempt is a run with a verdict on a phase in one checkout, by any runner and after any cause of failure (81 of the 86 later passes were executor retries); a run a model provider refused (111 runs, left out of every count), a refusal at the red-run gate and a run without a verdict are not attempts. A phase is one step of a plan with its own files and acceptance commands, and a later attempt starts with the evidence of the failed one; the workflow's own three-failure stop, enforced by the dispatcher before 3.0 and an instruction in the plugin from 3.0, counts only EXECUTOR failures. 499 of the 696 phases (72%) received a PASS as their earliest recorded event of any kind; 41 began with a provider refusal and 30 with a refusal at the red-run gate. The record spans Concord from its pre-release versions to 3.2, and the checks described above took their present form in versions 3.0 to 3.3 (21 to 27 November 2026), so most recorded runs passed under earlier, looser checks; of the 585 first-attempt passes, 386 kept a run record, and 286 of those show every acceptance command with its expected result and no forced verdict. Of the 111 phases that failed their first attempt, the planner labeled 59 of those failures as the executor's work, 33 as a gap in the plan and 19 as a blocked run, a test defect or a flaky check; no second rater checked the labels.

The executor charges apply list prices read on 28 November 2026 to the recorded tokens of the 866 executor runs with a verdict, failed attempts included (2.19 billion tokens, US$64.27), divided by the 671 executor phases with a recorded PASS; 5 of those 671 got their first PASS from a Claude run whose cost is not in the numerator. The token kinds priced are uncached input, cache reads, cache writes (zero in every measured executor run) and output; for 180 runs the split between kinds is estimated from measured runs of the same executor and model family, and 12 verdict runs without a token record count as zero. The price-only row reprices the same executor tokens, attempts and cache reads at another model's list price with everything else fixed; it does not model how that model would have done the work. A frontier model wrote the plan, the file scope and the failing tests before an executor started. Planning, checks and reviews by Claude models, and the phases Claude models wrote, ran on a flat-rate frontier subscription; the matched row prices that Claude Code activity at list from the session transcripts, matched to the same checkout, the same repository, or those folders and their parent folders, on days with ledger runs. Not in the matched charges: reviews on low-cost models (US$31.69 at list prices for those with a token record), executor runs without a verdict (US$15.16), provider-refused runs, human time and subscription spend. docs/PILOT.md designs a paired comparison of the full loop with a lighter path on matched tickets.

Citation

See also CITATION.cff.

@software{pham2026concord,
  author = {Pham, Bao Q.},
  title  = {Concord: a governed workflow for AI coding agents},
  year   = {2026},
  url    = {https://github.com/bqp007/concord-agent-harness}
}

Contributing

Changes need a plain plan, failing tests first, an independent review and a maintainer's acceptance: CONTRIBUTING.md.

License

MIT, see LICENSE. The papers cited in the documentation belong to their authors.

Disclaimer

Concord is an independent project by Bao Q. Pham. Product and model names (such as Claude, Claude Code, OpenCode and DeepSeek) are used only to describe compatibility; they are trademarks of their owners, who do not sponsor or endorse this project.

Reviews (0)

No results found