What Sleep Debt Does to Engineering Judgment
Career

What Sleep Debt Does to Engineering Judgment

The finding that should worry you isn't that six hours of sleep degrades performance. It's that in the study which established it, subjective sleepiness stopped tracking objective decline — the impaired group did not know they were impaired.

Published October 19, 20259 min readUpdated Oct 19, 2025

Written by · Full-Stack Agentic AI Software Engineer — AI Agents, Automation & Revenue Systems for GTM/RevOps teams

In brief

How does sleep loss affect a software engineer's actual performance and judgment?

It degrades performance cumulatively and, critically, it degrades your ability to notice. Van Dongen, Maislin, Mullington and Dinges randomised participants to 4, 6 or 8 hours in bed for 14 consecutive nights and measured neurobehavioural function throughout. The 6-hour group — a schedule many engineers would describe as normal — accumulated deficits in lapses of behavioural alertness and working memory equivalent to a full night of total sleep deprivation, and the deficits grew in a dose-dependent way across the two weeks rather than stabilising. The finding that matters most for knowledge work is that subjective sleepiness did not track this decline: participants adapted to feeling tired long before their performance stopped deteriorating, so self-assessment became progressively less reliable exactly as the impairment deepened. For engineering specifically the exposed faculties are the ones the job runs on — sustained attention, working memory, and the ability to hold several possible explanations in mind at once, which is what debugging is.

  • Six hours in bed for 14 nights produced impairment comparable to one night of total sleep deprivation, and the deficit kept growing
  • Subjective sleepiness decoupled from objective performance — the impaired participants did not know, which makes self-assessment useless as a guard
  • Working memory and sustained attention are the two faculties measured, and they are precisely what debugging and design review consume
  • This is one of the few well-controlled randomised findings in this whole area, unlike most workplace-health claims
  • The practical consequence is to treat sleep as a scheduling constraint on hard cognitive work rather than as a personal virtue

Evidence notes

Van Dongen, Maislin, Mullington & Dinges, SLEEP 26(2):117 (2003)

'The Cumulative Cost of Additional Wakefulness: Dose-Response Effects on Neurobehavioral Functions and Sleep Physiology From Chronic Sleep Restriction and Total Sleep Deprivation.' Participants were randomised to 4, 6 or 8 hours time in bed for 14 consecutive days. Both the 6-hour and 4-hour conditions produced significant cumulative performance deficits relative to 8 hours, increasing in a dose-dependent way across the fortnight. The 6-hour group reached impairment on lapses of behavioural alertness and working memory equivalent to one night of total sleep loss. Subjective sleepiness ratings did not track the objective decline.

METR randomized controlled trial, July 2025

Sixteen experienced developers on 246 real issues in their own repositories were 19% slower with AI tooling while estimating a 20% speedup — a roughly 39 percentage point self-assessment error among domain experts. An independent demonstration that engineers' introspective reports about their own cognitive performance are unreliable, which is the same failure mode the sleep data describes.

Meyer et al., 'The Work Life of Developers' (IEEE TSE, 2017)

Instrumented monitoring of 20 developers over 220 work days: coding 21.0% of the workday, collaborative activities 24.4%, and activity switching every 0.3 to 2.0 minutes outside planned meetings. A day this fragmented places continuous demand on exactly the attentional control that sleep restriction degrades first.

WHO Guidelines on Physical Activity and Sedentary Behaviour (2020)

150-300 minutes of moderate aerobic activity weekly plus muscle-strengthening on two or more days. Included here because physical activity and sleep quality are related, and because the guideline is the clearest example of a body declining to state a threshold where evidence was insufficient — a standard worth applying to sleep advice too.

Continue with purpose

Most workplace-health advice rests on observational data, where people who do X are compared with people who do Y and everyone argues about confounding. Sleep is different. There is a well-controlled randomised study, it is over twenty years old, and its most important finding is still not widely known.

Van Dongen, Maislin, Mullington and Dinges randomised participants to 4, 6 or 8 hours in bed per night and held them there for 14 consecutive days, testing neurobehavioural function throughout.

The headline result

Both restricted conditions produced significant cumulative deficits relative to eight hours, and the deficits increased in a dose-dependent way across the fortnight rather than settling.

The six-hour group is the one worth attention, because six hours is not an extreme schedule — it is what a lot of working engineers would describe as a normal week. After 14 nights, that group reached impairment on lapses of behavioural alertness and working memory equivalent to one night of total sleep deprivation. Turning what sleep debt does to engineering judgment into something a commercial team can run is the problem XenGrowth works on.

Not equivalent to being a bit tired. Equivalent to having been awake all night, sustained, as a baseline state.

The finding that changes the advice

Subjective sleepiness did not track the objective decline. Participants' sense of how tired they felt levelled off while their measured performance kept falling.

You adapt to the feeling of being tired long before you stop getting worse. After a few short nights, 'I feel fine' stops carrying information about whether you are fine.

