DEV Community

Cover image for Your Coding Agent Shouldn't Be Able to Close Its Own Ticket, Part 2: What the Comments Changed
Steve
Steve

Posted on Originally published at arbituro.com

Your Coding Agent Shouldn't Be Able to Close Its Own Ticket, Part 2: What the Comments Changed

What's a claim worth if the code has moved on since it was made?

That's not my question. It came from the comments on part one, and it was a better question than anything I'd asked in the post itself. šŸ™Œ

Quick recap if you missed it. Part one argued that a coding agent should be able to claim a ticket is done, with evidence, but never decide it. A CI check or a named person decides. The agent keeps all its speed; it just doesn't mark its own work.

The comments agreed with the split, and then politely took it apart at the edges. This post is about those edges, and what got built because of them.

šŸ™ First, the People Who Did the Thinking

Two commenters shaped this post, so they go first.

Glenn left three comments, and each one turned into a change. The first: tie every completion claim to the exact commit it was made against, or the approval ends up attached to stale evidence. The last: the same permission boundary should cover the checks, because an agent that can edit the CI config can weaken the very thing that judges it.

Gautam K put the principle more sharply than I did: the ticket can only close when something the agent can't edit confirms it. The agent can propose Done. Only that check, or a person, can move it.

Thank you both. Most of what's below exists because you wrote it down. šŸ™‡

šŸ“Œ Problem One: The Claim Goes Stale

Here's the scenario Glenn described. The agent claims a criterion is met:

Implemented and verified. āœ…

(OK, a better agent writes what it actually checked. Stay with me.)

Then it keeps going. It pushes a refactor. Then a "small fix". By the time a person reads the claim, it's about code that no longer exists. The evidence was real. It's just evidence about a different commit. 😬

So now every claim is pinned to a commit. When a coding agent claims a criterion, Arbituro records the commit the job's branch or pull request stood at right then.

The important part: the agent doesn't send that commit. Arbituro reads it from the job's link, which only GitHub's own events move. An agent can't leave it out, and it can't name a convenient one. A commit the agent reports would just be more testimony. A commit GitHub reports is a fact. šŸ”’

When more code lands after the claim, the person deciding sees it right next to the claim, in plain words: "2 commits pushed since". After a force push it says "The branch was rewritten since the claim" instead.

And opening the claim shows what GitHub recorded after it, oldest first: each check that reported and the commit it ran on, each commit pushed with its subject and the first files it touched, and the merge. You don't have to go and dig through GitHub to find out what "2 commits" means.

šŸ¤” Warn or Withdraw?

This was the real design question, and I went back and forth on it.

Withdrawing the claim automatically sounds safer. But agents push constantly, and plenty of pushes don't touch what was claimed. A fix to a typo in the README shouldn't throw away a claim about checkout. Auto-withdrawing would mean the person deciding never sees most claims at all.

So a moved head warns and never withdraws. The claim stays there to decide. The person can still press Met, or press "Ask it to check again", which leaves a note on the job for the agent, under their own name. The agent reads it the next time it opens the job:

Check "A four-pack can be bought on a phone" again before it is decided. 2 commits were pushed after your claim at `a41c9e2`.
Enter fullscreen mode Exit fullscreen mode

Short, specific, and it names the commit. No "please re-verify everything". šŸŽÆ

One more honesty detail I care about: the wording always says "since the claim", never "since the agent checked". Arbituro knows where the branch stood when the claim arrived. It doesn't know exactly what the agent looked at. The screen shouldn't pretend it does. 🧐

šŸ” Problem Two: The Check Goes Stale Too

The same logic applies to CI, and this one is stricter.

A check's pass is only true of the commit it ran on. So when a new commit lands on the pull request, any criterion a named check had already passed goes back to undecided until that check reports again on the new commit.

