The case for AI coding tools rests on time saved writing code. The worry is that some of that time is only borrowed, because a developer who didn't write the code doesn't carry it around in their head, and pays the difference later, when something breaks. People have started calling this cognitive debt. Until now there has been little direct evidence of how big it is.
Researchers at the University of Rostock and FHDW Hannover set up a simple test with 35 participants, a mix of students, academics and professional developers. Each solved one small Java task by hand and another with a chat assistant, and read a third, ready-made solution without writing anything. Only afterwards were they given the real exercise. The researchers had quietly planted bugs in all three pieces of code (an operator flipped, a condition negated, a number off by one), and participants had to find them.
The speed-up was real. With the chatbot, participants finished the programming task in close to half the time. The cost showed up in the second half. Participants found 88% of the planted bugs in code they had written themselves, against 80% in code they had produced with the chatbot, and they took longer to find each one. Code they had never seen before was hardest of all, which the authors take as a sign that prompting for code, judging it and pasting it in builds some understanding, just less than writing it does.
"Cognitive debt, therefore, may be paid not only in time but also in the quality of work."
Recall played a large part. Participants said they recognised about six in ten of the bugs they caught in their own code because they remembered what the line should have said. In chatbot code, the figure was about a third. The more of the chatbot's code a participant kept verbatim, and the more they pasted the task description straight into their prompts, the slower they were to find bugs afterwards.
Nor did the time saved go into extra checking. Screen recordings showed participants ran their code and tests about as often in both conditions. Ten of them admitted they had only skimmed the generated code. One put it plainly: "tests pass, zap, done. That's a problem for my future self."
"We find no obvious differences in executed verification activities between the two modes."
The authors conclude that at this scale the debt was small and quickly repaid. That is fair, but it is also the part of the study most likely to be over-read in either direction. These were single methods written in well under half an hour, so the experiment cannot say whether the gap stays small, grows with the size of a codebase, or compounds as weeks pass. It used a plain chat window with a mid-sized open model, not an agent editing many files at once. A tool that writes far more code per request, as agents do, more plausibly widens the gap than closes it. The authors also concede that finding planted bugs may measure recall as much as understanding.
For an engineering leader, the practical point is about what a faster cycle time hides. On this evidence, the hours a team saves by generating code are partly a loan against the next incident, and the people paged when it breaks may be the ones who know that code least well. That argues for asking who on the team could debug a given module without the tool, and for treating "the author understands this" as something a review checks rather than assumes. It also makes the participants' own instinct worth copying deliberately: delegate freely where the code is low-stakes or easy to verify, and write by hand where someone will need to reason about it under pressure. Many participants said they already sort tasks this way. Nothing in the study tests whether that judgement is right, and a team should check it on its own codebase before trusting it.
Sources
- Oertel, J., Klünder, J., Hebig, R., "The Comprehension Gap in LLM-Assisted Software Development: An Experiment" — https://arxiv.org/abs/2611.24216