When Caffeine Stops Helping and Starts Hiding Things
Career

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.

Published October 13, 20259 min readUpdated Sep 6, 2026

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

In brief

How does caffeine become a productivity trap for software engineers?

Because it suppresses the signal rather than the deficit, and there is already a well-controlled study showing that the signal is the thing engineers most need and most easily lose. Van Dongen and colleagues randomised participants to 4, 6 or 8 hours in bed for 14 consecutive nights and found that the 6-hour group reached impairment on lapses of behavioural alertness and working memory equivalent to a full night of total sleep deprivation, with deficits accumulating across the fortnight — and crucially that subjective sleepiness stopped tracking the objective decline. People adapted to feeling tired while continuing to get worse. Caffeine operates on precisely that subjective channel: it acts as an adenosine antagonist, so it reduces the perception of sleep pressure without discharging it. Used occasionally that is a reasonable trade. Used daily by someone already sleep-restricted, it removes the only remaining feedback about a state in which their judgement is measurably degraded, which is the specific configuration that makes it a trap rather than a tool.

  • Caffeine blocks the perception of sleep pressure rather than resolving it — the deficit continues to accumulate underneath
  • Van Dongen's participants had already lost the subjective signal at six hours; caffeine removes what remains of it
  • The faculties measured declining — sustained attention and working memory — are exactly what debugging and design review consume
  • The trap is structural rather than moral: it works, which is why it substitutes for the thing that would actually help
  • Timing and dose matter more than total intake, because caffeine's half-life means an afternoon dose is still active at bedtime

Evidence notes

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

Participants randomised to 4, 6 or 8 hours time in bed for 14 consecutive days. Both restricted conditions produced significant cumulative neurobehavioural deficits relative to 8 hours, increasing dose-dependently across the fortnight. The 6-hour group reached impairment equivalent to one night of total sleep deprivation on lapses of behavioural alertness and working memory. 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 measured 19% slower with AI tooling while estimating a 20% speedup — a roughly 39 percentage point error in self-assessed cognitive performance among domain experts. An independent demonstration that engineers' introspective reports about their own capability are unreliable.

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

Instrumented monitoring of 20 developers over 220 work days. Activity switching every 0.3 to 2.0 minutes outside planned meetings, and one participant recorded coding for 135.7 minutes unbroken. A day this fragmented places continuous demand on the attentional control that both sleep restriction and caffeine timing affect.

This isn't an argument that you should stop drinking coffee. It's an argument about a mechanism, and the mechanism matters because of one specific research finding that makes this profession unusually exposed to it.

Caffeine does not create alertness. It blocks the perception of the absence of alertness, which is a different thing with different consequences.

How it actually works

Adenosine accumulates in the brain across the waking day and is one of the signals that produces sleep pressure — the growing sense that you have been awake a long time and should stop. Caffeine is an adenosine antagonist: it occupies the receptors adenosine would otherwise bind to.

The adenosine is still there. The pressure is still accumulating. What has changed is that you can no longer feel it, and when the caffeine clears you feel the whole accumulated amount at once, which is the rebound everybody recognises. If health needs to survive contact with a marketing team, XenGrowth's growth engineering practice has the operational side.

It suppresses a warning light. That is a reasonable thing to do occasionally, on the understanding that the condition the light was reporting has not changed.

For most people, most of the time, this is fine. Sleep pressure is not a debt with a punitive interest rate, and blunting it through a difficult afternoon is a sensible trade that humans have been making for centuries. The problem is specific to a particular situation, and it is a situation this industry produces routinely.

Why this profession is exposed

Because of what Van Dongen and colleagues found when they randomised people to 4, 6 or 8 hours in bed for fourteen consecutive nights.

The six-hour group — a schedule a great many engineers would describe as an ordinary week — accumulated deficits in lapses of behavioural alertness and working memory equivalent to a full night of total sleep deprivation, and those deficits kept growing across the fortnight rather than levelling off.

But the finding that matters here is the other one. Subjective sleepiness did not track the objective decline. Participants' sense of how tired they were flattened out while their measured performance carried on falling. They adapted to the feeling and not to the impairment. If the operations side of this is the part you are stuck on, The XenGrowth resource library is the better reference.

Now add caffeine to that. Someone already in a state where their internal report is unreliable takes a substance whose entire action is on the internal report. The gap between how you are performing and how you believe you are performing, which was already open, gets wider — and there is now nothing left inside your own experience that would tell you.

State

Actual capability

What you perceive

Rested, no caffeine

Baseline

Roughly accurate

Rested, caffeine

Baseline, possibly slightly better

Roughly accurate, mildly flattered

Sleep-restricted, no caffeine

Degraded, accumulating (Van Dongen)

Already unreliable — feels 'used to it'

Sleep-restricted, caffeine

Degraded, accumulating, unchanged

Feels fine. No remaining signal

The bottom row is the trap, and note that it is not a claim about caffeine being harmful. The capability column is identical to the row above it. What has changed is entirely in the third column, and the third column is what you make decisions with.

The feedback loop that keeps it going

There's a second-order problem that makes this self-sustaining, and it's about timing rather than dose.

