DEV Community

Wadi zaatour
Wadi zaatour

Posted on

Fresh Eyes Catch Different Bugs: Why Your Coding Agent Needs a Second Opinion

Part 4 of the series “Rethinking Claude Code Best Practices.”

Parts 1–3 established the foundation:

  • keep project instructions focused;
  • separate convenience from enforcement;
  • use tests, hooks, and CI as verification points.

That foundation makes longer-running agent sessions possible. But there is another problem: the agent that writes a change may not be the best agent to judge it.

The problem with self-review

An implementation agent carries its own context and assumptions. It knows the path it took, the shortcuts it considered, and the explanation it gave itself for each decision.

That context is useful for implementation, but it can also create blind spots. A session may produce a reasonable-looking solution while quietly:

  • leaving the old API in one code path;
  • changing behavior only for new users;
  • weakening a security check to make a test pass;
  • adding a workaround instead of fixing the underlying issue;
  • interpreting “done” more narrowly than the request intended.

Asking the same session, “Does this look correct?” often produces a confident explanation of the original reasoning. A fresh session starts with less history and can ask a better question: “What evidence proves this is correct?”

Give the reviewer a different job

A reviewer agent should not simply repeat the implementation prompt. Give it a separate responsibility:

Review this pull request using only the repository, the task description,
the diff, and the test results.

Look for:
- behavior that does not match the acceptance criteria;
- code paths that still use the old implementation;
- missing failure handling;
- security or privacy regressions;
- tests that pass without proving the intended behavior;
- changes outside the requested scope.

Do not rewrite the feature. Report findings with file names, evidence,
severity, and a suggested verification step.
Enter fullscreen mode Exit fullscreen mode

The separation matters. One agent tries to make the change work. The other tries to disprove that it works.

Fresh context is a feature

A reviewer should receive enough context to judge the change, but not the entire implementation conversation. A useful review bundle contains:

  1. the original task;
  2. the acceptance criteria;
  3. the final diff;
  4. relevant test output;
  5. the project’s security and deployment rules.

This is also why important safety decisions should be documented in the repository. If a deny list exists, record what it protects and why in a short project note or CLAUDE.md. That helps a fresh session understand the boundary.

The documentation explains intent. It does not enforce the rule by itself. Enforcement still belongs in settings, deny rules, PreToolUse hooks, sandboxing, or the execution environment.

Ask for evidence, not confidence

Weak review question:

Is this implementation good?
Enter fullscreen mode Exit fullscreen mode

Stronger review questions:

Which acceptance criteria are directly covered by tests?
Which important behavior is still untested?
What is the most plausible wrong result that could still pass CI?
Which files or execution paths were not changed but may need updating?
What evidence supports the claim that the old behavior is gone?
Enter fullscreen mode Exit fullscreen mode

These questions force the reviewer to connect conclusions to observable evidence.

Use different review depth for different changes

Not every pull request needs a full multi-agent investigation. You can scale review depth:

  • documentation changes: automated checks;
  • small refactors: one independent review pass;
  • user-facing behavior: focused tests plus independent review;
  • authentication, payments, data, or infrastructure: specialist review and stronger evidence;
  • external side effects: explicit human approval.

The goal is not to add an agent to every step. The goal is to add independent judgment where the cost of a missed defect is high.

The new workflow

The sequence becomes:

  1. One session implements the task.
  2. Automated checks test the result.
  3. A fresh session reviews the diff and evidence.
  4. The original session—or a worker session—fixes confirmed findings.
  5. CI runs again from a clean state.

This is more reliable than asking one long conversation to remember every assumption it made.

Closing thought

Autonomy does not mean trusting one agent more. It means building enough independent checks that no single session has to be perfect.

Part 5 continues with the next decision: when should an agent be allowed to merge, deploy, or create an external side effect?

Top comments (0)