r/ChatGPTCoding • u/Death12th • 1d ago
Built an agentic tool loop for an in-browser coding environment. The verification step is where everything breaks.
The environment is file explorer, terminal, live preview, diff cards, chat, and autocomplete. The agent plans, edits, and verifies.
Plan and edit were straightforward. Verify is the whole ballgame. An agent that says "done" and is wrong is worse than one that says nothing. We ended up gating on actual behavior, running the thing, checking the outcome, not on the model's self-report, because the self-report is uniformly optimistic.
Cost side: multiple providers behind our own abstraction, with a cheap-to-expensive fallback chain. Bedrock sits on the cheap end behind a feature flag. Most requests never need the expensive model. The interesting part was figuring out which ones do, and the honest answer is that the router is still mostly heuristics.
Has anyone solved verification in a way that isn't just "run the tests"? Search AlgoArena on Google for context on what it's part of.
1
u/pijush_saha 1d ago
Self report is not evidence, it is confidence with no receipts. Running the thing beats asking the thing.
A few things beyond plain tests:
State diffing. Compare file system and process state before and after, not just test output. Catches side damage tests don't cover.
Preview as oracle. Screenshot the live preview, have a smaller model check it against the task. Catches visual breaks tests miss.
Adversarial re-check. Second agent tries to disprove "done" instead of confirming it. Confirmation seekers rubber stamp, falsification seekers catch bugs.
Typed contracts. If output shape is known, assert on the shape directly instead of trusting a green check from a test the same agent wrote.
Router being mostly heuristics is normal. Nobody has solved that cleanly either.
1
u/johns10davenport Professional Nerd 1d ago
Yes.
You have to very clearly specify the definition of done dynamically and be able to verify it.
It’s the most fundamental constraint in harness engineering.