AI coding assistants can generate massive volumes of code in seconds, but when a text-only review misses a subtle runtime error, developers pay a massive debugging tax, spending hours scraping logs, scrambling to reproduce environments, and writing urgent hotfixes under pressure.
Greptile's new tool, TREX, tackles this bottleneck by moving from static code analysis to active runtime execution.
TREX actively runs PR branches in a dynamic sandbox and automatically spins up dev servers, mocks API inputs, and executes interactions to catch failures that static analysis cannot see.
By reading the code and then running it, Greptile mimics the review and QA pipelines that real engineering teams build and automates the gruntwork of validation.
By executing the code during validation, TREX catches critical issues that static analysis misses:
- Runtime bugs like the application inexplicably freezing two seconds into startup.
- Complex security vulnerabilities, like a shell expansion bypass that quietly leaks secrets.
The ceiling of static analysis
Though large language models have gotten much better at finding bugs and reasoning about code logic, they still struggle to predict complex runtime state failures.
These are issues caused by dynamic memory mutations, asynchronous event loops, race conditions, or stateful database connection pools that happen during code execution.
This is exactly what creates the debugging tax. A text-only AI reviewer will frequently approve a PR where the TypeScript types and function logic look clean in isolation. However, in production, an edge-case null payload passing through an async middleware chain triggers an unhandled promise rejection and a 500 server error.
When a bug like this slips past review, the team is forced into damage control: bisecting git commits, scraping distributed log aggregators, and patching the logic under immense pressure.
Safely scaling AI code generation requires an evolutionary leap in QA. Teams need to shift from passive compute prediction to active code execution. Active execution requires the AI to actually compile, execute, and evaluate the software in an isolated environment.
Instead of an LLM passively guessing that a database query might time out if a user ID is null, active code execution spins up an ephemeral container. It fires a payload against the live endpoint, measures execution, and intercepts the real HTTP 504 log directly.
TREX runtime validation and proof of work
Attempting to make a single AI agent run services, take screenshots, and run tests can overload the model's context window.
To keep the context focused, the main Greptile reviewer acts as an orchestrator. When it reads a diff and identifies an issue, it spins up a dedicated TREX sub-agent scoped exclusively to investigate that specific problem in an isolated sandbox.
Take a new UI component hidden behind an authentication gate as an example. Testing this locally normally requires setting up the dev environment, handling web tokens, and manually toggling feature flags.
A TREX sub-agent figures this all out autonomously. It interacts with the app and returns to the PR with a screenshot of the rendered feature that shows whether it works or breaks.
An AI that only leaves a text comment reading "this might fail" creates more work. The developer still has to pull the branch, start the server, and verify the results.
By attaching concrete artifacts to the PR, TREX ensures the developer never has to run the code themselves.
Under the hood: the semantic code graph and continuous learning
Executing code in a sandbox sounds simple, but running blind tests on a complex codebase is computationally impossible. Before TREX can execute a single test, it needs to know what to test.
That context comes from Greptile's underlying Semantic Code Graph. Before running any code, Greptile parses the entire repository to extract and map directories, files, functions, variables, and classes.
When a PR is submitted, Greptile acts as an orchestrator. It deploys a swarm of parallel AI agents that query the graph index to trace dependencies and assess impact well beyond the changed lines.
However, mapping static code isn't enough on its own. Greptile continuously learns and adapts to the team's undocumented preferences and engineering standards.
By ingesting internal documentation and reading historical and ongoing PR comments, the system dynamically adapts its custom rules over time. This leads to highly tailored reviews that understand the nuances of your specific stack.
This combination of deep codebase mapping and continuous cultural learning is why Greptile's core reading layer catches the subtle issues that diff-only AI tools miss:
- Cross-service logical bugs
- Silent exception swallowing
- Stylistic regressions
The central validation layer: Greptile CLI and the `/greploop`
Greptile allows you to get the rigorous code auditing without leaving your existing workflows.
Developers don't have to wait for a GitHub PR to get codebase-aware feedback. The Greptile CLI allows engineers to run a full repository review locally in the terminal.
The CLI includes an "--agent" mode that lets your local coding assistants trigger Greptile themselves. They receive findings and suggested fixes as raw text to iterate on immediately.
For ultimate autonomy, the "/greploop" skill creates a self-healing developer loop that follows a five-step cycle:
- An AI agent writes code
- It triggers a Greptile review
- The agent reads the resulting feedback
- It applies the exact fixes and pushes the commit
- It triggers another review
The system repeats the loop up to five times to prevent runaway cycles. It continues until Greptile scores the PR a perfect five out of five with zero unresolved comments.
Real-world impact
Brex integrated Greptile to navigate their massive, 8-year-old monorepo with high precision and low noise. By catching what human reviewers easily miss, the platform helped Brex ship features 30% faster. CTO James Reggio officially called it "the only AI reviewer that doesn't annoy the s**t out of me."
We can also see TREX runtime validation catching bugs in the wild. In the "workos/oagen" repository, Greptile caught a correctness bug leaking sibling models and breaking a selected-only contract.
More critically, in the "hashgraph-online/hol-guard" repository, it identified a severe vulnerability where a shell expansion bypass allowed secrets to exfiltrate past a kubectl guard.
Crucially, TREX didn't just leave a text warning about the security flaw. It actively spun up a sandbox, executed the malicious payload, fired it against the logic, and attached the exact failure output as proof of work directly in the PR.
Greptile's benchmarks show that teams relying on this automated validation layer merge pull requests up to 4x faster and catch 3x more production-blocking bugs than those relying on static review alone.
Enterprise-scale deployment
To support large-scale engineering teams, Greptile also offers self-hosted, air-gapped deployments. Organizations can deploy the system entirely within their own virtual private cloud to maintain strict data residency requirements.
The platform is SOC 2 Type II compliant and includes standard enterprise controls like SSO and comprehensive audit logs.
AI code generation is only as fast as your validation pipeline. Relying on manual human testing to validate AI-generated code nullifies the velocity gains of using AI in the first place.
You can begin a 14-day free trial to experience the automated validation layer against your own codebases.