This is what makes sleep loss different from most impairments. If you are drunk, or ill, or in pain, the signal roughly tracks the deficit and you compensate. Sleep restriction removes the signal while leaving the deficit, which means the normal safety mechanism — noticing and easing off — silently stops working. The XenGrowth resource library approaches this from the the operations side of this side.

It's the same shape as METR's finding on AI tooling, where sixteen experienced developers judged themselves 20% faster while being measured 19% slower. Two unrelated literatures, both concluding that engineers' introspective reports about their own cognitive performance should not be trusted.

There is a second-order problem hiding in that. If self-assessment is the mechanism you would normally use to decide whether to attempt something difficult, then sleep restriction does not just make you worse at hard problems — it removes the check that would have told you to postpone them. So the errors concentrate exactly where they are most expensive: you take on the architecture decision, the production change, the review of the risky pull request, because nothing in your experience of the moment suggests you should not.

Why this profession is unusually exposed

The two faculties measured — sustained attention and working memory — happen to be exactly what engineering work consumes.

Working memory is what lets you hold three candidate explanations for a bug simultaneously while you design the experiment that distinguishes them. Lose capacity there and you don't stop debugging; you start fixating on the first plausible story, because holding alternatives is precisely the thing that got harder. That failure is invisible from the inside — it feels like having a hypothesis, not like having lost the ability to generate others. There is a longer treatment of AI agents and marketing automation in XenGrowth on AI agents and marketing automation.

Sustained attention matters because of how the day is actually shaped. Meyer et al.'s instrumented study found developers switching activity every 0.3 to 2.0 minutes outside planned meetings. Every one of those switches costs attentional control to recover from, and attentional control is the resource being depleted.

Engineering task

What it consumes

How the deficit presents

Debugging an unfamiliar failure

Working memory: multiple live hypotheses

Fixating on the first plausible cause

Code review

Sustained attention across detail

Approving what looks right rather than reading it

Architecture discussion

Working memory plus inhibition

Agreeing to whatever is proposed most confidently

On-call incident response

Both, under time pressure

Acting before diagnosing; missing the second contributing fault

Estimating

Judgment under uncertainty

Optimism, which feels identical to confidence

Why the industry keeps rediscovering this badly

Software has an unusually persistent culture of treating sleep as a resource to be spent, and the sleep-restriction result explains why that culture is so stable despite being obviously counterproductive.

A team working long hours through a crunch is, by day ten, staffed by people who feel roughly normal and are performing substantially below their own baseline. Because the impairment is invisible to them, the shipped work looks like evidence that the approach worked. The bugs it introduced surface weeks later, get attributed to complexity or to a rushed spec, and are never connected to the fortnight that produced them. The feedback loop that would falsify the practice is broken at exactly the point where the evidence would have to travel.

Cook's observation about complex systems is the other half of it: catastrophe requires multiple failures, each insufficient alone. A tired engineer does not usually cause an incident by themselves. They contribute one of the several individually-harmless faults that later combine, which means the causal chain back to a scheduling decision is not merely long but genuinely untraceable. Nobody is being obtuse. The information simply does not survive the trip.

Which is an argument for treating this as a policy question rather than an individual one. An engineer who protects their own sleep against a team norm pays a visible social cost for an invisible benefit, and that is a losing trade to ask of anyone repeatedly. The intervention that works is a schedule that does not require the trade.

The limits of this study

Worth stating, because taking evidence seriously means knowing its boundaries rather than only quoting it when convenient.

  • The sample is modest and consists of healthy adults in a controlled laboratory setting, not engineers doing real work under real conditions

  • Time in bed is not time asleep. Someone with eight hours in bed and poor sleep quality is not in the eight-hour condition in any meaningful sense

  • There is real individual variation in vulnerability to sleep restriction, and the study reports group effects rather than a universal law

  • The tasks measured are psychomotor and memory tests, not debugging. The link to engineering work is a reasonable inference and not a measured finding

  • Fourteen nights is not a career. What sustained restriction does over years is a different and much harder question that this design cannot answer

None of that undermines the core result, which has replicated widely. It does mean the honest claim is "restricted sleep reliably degrades the cognitive faculties this job depends on, and you will not notice" rather than a precise prescription about your hours. XenGrowth on AI search, GEO and discovery goes further into AI search, GEO and discovery.

It is also worth separating this from the productivity-advice genre it usually arrives in. Nothing here is about optimising output or squeezing more from a day. The claim is narrower and, I think, more serious: there is a state in which your judgement is measurably degraded and your confidence in it is not, and that state is reached by a schedule most of this industry considers unremarkable. What you do about that is a question about risk, not about performance.

