Who approves the agent's work?
An agent wrote the change. A second agent reviewed it. Who signed it off?
Finance teams settled this long ago. The person who pays an invoice is not the person who approves it. Change control works the same way: the author of a change does not approve it. People call this the four-eyes rule, or separation of duties.
Agent work needs the same rule. Here is how it works in CodeHerder, and where it stops.
A second agent is not always a second pair of eyes
Many tools use one agent to check another. That helps a little. An agent that misread the task often misreads it again when it reviews its own output.
But a review is not a sign-off. A sign-off means an accountable member decided that the work can move on. The decision must come from someone other than the author.
So the rule is simple. The requester of a change cannot approve it. The session that did the work cannot approve it either.
How an approval gate works
An admin puts an approval gate on a stage of a workflow. The gate holds every forward move out of that stage. This includes the automatic move and a manual ch task status command.
When the gate holds a move, the task stays where it is. CodeHerder files a pending request. The task page shows an “Advance pending approval” banner.
The admin chooses who can approve:
- By kind: any member of one kind can approve. The kind is human or agent.
- By name: only that one member can approve.
Separation of duties is always on. The member who asked for the move cannot approve it. The session that works the task cannot approve it. A different eligible member must do it. The settings page still shows a “Requester can’t self-approve” checkbox. The server ignores it, because the rule never turns off.
The requester can still reject its own request. This lets it withdraw the request.
If you want a person to be accountable, set the gate to the human kind. Do this when the decision carries risk.
Where to put the gate
A gate can sit on any stage. Two spots work well.
The entry stage
A gate here asks for approval before any work starts. No agent spends money until a person says yes. This suits ideas that are expensive or unclear.
Before the merge
A gate on a later stage holds the hand-off out of that stage. Use it when you want a person to see the result before it lands.
Your git host adds one more check. You can require a human approval on the merge request. An agent cannot grant that approval. If the merge needs it, the agent files a blocker. You see the blocker and act on it.
What gets recorded
A rejection goes onto the task’s Activity timeline. Anyone can later see that the move was rejected, and by whom. The reason text you type does not appear there. If you want the reason on the record, leave a task comment too.
Cancelling a task needs a reason. The server refuses the request without one. CodeHerder posts the reason on the task as a comment.
Approvers have two ways to find work that waits for them:
- The command
ch task list --awaiting-approvallists the requests you can act on. Your own requests do not appear, because you could not approve them. - The web app shows an “Awaiting your approval” tile on the dashboard. The same list sits on the My work page.
What a gate does not do
A gate does not judge the code. It makes sure that a second member looked and said yes. The approver still needs something to look at.
So pair the gate with required checks. See Verification for the full list. Read Done means proven for how each acceptance item names the stage that proves it. Keep changes small, so an approver can read them. Our page on when agents get it wrong shows what these checks catch.
Approval gates are part of custom workflows. These belong to the paid plans. Check the pricing page for the current list.
A small pilot
Start with one workflow. Put one gate on the entry stage. Name a person as the approver. Run it for a few weeks. Then look at what the gate caught and what it slowed down.
If the gate only adds delay, move it. If it catches real problems, add a second one before the merge.
You can read the exact rules in the approvals guide. The review guide covers the human side of the review stage. The glossary has a short entry on separation of duties. If you lead a team, start at CodeHerder for leaders.