I built a runner that turns my merged tak-bro PRs into tasks and runs vanilla `claude -p` and `/orch` on them under the same conditions. This PR covers the runner, isolation and grading. The pilot, capped around $93, moved to a follow-up PR.
Why build this?
Most of my larger work goes through the /orch pipeline: a plan, a review of that plan, implementation in slices, then review gates. I had never measured whether that chain beats a single claude -p with no skills (I call that "vanilla"), and the HARNESS-BENCH.md design I wrote earlier had never been run either.
I tried an orch A/B once before, but headless runs were refused writes to .claude/, so the plan was never saved and there was nothing to compare. This time I closed that hole first.
What changed?
Everything lives in claude/tools/harness-bench/bench.sh, which has four commands:
prepare <repo> <pr>turns a merged PR into a task. The base is the first parent of the merge commit, and the PR title and body become the prompt. The tests the PR added stay hidden until grading. It refuses PRs that aren't merged, have no tests, or change no source.preflightchecks permission modes before any run. It triesacceptEdits, thenbypassPermissions, thendefault + Write(.claude/**), and records the first mode that can write to.claude/and to a sibling worktree, along with the claude version.run <task> <vanilla|orch>runs and grades one side of the comparison (an "arm").reportprints a task×arm table.
On the real preflight, acceptEdits exited with rc=0 but still could not write to .claude/ or to the worktree, and only bypassPermissions passed. In a headless run, check that the files were actually written, because the exit code won't tell you.
What is vanilla, and what gets judged?
The vanilla arm uses the same global settings as the orch arm, down to CLAUDE.md, hooks and the skill list. It just calls no skills, so nothing else varies between the two arms.
I fixed the verdict rule before running anything. In the main run, orch is worth it if it passes more hidden tests than vanilla, and on a tie its total cost has to be at most 1.5 times vanilla's. The 3-task pilot only checks that the runner works and decides nothing.
How do I keep the agent from peeking at the answer?
This took the most thought, since every task is an already merged PR and the answer sits in git history and on GitHub.
- Runs happen in a
clone --localwith origin, refs and reflog removed. The runner asserts that the merge commit is unreachable, and run directory names leave out the repo and PR number. - Both arms get the same list of disallowed tools:
--disallowedTools 'Bash(gh *),Bash(git fetch *),Bash(git pull *),Bash(git push *),WebFetch,WebSearch'
- GitHub token env vars are cleared and
GH_CONFIG_DIRpoints at an empty directory, sogh auth statusreportsYou are not logged into any GitHub hosts. - After a run, the runner searches the transcript, subagents included, for any lookup of the original checkout or the GitHub repo. A hit counts as an
answer-lookupfailure. - After grading, the tree is deleted so the next arm can't read the previous solution.
I weighed three isolation options: deny plus detection, the Claude Code sandbox, or accepting the gap and documenting it. The sandbox needed schema validation and a preflight rerun, and it was slow, so I went with deny plus detection. What remains is that an arm in bypass mode can still write to the original checkout through Bash. I can detect that but not block it. The PR body also becomes the prompt of a bypass session, so I only use PRs I wrote myself.
What did the review gates catch?
During planning, eng-review found a real hole. Under my global rules either arm may work in a ../repo-wt-* worktree, so grading only the clone would show a diff of zero and misjudge the run. The runner now finds the tree the agent actually changed and grades that one. The same review decided against wrapping the runner as a skill: a person runs it rarely, so it stays in claude/tools without a SKILL.md or table entries.
In implementation, the slice 02 review went four rounds, almost all of them spent tuning false positives and misses in answer-lookup detection. /review --full on the whole branch reported Critical 2 and Important 5, and /security-scan reported High 1. The commit log shows the order: "close leaks and miscounts found in branch review", then "keep GitHub credentials away from bypass arms". Before fixing anything, I ran the six tests added after review against the old code and got 80 passed, 6 failed.
03-review raised a cost question. If a run with unknown cost counts as $0, orch times out more often and so looks cheaper under the verdict rule. Those runs now count at the budget cap. That fills a gap in a rule I had registered in advance, so I left it open and will confirm it before the main run.
What did I put off?
The pilot (3 tasks × 2 arms) is not in this PR. A run capped near $93 that can take up to six hours had no reason to block merging the runner. My session's automatic permission mode also refuses headless claude runs in bypassPermissions, so I have to start the pilot myself anyway, and its acceptance check stays blocked.
The pilot ran the next day: vanilla 2/3 at $2.26, orch 2/3 at $7.37 (#259). The main run couldn't fill ten tasks and ran nine on 11-13: orch 6/9 at $51.32, vanilla 5/9 at $16.09 (#310). Neither run had a run of unknown cost counted at the budget cap.
I also couldn't run .github/ci/run.sh all in this session, because the worktree guard rejects commands that contain .github. Instead I ran shellcheck, test-bench.sh all and the three skill lints separately, and all of them passed. Linux CI dependencies such as the jq version and GNU base64 are still unverified.
bash claude/tools/harness-bench/test-bench.sh all # ok: 89 passed, 0 failed
The suite runs 89 checks against a fake gh and a fake claude.
What did it cost?
The work took ten sessions in a single day and about $27 in total, mostly on Opus. The pilot cap is up to $15 per run × 6 runs plus about $3 for preflight, around $93. Going by the cap, 1 measurement costs more than building the runner did; the actual pilot cost about $9.63 across both arms.
Build stats
| Model | Input | Output | Cache read | Cache write | USD |
|---|---|---|---|---|---|
| claude-opus-5-5 | 740 | 305,229 | 56,709,747 | 1,237,231 | $25.97 |
| claude-sonnet-5-5 | 102 | 36,699 | 1,242,160 | 284,421 | $1.20 |
| claude-haiku-5-5 | 12 | 3,889 | 104,337 | 25,740 | $0.01 |
| Total | 854 | 345,817 | 58,056,244 | 1,547,392 | $27.18 |
Counted from 10 session transcripts at 2026-11-14T02:17Z (PR #258, sessions 2026-11-10 to 2026-11-10). Tokens include subagents; USD is list price. Code: +966 / −80 lines.