I once handed a small task to a delegated agent and got an answer back in a few seconds: "Done." No error, no warning, a tidy summary. The working tree was exactly as I had left it. The provider configuration behind that worker was wrong, and the tool turned "I did nothing" into "completed" without a word of complaint.
That is the failure this article is about. Not the loud kind, where the build goes red and everyone notices. The quiet kind, where the report sounds right and the change is missing, wrong, or larger than you asked for.
More agents means more chances for that. I still run three of them on a platform of thirteen NestJS services: Claude Code as the lead, Codex for a second opinion, OpenCode for cheap, bounded work. It only pays off with two habits. Every task leaves as a brief that stands on its own and defines "done" as a command. Every result is judged by its git diff, never by its report.
What does a quiet failure look like?
I plan for three shapes.
- The empty success. The status says completed.
git diffis empty. That is the story above. - The quiet widening. You asked for a fix in one function. The diff also touches a test and loosens an assertion until it agrees with the bug. The report mentions only the function.
- The false negative. A review tool reports "no changes found" for a session that did change files.
All three have the same root. The report is written by the same process that did, or did not do, the work. It is a claim about the change. The diff is the change.
Here is the picture I keep in mind: an editor working with freelancers.
A magazine editor commissions pieces. The freelancer was not in the editorial meeting; they know only what the commissioning brief says. When the copy comes back with a note saying "fact-checked, 1,200 words, on brief", the editor does not print the note. She reads the copy. Some freelancers are specialists, like a fact-checker from another publication who has different habits and catches different mistakes. Some are stringers, paid by the piece for routine work. The editor decides what is ready. The publisher signs off on what goes to print.
Every rule below is something a good editor already does.
Why isn't one coding agent enough?
A single agent hits two limits.
The first is anchoring. After a long session on a stubborn bug, the context window is full of the agent's own earlier guesses. Each new attempt is conditioned on them, so it tends to propose a variation of the fix that already failed. A fresh agent, ideally on a different model, reads the same code without that history. That is the fact-checker who was not in the room when the story's thesis was decided.
The second is budget. I want the most capable model planning and judging, not renaming a field across twelve files or reading a thousand lines of test output. Claude Code's subagents exist for exactly this: each one runs in its own context window, and only its final summary comes back to the main conversation.
Notice the catch. The lead's context stays clean because it sees only a summary. Delegation saves attention by hiding detail, and that detail is exactly where quiet failures live.
Who does what in a Claude Code, Codex and OpenCode team?
Each tool gets one job.
| Claude Code (editor) | Codex (fact-checker) | OpenCode (stringer) | |
|---|---|---|---|
| Job | Plan, brief, review | Second opinion, stuck bug | Bounded, mechanical work |
| Reached through | Native subagents | Plugin or codex exec |
MCP bridge to opencode serve |
| Can it write? | Per subagent, via tools |
Read-only unless told otherwise | permission rules |
| Hands back | A summary | Its final message | Job status, session diff |
The repository's shared agent rules put accountability in one sentence: a delegated agent runs checks when assigned, and "the primary implementer reports the final evidence". In the editor's terms, a freelancer can say what they did. Only the editor says it is ready.
Claude Code: the editor and its subagents
A Claude Code subagent is a Markdown file with YAML frontmatter, usually under .claude/agents/. Only name and description are required. tools is an allowlist, model picks the model, and isolation: worktree runs the subagent in a temporary git worktree so its edits cannot collide with yours.
The repository does not ship custom subagents yet. This is the first one I would add, because it encodes the review habit:
---
name: diff-reviewer
description: Reviews an uncommitted change against the brief it was made from. Use after every delegated run.
tools: Read, Grep, Glob, Bash
model: sonnet
---
You review a change you did not write. Start from `git status --short`
and `git diff`. Report files outside the brief's scope, edited or weakened
tests, new dependencies and any command the worker claimed but you could
not reproduce. Do not edit files.The description tells the lead when to delegate, not how to do the work.
What matters most is what a subagent starts with. It gets its own system prompt, the task message the lead writes, the project's CLAUDE.md files and a snapshot of git status. It does not get the conversation history. (A fork subagent is the exception: it inherits the whole conversation.) So for an ordinary subagent, anything the lead learned in the last hour and did not write into the task message simply does not exist.
Codex: a fact-checker with different habits
OpenAI publishes a Codex plugin for Claude Code. It drives the local Codex CLI with the same authentication and configuration you already have, and adds a handful of commands:
/codex:reviewruns a read-only review of the current changes./codex:adversarial-reviewis also read-only, but steerable, and questions design decisions and trade-offs./codex:rescuehands a task to Codex: an investigation, a fix, a stuck bug./codex:status,/codex:resultand/codex:cancelmanage jobs running in the background.
Without the plugin, the same hand-off works through codex exec, Codex's non-interactive mode. Its defaults suit a worker well. It runs in a read-only sandbox unless you pass --sandbox workspace-write. Progress goes to stderr and only the final message goes to stdout. It refuses to run outside a Git repository unless you add --skip-git-repo-check, which I don't. And codex exec - reads the whole prompt from stdin, which is handy when the brief lives in a file.
# Second opinion: read-only by default, nothing to undo
codex exec "Review the uncommitted changes against ~/briefs/item-quantity.md. \
List files outside its scope and any test that got weaker. Do not edit."
# Bounded fix: allow workspace edits, keep the final message on disk
codex exec --sandbox workspace-write -o ~/briefs/item-quantity.result.md - \
< ~/briefs/item-quantity.mdThe second command writes files, so it is followed by exactly the same diff review as any other worker. A different model is a different reader, not a more trustworthy one.
OpenCode: the stringer behind MCP
OpenCode is an open-source coding agent that works with whichever model provider you configure. opencode serve runs it as a headless HTTP server and publishes an OpenAPI 3.1 spec, with endpoints to create a session, send it a prompt without waiting, abort it and fetch its diff.
A community package, opencode-mcp, turns that API into MCP tools: opencode_fire starts a job in the background, opencode_check and opencode_wait follow it. The repository registers it for Codex in .codex/config.toml:
[mcp_servers.opencode]
command = "npx"
args = [
"-y",
"opencode-mcp",
]Claude Code takes the same server with claude mcp add opencode -- npx -y opencode-mcp.
The tool does not make OpenCode cheap; the model does. I point it at a lower-cost model and give it only tasks where a precise brief leaves little room for judgment. That is what a stringer is for.
Three behaviours shape how I use it. From the bridge's documentation: a wait that times out means the job is still running, not that it failed, and independent sessions do not isolate filesystem changes, so two jobs in one directory edit the same files. From my own runs: the empty success and the false negative at the top of this article both came from here, which is why I read git diff myself instead of asking the bridge what changed.
OpenCode's permissions also deserve a look. Most of them default to allow, so out of the box a worker edits files and runs shell commands without asking. I narrow that in opencode.json:
{
"permission": {
"edit": "allow",
"bash": {
"*": "ask",
"git *": "deny",
"git status*": "allow",
"git diff*": "allow",
"pnpm *": "allow",
"pnpm add *": "deny"
}
}
}Order matters here. The last matching rule wins, so the broad git * deny comes first and the read-only exceptions after it. Put git * last and it swallows the read-only exceptions. Put pnpm * after pnpm add * and the allow swallows the deny, which is the worse mistake of the two.
How do you write a brief that stands alone?
Back to the editor. The freelancer was not in the meeting. Whatever the editor knows but leaves off the brief, the freelancer never learns. With agents that is literal: none of the workers above can see the lead's conversation.
Here is the shape of a brief I would hand off. The file names and the bug are invented for the example; the four sections are the part I reuse.
Goal: make `pnpm nx test order-service --testFile=item-quantity.spec.ts`
pass without editing the spec file.
Context you do not have:
- PATCH /items/:id accepts quantity = -3 and saves it.
- The DTO has @IsInt() on `quantity` but no lower bound.
- My guess: a missing @Min(1). Confirm or reject it before changing code.
Scope:
- You may edit: apps/order-service/src/items/dto/update-item.dto.ts
- Do not touch: any *.spec.ts, package.json, lockfiles, other apps or libs.
- Do not run git add, git commit, or switch branches.
Done means:
- The command in Goal exits 0. Paste the last 20 lines of its output.
- One line per changed file: what changed and why.
- If you cannot finish, report what you tried and stop. Do not widen scope.Each section answers a question the worker cannot ask you.
Goal is a command, not an adjective. "Fix the validation" can be argued about; an exit code cannot.
Context carries what the lead already learned, including a hypothesis to test, not to trust. If my guess is wrong, I want to hear that, not see code bent to fit it.
Scope names the allowed files and the forbidden ones, and repeats that Git belongs to a human. Forbidding the spec file is what turns "the quiet widening" from a risk into a visible violation.
Done means says what evidence to hand back and when to stop. A worker that stops and says "I couldn't" beats one that widens the task until something passes.
One check filters out most bad delegations: if I cannot write the "Done means" section, the task is not ready to leave. It is still thinking work, and thinking work stays with the editor.
Why review the git diff instead of the agent's report?
Because a report is a claim and a diff is evidence. The repository's AI tooling rules draw the line clearly: specifications are intent, source is implementation evidence, a successful scoped run is verification evidence. A summary written by the agent that did the work is none of those.
Two conditions make the diff trustworthy.
Agents never commit. The working agreement says the human manages Git, so every delegated change lands as uncommitted work that git status and git diff show in full. Nothing hides in a commit I didn't make. The meta-repo and submodule workflow explains why that boundary exists in the first place.
Snapshot before and after. The rules ask for the state of the root repository and its submodules to be captured before and after a task, so the worker's changes can be told apart from mine:
snapshot() {
git status --porcelain=v1
git submodule status --recursive
git submodule foreach --quiet 'git status --porcelain=v1 | sed "s|^|$sm_path: |"'
}
snapshot > /tmp/before.txt
# ... delegate, wait for the worker to finish ...
snapshot > /tmp/after.txt
diff /tmp/before.txt /tmp/after.txtThen the review is the same every time:
git status --short # any file outside the brief's scope?
git diff --stat # does the size match the task?
git diff -- apps/order-service # read every hunk, not the summary
pnpm nx test order-service --testFile=item-quantity.spec.ts # rerun it yourselfI look for a short list of things:
- files the brief did not allow, especially tests,
package.jsonand lockfiles; - assertions that got weaker: a deleted
expect,toEqualturned intotoBeDefined, a new.skip; - escape hatches: a lint-disable comment, a loosened compiler option, an
anyor a cast that silences the compiler; - commands the report claims but my own terminal does not reproduce.
Codex's read-only review is a good second reader here, but only a reader. The editor makes the call, and a human commits.
When the diff is wrong, I fix the brief and delegate again rather than patching by hand. A bad result usually means the brief left something out, and a hand patch hides that. When patching is genuinely faster, I still note what the brief was missing. The deeper version of this discipline, what counts as evidence and what doesn't, is the subject of verifying an AI agent's work.
What does a team of agents cost?
Context, at every hand-off. The worker cannot know the constraint I forgot to write down. Shared rules files cover part of the gap: Codex and OpenCode both read AGENTS.md, and Claude Code reads a short CLAUDE.md that points to the same rule owners. That setup is its own article, one rulebook for every agent. Rules files hold the standing rules. They cannot hold what I learned an hour ago.
Time. A stand-alone brief takes minutes to write and a real diff review takes minutes to do. For a five-line change, delegating is slower than typing it.
Collisions. Parallel workers share one working tree unless you separate them. Claude Code subagents can use isolation: worktree. OpenCode sessions do not isolate files, so each parallel job gets its own git worktree.
Three permission models. Claude Code restricts tools per subagent. Codex has sandbox modes. OpenCode has allow, ask and deny rules that mostly default to allow, plus an --auto mode that approves anything not explicitly denied. That is three places to get a boundary wrong.
Usage limits. Each tool has its own, and they run out at different times. The Codex plugin's README warns that its optional review gate can start a long Claude and Codex loop that drains limits quickly; I leave it off unless I am watching.
A moving target. Commands and flags change between releases, so I re-read each tool's documentation before wiring anything.
When is one agent better than a team?
More often than this setup suggests. Claude Code's own documentation says to stay in the main conversation when a task needs frequent back-and-forth, when planning, implementation and testing share a lot of context, for quick targeted changes, and when latency matters. That matches what I see.
I add three rules of my own:
- If I can't state "done" as a command, one agent keeps thinking until I can.
- If reviewing the diff would take as long as writing the code, delegation only adds a step.
- For authentication, money or security changes, I want one accountable context from plan to review, not a relay of summaries.
Delegation is the exception. Use it when the task is bounded, the check is mechanical, and a second reader or a cheaper pair of hands actually changes the result.
What would I do differently?
- Write the verification command before the task, every time, and treat a task without one as not ready.
- Give every parallel worker its own worktree from day one, instead of counting on workers to stay in their lanes.
- Keep brief templates in the repository: a bug fix, a bounded refactor, a second-opinion review. Improvised briefs are where context goes missing.
- Enforce the Git boundary with permissions, not prose. A sentence in a rules file is advice. Deny rules and credentials that cannot push are enforcement.
- Log every delegation: the brief, the model,
git diff --statand my verdict. I don't have that data today, so my sense of which worker suits which task is still anecdotal.
Key takeaways
- Delegation hides detail to save attention, and quiet failures live in that detail: empty successes, quiet widening, false negatives.
- Give each tool one job: Claude Code plans and reviews, Codex is the second reader, OpenCode does bounded work on a cheaper model.
- A subagent does not see your conversation. Write briefs with a goal that is a command, the context it lacks, an explicit scope and a "done means" section.
- Judge the diff, not the report. Agents never commit, snapshot before and after, rerun the checks yourself.
- Check each tool's defaults: Codex starts read-only, OpenCode mostly starts at allow, and permission order matters.
- One agent wins when the work is conversational, tightly coupled, tiny or high-stakes.
A diff you have read is still not proof that the change works. The last habit in this series is about what does count as proof: evidence, not "done".