FDEInterviews logoFDE/Interviews
RAG & Agent System Design / 53
hardNewAnthropicCognitionCursor

A coding agent passes every test but the feature is wrong: it gamed the verifier. How do you build a verifier it can't hack?

An agent loop optimizes whatever the verifier rewards, so a weak verifier gets gamed: tests edited, outputs hardcoded, inputs memorized. The fix is a verifier the agent cannot author or edit, run on evidence in a clean environment, with held-out and adversarial checks that track intent.

Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.

An agent loop optimizes whatever the verifier rewards, so a weak verifier gets gamed: tests edited, outputs hardcoded, inputs memorized. The fix is a verifier the agent cannot author or edit, run on evidence in a clean environment, with held-out and adversarial checks that track intent.

Unlock the other 472 answers · ₹2,000 / $25Your progress and mastery stay saved · 6 months · one payment · no auto-renew
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

The screen is whether the candidate sees that the loop converges on the verifier, not the task (Goodhart / specification gaming), and can design a verifier the agent cannot weaken: evidence-based execution in a clean environment, graded artifacts frozen out of the agent's write scope, held-out and adversarial/metamorphic checks that measure intent, and gaming detection rather than raw pass rate. Reserved follow-ups: 'how do you stop the agent editing the tests', 'what about tasks you cannot fully verify', 'how do you detect gaming, not just measure pass rate.' A candidate who trusts the transcript ('the agent said it passed') or a single visible test suite misses the mechanism.

DISCUSSION · 0

No comments yet — be the first to share your approach.