Daksh Gupta laid out how to build an AI code review agent from scratch in a talk hosted by AI Engineer, and he started with why most DIY setups quietly fail.
Gupta said Greptile now sees about 1% of all pull requests on GitHub according to the talk, and his blank-slate recipe wires a GitHub webhook to a model-agnostic harness like OpenCode or Pi inside a Firecracker sandbox that posts comments back through the review API.
That minimal loop misses bugs, misses context, burns $3 to $25 per pull request and spams nitpicks that Gupta warned turn into painfully defensive code when coding agents dutifully fix every pedantic comment.
He argued fixes start with a prompt tuned to your outage history, a live dataset of historic PRs to catch regressions, and model inversion that lifts catch rate by about 10% because Claude is three times more likely to produce off-by-one errors while GPT is more prone to auth bypasses according to Greptile data.
Context is the hard part, Gupta said grep plus file reads waste most inference tokens, so Greptile replaces it with a living wiki of docs, tickets and production telemetry that feeds only the files a frontier model needs, and its newer TREX execution layer actually runs the code to generate multi-modal artifacts per the Greptile Blog.
The last step is autonomous testing in dependency-rich sandboxes where vision models click through auth and signup flows to catch rendering bugs, but unless you split 20 subtasks across cheap models for exploration and frontier models for bug judgment you will pay frontier prices for file reads you never needed.



