Coding agents get more out of every token when they start from deterministic context.
Contents
- Inferring the codebase costs agents accuracy, tokens, and consistency.
- Moderne gives agents a deterministic layer they don’t have to rebuild.
- With Prethink, one team’s agents stopped searching and did more work on a fraction of the tokens.
- With a deterministic layer, agents complete every change across thousands of repositories.
- A recipe found every affected repository out of more than 200,000 at a Fortune 25 bank.
- Copilot finished a multinational bank’s upgrade in only 35 tool calls with Moderne.
- Agents get more from every dollar when they stop re-learning the code.
If you watch a coding agent work in a repository, you’ll see it grep for a class name, read a few files, grep again, and slowly piece together how the code fits. Then the session ends, and the next one starts the whole process over. It’s like hiring a capable engineer who forgets the codebase every night. Each morning they re-learn it on your dime, and each time they remember it a little differently.
Moderne computes what agents need to know about the code ahead of time, so they don’t have to re-learn it.
Inferring the codebase costs agents accuracy, tokens, and consistency.
A search for a method name finds the files that mention it, but it can miss a call that runs through an interface or a subclass. The agent then makes changes without knowing that call exists, so the fix only reaches some of the files that need it.
Across thousands of repositories, a call the agent misses in one may be missed in others too. In a security fix, even one missed call can leave a vulnerability open. In an upgrade, it can break a build.
Each session also searches from scratch, paying for the same search over and over. Two runs on the same repository can end up reading different files and making different changes. When the results don’t match, it’s hard to tell why.
Moderne gives agents a deterministic layer they don’t have to rebuild.
The layer starts with the Lossless Semantic Tree (LST), a compiler-accurate representation of a codebase with every type and dependency resolved across files. Agents use it in three ways, each one replacing a step they’d otherwise have to work out for themselves:
- Prethink gives the agent context before it starts. It writes dependencies, architecture, test gaps, and code quality into each repository, so the notes are already on the desk when the agent opens the repository.
- Trigrep handles search during the task. It uses an index built from the LST, so it includes type and dependency information. A search for a method returns the calls that resolve to it, including the ones a text search would miss.
- Recipes make the edits once the agent decides what to change. Each recipe applies the same edit the same way in every repository it runs on.
None of these tools uses an AI model, so they cost no tokens and return the same answer on every run.
With Prethink, one team’s agents stopped searching and did more work on a fraction of the tokens.
Before Prethink, the test analysis agent on a code quality team at a Fortune 100 financial services company looked for every untested method before it could review anything. It searched for them again on every run.
Then, the team gave its agents the test gap and code quality data Prethink writes into each repository. With the complete list waiting for it, the agent covered far more of the code on these code quality and test coverage tasks, used 7x fewer tokens, and finished each review in under a minute.
Without being asked, another of the team’s agents paired the test gap list with Prethink’s complexity score for each class and ranked untested methods in complex classes as the riskiest. The agent used that ranking to write tests for its most critical gaps first.
With a deterministic layer, agents complete every change across thousands of repositories.
A large change has two parts: finding every place it applies, and making it correctly in each one. Moderne enables both with the LST, so agents don’t have to work out either one file by file.
A recipe found every affected repository out of more than 200,000 at a Fortune 25 bank.
A frontier model found a critical vulnerability at the bank. Security rated it at the top of the bank’s scale before anyone knew which repositories it affected. Using Moderne’s tools, the agent was able to check every repository and show that only a small fraction were affected, all in non-critical applications. Security lowered the rating two levels. Engineers then had Claude Code write the fix as a recipe, reviewed it once, and ran it on every affected repository.
Copilot finished a multinational bank’s upgrade in only 35 tool calls with Moderne.
Another bank’s developers asked GitHub Copilot to run an upgrade across ten repositories, once with Moderne and once without. With Moderne, Copilot finished the whole upgrade in 35 tool calls. Without it, Copilot made 1,487 tool calls and stopped with only 18% of the upgrade completed.
| Copilot with Moderne | Copilot without Moderne | |
|---|---|---|
| Tool calls | 35 | 1,487 |
| Repositories changed | 10 | 8 |
| Source files upgraded | 534 | 225 |
| Completeness of the upgrade | 100% | About 18% |
| Repositories that still build | 10 of 10 | 10 of 10 |
In another case, on one of the bank’s widely shared internal applications, a coding agent working alone took about 40 minutes and more than 6 million tokens for a patch upgrade. A recipe made the same upgrade in about 7 minutes with no token spend.
The bank went on to run two-day workshops where developers used Copilot and Moderne to upgrade about 3,000 repositories. They estimate the work restored more than $10 million in developer capacity.
In both cases, the deterministic layer allowed the agent to complete its tasks repeatably across every repository it touched.
Agents get more from every dollar when they stop re-learning the code.
With context notes on the desk each morning, agents spend their tokens on reasoning: deciding what to change, filling in what a recipe doesn’t cover, and building new features. For work where finding the code is most of the job, like test coverage and upgrades, they also spend far fewer tokens.
To see the return on your own agents, start with one of those tasks. Run the same agent on it with and without Moderne, and compare tokens, time, and how much of the code each run covers. Then run each version a second time to check whether its findings match across both runs.
Treat coverage and tokens saved as leading indicators. Leadership will want to see what follows, like the test gaps closed and the feature work those tokens went to. Moderne’s customer success team has found that the most convincing ROI cases are the ones customers build from their own history. A baseline from your own agents will carry more weight than any published number, including the ones in this post.
To see the deterministic layer work on real code, explore Moderne on open source repositories. You can run a recipe across many repositories at once and review the diff it makes in your browser.