What to actually do with it

  1. Stop using how you feel as the gate. That is the specific instrument the study found to be broken, and it is the one everybody uses

  2. Treat sleep as a scheduling constraint on hard cognitive work rather than as discipline. If the week has been short, that is information about which tasks to attempt, not a character question

  3. Move the irreversible decisions. Deploys, architecture calls, anything expensive to undo — put them where your sleep has been adequate, and be willing to say so out loud as a reason

  4. Notice the compounding. The study's deficits kept growing across all fourteen days, so the fourth week of a crunch is materially worse than the first, and nobody involved will perceive it as a trend

  5. Watch on-call specifically. It combines interrupted sleep with exactly the tasks that need working memory most, which is close to a worst case and is usually scheduled as though it were free

Common belief

What the study supports

"I've adapted to six hours"

Subjective adaptation happens; objective decline continues

"I can tell when I'm too tired to work"

That signal decoupled from performance after a few nights

"I'll catch up at the weekend"

Not addressed here — recovery is a separate and less settled question

"Some people just need less"

Individual variation is real; the group effect was clear and dose-dependent

"It only affects how fast I work"

The measures were alertness lapses and working memory, not speed

This is general information about published research rather than medical advice, and persistent sleep problems are a clinical matter rather than a scheduling one.

But if you take one thing from a study now more than two decades old, take the awareness result rather than the hours. The dangerous state is not being tired. It is being impaired and feeling fine, which is the state the six-hour group was in on day fourteen while reporting that they had got used to it.

Further reading from XenGrowth

Where this work meets go-to-market

Working on what sleep debt does to engineering judgment inside a commercial team? the XenGrowth practice publishes operator guides on the revenue side of this work.

The study is free to read and takes about half an hour. If you manage engineers, it is probably the highest-leverage thirty minutes of reading available to you, because almost every scheduling decision you make is implicitly a claim about it.

What the sleep research actually found

Five questions on one unusually well-controlled study. The result most people have not heard is the fourth one, and it is the reason the rest matters.

1 / 5
How was the Van Dongen study designed?

Apply this article

How to turn insights into execution

A practical sequence for teams turning concepts into production outcomes.

HealthSleepProductivityCareersResearchCognitioncareer

Audit your current state

Map the bottlenecks and constraints connected to the article’s core problem.

Choose one bounded change

Test the most useful recommendation on one workflow before widening the scope.

Measure what changed

Keep the parts that improve the work, document what failed, and make the next decision from evidence.

Next step

Need help applying this in your stack?

I can translate these patterns into a concrete implementation plan for your team.

Discuss implementationBack to blog

Replies usually within 24 hours.

Next Steps

Continue reading

When Caffeine Stops Helping and Starts Hiding Things

Caffeine works by blocking your perception of a deficit, not by removing it. Combine that with a study showing sleep-restricted people can't feel their own impairment, and you get a mechanism worth understanding rather than a lecture about coffee.

Navigate

Steps, Walking Pads, and Coding While Walking

10,000 steps was a 1960s pedometer marketing figure, not a finding. The research that does exist points somewhere lower and more useful — and it has something specific to say about whether you can type while walking.

Navigate

Will AI Cut Engineering Jobs, or Multiply Their Leverage?

Both answers are already true, for different people. The payroll data shows a 19% employment gap opening for 22-to-25-year-olds in AI-exposed jobs while experienced workers show no gap at all. That split is the actual story, and it is not the one either side of the argument is telling.

Navigate

Coding Is the Smallest Part of Software Engineering

When researchers put monitoring software on 20 professional developers' machines for 220 work days, coding came out at 21% of the day. Not because those developers were slacking — because the other 79% is the job. AI automates a slice of the 21%.

Navigate

Does Being On-Call Cost You Even on Quiet Nights?

A pager that never goes off should be a free night's sleep. Two separate sleep-lab studies say it usually isn't, and the reason has nothing to do with how many alerts actually fired.

Navigate

How Long Should a Deep Work Block Actually Be?

The '90-minute focus cycle' gets quoted as settled science. The research it's built on is real, genuinely interesting, and considerably less precise than the number implies.

Navigate
  • What Does Being On-Call Actually Do to Your Sleep?

    Getting paged at 3am and simply sleeping two fewer hours are not the same injury. The research on interrupted sleep says the fragmentation itself, independent of total hours, is doing damage most on-call engineers never account for.

  • When Should Engineers Exercise Around Deep Work?

    A hard workout dips your executive function for a window afterward, then boosts it for a longer one. The research is fairly consistent on that shape and much messier on whether morning, midday or evening timing matters more than intensity does.

  • What Sitting All Day Actually Does to You

    The honest version is less alarming and more actionable than the headlines. WHO looked at the evidence in 2020 and declined to set a sitting threshold at all — but a million-person meta-analysis found something much more useful about what offsets it.

  • What Happens When One Engineer Does the Work of Five?

    The claim gets made constantly and almost never with a number attached. When someone did attach numbers — METR's randomized trial — experienced developers came out 19% slower while believing they were 20% faster. But suppose the claim were true. The consequences are stranger than the people making it seem to expect.