Refactoring

Refactoring

🧵 Essays

We are (still) not giving agents good context

What new research from DX says about context, tokens, and definitions of done

Luca Rossi's avatar
Luca Rossi
Dec 02, 2026
∙ Paid
Upgrade to paid to play voiceover

Hey! Today’s article is written together with Justin Reock and our friends at DX, who are among the few people in our industry who run large-scale research on how engineering teams work on a quarterly basis.

Justin and I at LDX3 in New York this year!

Last summer we went through their Q2 AI impact report, and one of the things that stuck with me the most was how much AI spend was outrunning returns.

The Q3 numbers push the same story possibly even further:

  • AI spend per developer has grown 20x in a year

  • PR throughput is up 75%

Overall productivity gains, though, are still meager, and these numbers are countered by other, less attractive ones:

  • In orgs with high AI adoption, PRs wait for review >2x longer

  • Ease of overall delivery only went up 3%

  • Share of engineering time going to new features only went from 57% to 59%

To be fair, a stable share of time doesn’t mean a stable amount of innovation, and more throughput is worth something on its own. But it does hint that something is holding agents back, beyond raw model capability.

In my experience, which is also what DX is betting on, most of the time this blocker is context. When an agent goes off the rails on Tolaria, it’s usually that the ticket was bad: like, success criteria were unclear, or I took too much for granted.

DX has been working on this at scale, and they are releasing research that introduces Agent Experience (AX): a way to measure the quality of the context agents work with, the same way we have measured devex for humans for years.

I got preview access, so today I am going through the key findings, together with my own take on what I am seeing in teams.

Here is the agenda for today:

  • 💸 Bad context is a token tax — the agent may still get the answer right, but you pay almost double.

  • 📉 Bad context makes AI feel worse — what the Stack Overflow survey says about usefulness.

  • 🧪 Measuring context with CAFE(S) and AX — what good context looks like, and how well AX measures it.

  • 🎯 Agents fail at the brief — why Actionability is the weakest dimension, and what to do about it.

  • 🔁 Fixing the docs instead of the prompt — turning today’s sessions into better context for tomorrow.

Let’s dive in!


I want to thank Justin and the DX team for partnering on this again! You can find the full research here:

Download the full report


💸 Bad context is a token tax

In the first experiment of this research, DX took a controlled data analysis task and ran it twelve times: one run had clean context, while the other eleven had different combinations of context failures injected on purpose.

After some human corrections, all twelve runs eventually got the right final number. But the eleven runs with bad context processed ~2x tokens on average (900K vs 470K).

Across one controlled experiment, intentional context-defect conditions averaged >91% more processed tokens than the baseline

My gut feeling is that this has gotten worse over time. The more models become capable, the more comfortable they are at doing extremely long runs, which means they search, re-read files, guess, get corrected, try again, burning a ton of tokens this way – more than models in the past.

For example, anecdotally (but I am going to measure precisely and report back) my agents got not only better, but also faster, since I integrated Unblocked, because the tool fetches and digests context on their behalf, and it’s more efficient than what the agent does by itself.

Also, this is yet another reason why measuring adoption with token spend doesn’t make a lot of sense at this point.


📉 Bad context makes AI do worse

In the example above the AI was able to get to a correct output even with bad context, but of course this is not always the case.

DX ran a secondary analysis of the 2026 Stack Overflow Developer Survey, comparing developers who report working with outdated, incomplete, or conflicting information with those who usually have the context they need. The first group was consistently less likely to rate AI as “very useful”, across the seven activities DX looked at:

Percentage of respondents rating AI "Very useful" in each activity, comparing those reporting outdated, incomplete, or conflicting information with those reporting that they usually have the context they need.

DX is careful to say this is a correlation in self-reported data, not causation, nor proof that better context would fix it, and I agree. Still, when I speak with engineers who report that AI doesn’t do well on their codebase, and I dive a little more into it, it often looks like the problem is the context mess.


🧪 Measuring context with CAFE(S) and AX

So, if context is the problem, how do you tell good context from bad?

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2026 Refactoring ETS · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for writing, podcasting, and media founders.