Caffeine has a long half-life — several hours in most adults, longer in some. An afternoon dose is therefore still substantially present at bedtime, where it does what it does: reduces sleep pressure. Sleep is worse, the following day starts with more deficit, more caffeine is required to suppress the signal, and it is taken later.

Nobody in this loop is making a mistake at any individual step. Each dose is a reasonable response to how the person feels at that moment, and the feeling is the one thing in the system that has been chemically disconnected from the underlying state. XenGrowth on AI agents and marketing automation approaches this from the AI agents and marketing automation side.

What this means for engineering work specifically

The faculties Van Dongen measured declining are an unfortunate pair for this job. Working memory is what holds several candidate explanations in mind while you narrow them down, which is essentially the whole of debugging. Sustained attention is what a day fragmented into two-minute activity switches — as Meyer et al. measured — continuously taxes.

The failure that follows is specific and hard to notice from inside. You don't stop being able to debug; you start fixating on the first plausible explanation, because generating alternatives is precisely the capacity that degraded. From the inside that feels like having a hypothesis, not like having lost the ability to produce others.

It's the same structural problem METR documented in a completely unrelated context: sixteen expert developers estimating a 20% speedup while being measured 19% slower. Two literatures, one conclusion — introspective reports about your own cognitive performance are not evidence.

Tolerance, and why quitting feels like proof

Regular use produces tolerance, and tolerance is where most people's reasoning about caffeine goes wrong in an interesting way.

With daily use, the effect of a given dose diminishes, so the same amount produces less of a lift than it did. What people notice is not that — it is what happens when they stop. Skipping the morning coffee produces a headache, poor concentration and general awfulness, which is read as evidence that caffeine was doing a great deal of work. It is at least as consistent with the opposite reading: that most of the daily dose had become maintenance of a baseline rather than an improvement on it, and that what you are feeling is its absence rather than its benefit. XenGrowth on AI search, GEO and discovery covers the AI search, GEO and discovery side of this.

This matters because it makes the habit self-justifying in a way that resists evidence. Anyone who tries to test whether they need it runs an experiment whose first few days are dominated by withdrawal, concludes the answer is obviously yes, and stops. A fair test would need a week or two, which almost nobody runs, so the belief goes permanently unexamined.

None of that is an argument for quitting. It is an argument for holding the belief loosely, because the evidence most people have for it is generated by the design of the experiment they accidentally ran. If you want to know what your actual baseline is, the honest version takes a fortnight and a period where nothing important is shipping — which is itself a reasonable reason to postpone it indefinitely, and worth admitting rather than dressing up.

What to actually do

  1. Notice which row of the table you are in. Caffeine while rested is a mild enhancer with a manageable cost. Caffeine while sleep-restricted is a mask over an instrument you had already partly lost, and the difference is not in how it feels

  2. Set a cutoff time and treat it as a constraint rather than a preference. Given the half-life, an afternoon dose is present at bedtime whether or not you notice it, and this is the single change that breaks the loop

  3. Use it deliberately rather than by default. A dose taken for a specific difficult hour is doing something; a dose taken because it is eleven o'clock is maintaining a baseline you have stopped measuring

  4. Stop treating it as evidence about your capacity. 'I feel fine' after coffee, on four hours of sleep, is the least informative sentence available about your actual state

  5. Move the irreversible work. If the week has been short, the deploy and the architecture decision belong on a different day, and caffeine is not a reason to reconsider that

Belief

What the mechanism implies

"Coffee makes me sharper"

It restores you toward baseline; it rarely exceeds it

"I can drink it late and sleep fine"

Sleep architecture is affected even when falling asleep is easy

"I've built a tolerance so it's harmless"

Tolerance is to the effect, not to the accumulating deficit

"It helps me focus on hard problems"

It helps you stay awake for them; the working-memory cost stands

"I only need it because I'm busy"

Plausible, and it is also how the loop describes itself

This is general information about published research rather than medical advice, and caffeine affects people very differently — metabolism varies substantially between individuals and some of that variation is genetic.

The point is not abstinence. It's that in a profession whose core work depends on working memory and sustained attention, and where a fourteen-night study showed people losing the ability to perceive their own impairment, the substance whose mechanism is to further blunt that perception deserves to be used on purpose rather than on schedule.

Further reading from XenGrowth

Where this work meets go-to-market

XenGrowth's operator guides covers the go-to-market side of health, which this piece deliberately leaves alone.

If there is one line to keep, make it this: caffeine is a reasonable answer to being tired and a poor answer to being sleep-deprived, and the difference between those two states is exactly the thing it removes your ability to detect. Everything else here is detail attached to that one asymmetry. The practical version is a cutoff time you keep and a habit of not treating how you feel at four in the afternoon as information about whether you should be making decisions that are hard to reverse.

That single rule handles almost every case this post describes, and it requires nothing of you except noticing which of the two states you are actually in.

Apply this article

How to turn insights into execution

A practical sequence for teams turning concepts into production outcomes.

HealthSleepProductivityCareersCognitionResearchcareer

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

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.

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.