No warning this time, a reset. Why the difference? A person's judgement might survive a small push; they can look and decide. A check's pass is a statement about one exact commit, and nothing else. What happened (the job's history) records which criterion was reopened, by which check, and both commits.

Claims can also carry screenshots now, for anything a screen proves. "Works on mobile" with an actual phone-sized screenshot beats "works on mobile" with a āœ…. šŸ“±

šŸ›”ļø Problem Three: Who Checks the Checks?

Glenn's last comment is the one I keep thinking about.

Taking "close the ticket" away from the agent doesn't help much if the same pull request can quietly change what "passing" means. Edit the workflow so the test job skips the slow suite. Loosen CODEOWNERS. The check goes green, the criterion ticks, and everything looks verified. āœ… šŸ™ƒ

Two things are true in Arbituro now.

Agents running inside Arbituro can't write under .github at all. That covers workflows, the actions they call, and CODEOWNERS. It's enforced in code, on the files about to be pushed, not in a prompt. And a person still approves the change after that.

A coding agent in your own repo is different. Claude Code, Cursor and friends work in your checkout with your permissions. Arbituro can't stop them editing a workflow, and it shouldn't pretend to. That's what branch protection, required reviews and CODEOWNERS are for.

What Arbituro can do is make sure a weakened check never passes quietly. So before a named check ticks a criterion, Arbituro reads the pull request's changed files from GitHub. If any of them are under .github/, or a CODEOWNERS file, the criterion still ticks, but its line says so, in warning colour. Roughly:

āœ“ Every existing billing test still passes  (decided by the `test` check)
  ⚠ Passed on a pull request that also changed .github/workflows/ci.yml
Enter fullscreen mode Exit fullscreen mode

The path links straight to the pull request's changed files on GitHub. The person signing the job off sees it at exactly the moment it matters.

A couple of choices I made deliberately:

  • No read, no pass. If GitHub doesn't answer the files request, the check decides nothing, and the delivery is retried. A pass is never written without looking first.
  • Test files don't trigger it. I considered it, and Glenn's comment mentioned the test suite too. But a pull request that does its job adds and edits tests, so the warning would sit beside almost every pass, and a warning that's always there is one nobody reads. For tests, the decider still reads the diff. (Tell me if you think I got this one wrong. šŸ‘‡)

šŸ•µļø Problem Four: The Person Still Reads It Alone

All of that made the evidence better. But look at what the person deciding still had in front of them: the agent's own account of its own work, plus a pile of GitHub facts to cross-check by hand.

I got bitten by exactly this on my own backlog. A coding agent claimed the suite passed. Two minutes later, the Frontend check failed on the very commit it had claimed. The only place that said so was a log I wasn't looking at. 🤦

The facts were all there. Nobody had put them next to the claim.

So now every claim gets read by a second agent before its person decides. Think of it as a verification agent:

  • It's never the claimant. The claim comes from your coding agent, outside. The reader is an agent in your Arbituro workspace, running a read-only reading. It has no tools that change anything.
  • It holds the claim against two things: the criterion it claims, and what Arbituro recorded from GitHub's signed events. That's the checks that reported and the commit each ran on, the commits pushed with the files each touched, and the merge. The claimant couldn't write any of that.
  • It says one of three things: holds up, doesn't hold up (and why), or can't tell.
  • A claim that only asserts is "can't tell". "Implemented and verified. āœ…" on its own will never read as "holds up". šŸ˜
  • It decides nothing. Met and Not met stay with the person. A reading that fails, or says nothing useful, counts as "can't tell", never as a pass.

Here's how that looks on a job's Done when. (A sample job, but the real screen.) The coding agent claimed three criteria at the same commit, and the reader went through all three:

Done when with three claimed criteria. A line at the top says Sam Taylor's coding agent claims 3 clauses at a41c9e2, and Ledger read them: 2 hold up, 1 doesn't. Two claims are marked Holds up, with one line from the reader each. The third is marked Doesn't hold up, with the reader's reason in full. Below them, The checkout tests pass is ticked by the checkout check, with a warning: Passed on a pull request that also changed .github/workflows/ci.yml.

The verdict leads each claim, so you can see which one needs you before reading anything. When a claim holds up, the reader's reason is one quiet line. When it doesn't, you get the whole reason.

And the bottom row is Problem Three doing its job: the check passed, on a pull request that also touched the CI workflow.

Open the claim that doesn't hold up, and everything is in one place: the agent's word, what GitHub recorded after it, and the reading.

The opened claim. Sam Taylor's coding agent claimed "Implemented and verified. Full suite: 1,284 tests pass." with the branch at a41c9e2. Under On GitHub since the claim: checkout failed on a41c9e2, the commit the claim was made at; then 80f97d9 was pushed, touching src/checkout/Postcode.ts, its test and .github/workflows/ci.yml; then checkout passed on 80f97d9. The reading says Doesn't hold up: the checkout check failed on the commit the claim was made at, and nothing in the claim shows a postcode being refused. An Ask it to check again button sits below.

The agent said the suite passed. GitHub says the check failed on that exact commit. The reader put the two side by side, so I didn't have to. And it caught the second problem too: "tests pass" isn't evidence that a postcode gets refused. šŸŽÆ

A few details I care about:

  • The reader can't see screenshots. It's told which ones arrived, and that a caption is the claimant's word for what the picture shows.
  • Claims made together get one reading. It starts two minutes after the newest claim, so a burst of three claims at one commit costs one run, not three.
  • It's a project setting, the same one that turns on reading an agent's delivered work. It runs on the job's credits, so a project can switch it off.

Is an agent checking an agent just turtles all the way down? 🐢 A bit. But this reader can't edit the claim, can't edit GitHub's record, and can't tick anything. Its only power is to put the contradiction in front of the person who decides. That's a power I'm happy to hand out.

🧭 What I Took From This

Part one said: whoever wrote the change doesn't approve it.

This round added three things, and they're all versions of the same idea:

  1. Evidence has a timestamp, and it's a commit. A claim or a pass is only true of the code it saw. Pin it, and show when the code moves.
  2. The judge has to be out of the defendant's reach. If the agent can edit the check, the check isn't independent. Where you can't stop the edit, at least make it impossible to miss.
  3. Put the contradiction next to the claim. The facts are usually already recorded somewhere. A second reader that can't change anything is cheap, and it saves the person from cross-checking by hand.

The first two weren't on my list before the comments. That's the best argument I know for writing in public. šŸ˜„

šŸ› ļø If You're Not Using Arbituro

You can get most of this in any setup:

  1. Ask the agent to quote the commit in every claim (git rev-parse HEAD), and check it against the pull request's head before you accept it.
  2. Make CI required on the latest commit, so a pass on an older commit can't merge.
  3. Put .github/ and CODEOWNERS behind code-owner review, with a human owner, so a workflow change always needs a person.
  4. Read the diff for test changes whenever the agent claims "tests pass". The classic failure is still the test that got changed to pass.
  5. Have a second, read-only agent review each claim against the criterion and the CI results for that commit, before you do. Tell it that a claim which only asserts is "can't tell", never "done".

Arbituro is free for up to three people at arbituro.com.

šŸ’¬ What About You?

How do you keep the checks independent of the agent being checked? Code owners on CI, checks that run from outside the repo, or mostly trust and a careful eye on the diff?

And if you think warn-not-withdraw is the wrong call for a stale claim, I want to hear that one too. Part three might be yours. šŸ‘‡

Top comments (12)

Collapse
 
userxnom profile image
Abdullah Naseer •

The asymmetry you landed on is the part I keep coming back to: a stale claim warns, but a stale CI check resets. That distinction is doing a lot of work — a person's judgement might survive a small push, but a pass is only ever true of the commit it ran on, so treating the two the same would be wrong in opposite directions.

And the 1,284-tests example is the whole argument in one screenshot. The agent claimed the full suite passed, GitHub said the check failed on a41c9e2, the exact commit the claim was made at — and nobody had put those two facts next to each other until the second reader did. That's not an agent problem, it's a presentation problem, and your fix is honest about that.

One edge I'm still turning over: you deliberately don't flag test-file changes the way you flag .github changes, and you note the classic failure is a test changed to pass. If an agent quietly weakens a test instead of the workflow, does the second reader catch that, or is that the one hole you'd still want a separate rule for?

Collapse
 
steve-o profile image
Steve •

You've found the actual hole, so honestly: mostly no, not today.

The second reader sees what GitHub recorded: which checks ran on which commit, and which files each commit touched. It doesn't see the diff itself. So if a commit after the claim touched checkout.test.ts, it can say "this file changed after the claim". It can't tell whether an assertion got weaker or a new test got added. And if the test was weakened before the claim, in the same commit, there's nothing in the record to flag at all.

I left test files out of the .github warning because nearly every good PR edits tests, and a warning that's always on gets ignored. But that leaves weakened tests to whoever reads the diff.

Would you want that as a separate rule (say, flag any PR that deletes assertions), or as something the reader looks for when it's judging a claim like "tests pass"?

Collapse
 
userxnom profile image
Abdullah Naseer •

I'd go with the separate rule, but a narrow one: flag only deleted or weakened assertions, not any test edit. That keeps your always-on warning problem away, since most good PRs add tests rather than strip assertions, and it gives the second reader something concrete instead of asking them to spot a weakened test while judging a claim. Would you scope it to assertions in files the PR itself touches, or to the whole test suite?

Thread Thread
 
steve-o profile image
Steve •

Files the PR touches, I think. A PR can only weaken a test it changes, so scanning the whole suite would mostly re-check code nobody touched.

But "files the PR touches" probably has to mean more than test files. The sneaky versions I can think of aren't in the assertion at all:

a .skip or xit added to a test
a whole test file deleted
the test runner's config changed to ignore a path, or a threshold loosened

So I'd scope it to the PR's diff, and count three kinds of change as weakening: assertions removed or loosened, tests skipped or deleted, and test config changed. Assertions added never count.

Does that miss anything you've seen in practice? I'm also curious whether you'd treat a test that got rewritten (same name, different body) as weakened by default, or only when the assertion count drops.

Thread Thread
 
userxnom profile image
Abdullah Naseer •

Your three categories cover most of it — the one I'd add is the test data and mocks getting easier: same assertions, but a stub that now returns the happy path, or fixtures swapped for simpler ones. That weakens the test without touching a single assertion.

On a rewritten test, I wouldn't call it weakened by default. I'd flag it as "needs a human look" and then judge it on assertion count plus what those assertions actually check — a rewrite that keeps the same checks but reads better is fine, one that drops an edge-case assertion is not.

Thread Thread
 
userxnom profile image
Abdullah Naseer •

That three-part scope feels right, and I like that assertions added never count — that keeps it from punishing good refactors. The one gap I'd add is a real check quietly swapped for a mock or a looser timeout, which reads as a rewrite but weakens what the test actually proves.

On your second question, I'd only flag a rewritten test when the assertion count drops or the check gets looser, not by default. A same-name rewrite that keeps the same assertions is usually just cleanup. Would you want that loosening check to compare against the previous version of the test, or just the current diff?

Thread Thread
 
userxnom profile image
Abdullah Naseer •

That scoping is exactly right, Steve — limiting it to the PR diff keeps the rule cheap and focused, and your three categories cover most of the sneaky cases I have seen. The one I would add is weakening the setup rather than the assertion itself: a mock or stub swapped for a looser one, a timeout quietly raised, or test data changed so the hard case no longer runs. The assertion count stays the same, but the test proves much less.

For a rewritten test, I would not flag it by default. I would only treat it as weakened when the assertion count drops, or when a strict check becomes a loose one — for example, an exact match turning into a contains check. A clean rewrite with the same assertions should pass without friction.

Have you seen a case where the setup was weakened but the assertions looked untouched?

Collapse
 
ayushdhanani369 profile image
Ayush Dhanani •

My answer to your closing question is to keep the judge out of the claimant's reach, and to make can't tell a real verdict. I build Aladdin, a job agent. The main agent holds the application, and a fresh worker reads the actual page and form for each application. It grades fit from 0 to 100 with reasons. If a form cannot be read or an answer is not clearly covered by the user's own facts, it asks the user instead of guessing. That is the same shape as your second reader agent. It never trusts the first agent's summary of its own work. Your a41c9e2 example shows why the pin matters. The checkout check failed on that exact commit, not on a later fix. Warn, not withdraw, is right for the same reason. Withdrawing a claim would hide the miss. A can't tell that goes to a person keeps the miss visible.

Collapse
 
steve-o profile image
Steve •

"Withdrawing a claim would hide the miss" is a better argument for warn-not-withdraw than the one I wrote. I was thinking about noise from harmless pushes, but you're right that the bigger cost is losing the record that the agent claimed something that wasn't true. That's exactly the thing you want to see again later.

The fresh worker reading the actual page and form is the same instinct as reading GitHub's record instead of the agent's summary. Go back to the source, not the report about it.

Two things I'm curious about from your side:

When the worker and the main agent disagree, who wins? Does the user see both views, or just the worker's?
How often does "can't tell" actually reach the user? I made it a real verdict too, but I worry that if it shows up on every other claim, people start skipping past it the same way they skip an always-on warning.

Collapse
 
reidmarlow profile image
Reid Marlow •

I'd keep the no-warning rule for ordinary test additions, but have a reviewer inspect deleted or weakened assertions against the acceptance criterion. A green check on the new commit can be genuine while the test no longer checks the behavior the ticket asked for. Running a separately maintained acceptance suite helps, though it still depends on that suite covering the criterion.

Collapse
 
steve-o profile image
Steve •

I like this split a lot: new tests are normal, deleted or weakened assertions are the signal. That's much narrower than flagging every test change, so it shouldn't turn into noise.

The part I'm unsure about is how to judge "weakened" mechanically. A deleted assertion is easy to spot. An expect(x).toBe(3) that became expect(x).toBeTruthy() is harder. Would you trust a reviewer agent to judge that against the criterion, or would you want something more deterministic, like assertion counts per test file before and after?

And on the acceptance suite: do you keep yours where the agent can't edit it, like a separate repo or a protected path?

Collapse
 
analista_83 profile image
Sammi De Blas •

The staleness point is the real failure mode. A claim attached to a commit is only valid while that commit is still the head of the branch. In our tracker we bind the evidence to the SHA and CI re-runs it at merge, so a claim that no longer reproduces fails the check instead of staying closed.