Product Research Pricing About Careers Blog Alpha Talk to us ⬇ Download Alpha Build
Research Learning science · 26 June 2026 · 13 min read

Explain-to-merge: where one beat of friction changes what sticks

Friction that teaches and friction that annoys are separated by about ninety seconds and one design decision about timing. We ran four placements of the same comprehension check against 1,180 merges to find out which one survives contact with a working engineer.

ReportAWL-2026-05
Versionv1.1
AreaLearning science

Updated 26 June 2026 · v1.1 adds the review-rework secondary outcome and marks it exploratory

Abstract

We tested four placements of an identical comprehension prompt across 1,180 merges by 94 engineers: before generation, immediately after generation, at merge time, and 24 hours post-merge. Merge-time placement produced the highest 30-day retention (68% against 41% for the no-prompt control) at a median cost of 94 seconds per merge. Post-generation placement performed nearly as well on retention but was abandoned by 31% of participants within three weeks. Placement, not prompt content, accounted for most of the variance.

68%30-day concept retention with a merge-time check, against 41% unprompted
94smedian added time per merge, the cost of the winning placement
31%abandonment rate for the otherwise-effective post-generation placement

Every product in this category eventually discovers that it can improve learning outcomes by making the tool worse to use. The interesting question is not whether friction works. It is how little of it you can get away with, and precisely when to spend it.

We had a specific version of this problem. The comprehension check in our product asks the engineer to explain a generated diff in their own words before it merges. That is a real cost imposed on someone trying to close a ticket. This study is our attempt to justify the cost honestly, and to find the cheapest placement that still earns it.

Design

Ninety-four engineers across nine teams, randomised into five arms. Every arm saw an identical prompt generated by the same model with the same rubric. The only variable was when it appeared.

Arms
Pre-generation, post-generation, merge-time, T+24h, no-prompt control
Participants
94 engineers, nine teams, randomised within team
Merges observed
1,180 qualifying merges over eleven weeks
Primary outcome
Concept retention at 30 days, blind-scored
Secondary
Added latency per merge, voluntary abandonment, review rework
Randomisation
Within-team, stratified by seniority

Randomising within team rather than between teams cost us statistical power and bought us protection against the thing most likely to ruin a study like this, which is that one team has a strong review culture and another does not.

Merge time wins, and not by a little

Figure 0%20%40%60%80%Merge time68%Post-generation64%T+24 hours52%Pre-generation45%No prompt (control)41%
Concept retention at 30 days by prompt placement, percentage of concepts retained

Merge-time placement produced 68% retention at 30 days against 41% for the no-prompt control. Post-generation placement reached 64%, statistically indistinguishable from merge time on retention alone. Pre-generation placement was barely better than control at 45%, and T+24h landed at 52%.

Pre-generation failing is the result we should have predicted and did not. Asking someone to predict what code will do before they have seen it sounds like a generation effect, which is well supported in the literature. In practice engineers treated it as a formality standing between them and the thing they wanted, and answered it in the shortest way that would dismiss the dialogue.

Retrieval needs something to retrieve

The placements that worked are the ones where the engineer had already read the code and was being asked to reconstruct it without looking. That is retrieval practice. The placements that failed asked for either prediction with no referent or recall so late that the context was gone.

What it costs, and who quits

Retention is only half a decision. A check that works perfectly and gets switched off in week three has an effect size of zero in production, and this is where the two leading placements separated sharply.

Figure 0102030400255075100Pre-generationPost-generationMerge timeT+24 hoursmedian added seconds per mergeabandonment within three weeks (%)
Median added seconds per merge and three-week abandonment rate by placement

Merge-time placement added a median of 94 seconds per merge and was voluntarily abandoned by 6% of participants. Post-generation placement added only 71 seconds but was abandoned by 31%, a fivefold difference. The interviews were unanimous about why: interrupting generation breaks the flow of building, while a check at merge time lands at a boundary where the engineer has already mentally shifted into review.

Placement30-day retentionAdded time (median)3-week abandonmentReview rework
No prompt (control)41%0sn/abaseline
Pre-generation45%62s18%+2%
Post-generation64%71s31%-4%
Merge time68%94s6%-11%
T+24 hours52%88s24%-1%
All five arms. Review rework is change in the share of merged PRs requiring a follow-up fix within 14 days.

The review rework column was not a primary outcome and is the finding we would most like to see replicated. Merge-time checks were associated with an 11% reduction in PRs needing a follow-up fix inside two weeks. If that holds up, a meaningful part of the 94 seconds pays for itself immediately rather than in some future quarter when the engineer is more capable.

Prompt content mattered much less than we expected

We varied prompt phrasing across three styles within the merge-time arm: open explanation, targeted question about a specific branch, and a request to predict the effect of a proposed modification. The spread between them was 4 percentage points of retention, well inside the noise of the placement effect.

This is convenient for engineering and slightly deflating for the research programme. The thing we spent most of our model budget on, generating a good question, matters less than the thing that costs nothing, choosing when to ask it.

Limits

Arm assignments, the prompt bank, blind scoring instructions and the abandonment event log are published. Merge diffs are not.

The placement result is a direct application of the testing effect [1] and of Bjork's desirable difficulty [2], with the important qualification that difficulty has to be placed where retrieval is possible. Our failed pre-generation arm is best read against the generation-effect literature [3], which predicts a benefit we did not observe, most likely because the participants had no referent to generate against. Kluger and DeNisi [4] anticipate the abandonment asymmetry we measured: feedback interventions that interrupt task execution are systematically rejected even when effective. The spacing follow-up is in AWL-2026-02 [5], and the comprehension instrument is documented in AWL-2026-06 [6].

Artefacts

Everything below is published or available on request. A number nobody can reproduce is an advertisement, not a result.

CodeArm assignment and randomisation codePython, MIT
DataPrompt bank, all three content stylesJSON, 1,180 prompts
InstrumentBlind scoring instructionsPDF, 5 pages
DataAbandonment event logCSV, anonymised
CodeLatency instrumentation harnessTypeScript, MIT

References

  1. Roediger, H. L., & Karpicke, J. D. (2006). The Power of Testing Memory. Perspectives on Psychological Science, 1(3).
  2. Bjork, R. A. (1994). Memory and Metamemory Considerations in the Training of Human Beings. In Metacognition. MIT Press.
  3. Slamecka, N. J., & Graf, P. (1978). The Generation Effect: Delineation of a Phenomenon. Journal of Experimental Psychology, 4(6).
  4. Kluger, A. N., & DeNisi, A. (1996). The Effects of Feedback Interventions on Performance. Psychological Bulletin, 119(2).
  5. Bhardwaj, M. (2026). Spaced retrieval for code: FSRS against 18,000 review events. AI Work Lab Research, AWL-2026-02.
  6. Bhardwaj, M. (2026). The comprehension gap: 200 engineers, 12 months, and what agentic coding did to recall. AI Work Lab Research, AWL-2026-06.
Cite this work

Bhardwaj, M. (2026). Explain-to-merge: where one beat of friction changes what sticks. AI Work Lab Research, AWL-2026-05.

Mohit Bhardwaj

Head of Research · aiworklab

Mohit runs the research programme at AI Work Lab: the longitudinal study of how agentic coding changes what engineers retain, the comprehension instruments the product gates on, and the evaluation harness the team uses to decide what ships. He writes up the measurements that changed our minds, including the ones that were inconvenient for the product.