The Hidden Costs of Context Switching
TL;DR
Automation is worth it even when the time saved on the task itself is less than the effort to automate. That’s because raw task duration is just the net time. The gross time includes the context switch, the ramp-up, and the struggle to get back into flow. And that’s almost always significantly higher.
I recently built an automation to route receipts from my inbox directly into my accounting tool. The manual version takes maybe two minutes per receipt. Open, download, upload, categorize. No big deal. Yet I still invested time to automate it.
Was it worth it? Purely by the numbers, probably not. I could have processed the receipts faster by hand than it took me to build the automation. But that’s exactly where the thinking goes wrong.
Net Time vs. Gross Time
When we talk about how long a task takes, we usually mean the raw task duration. Net time. But what actually happens when I have to process a receipt manually?
- An email arrives
- I make a mental note to deal with it later
- At some point, I interrupt whatever I’m actually working on
- I open the email, download the receipt, open the accounting tool
- Upload, categorize, close everything
- I go back to what I was doing before
- I try to remember where I left off
- It takes five to fifteen minutes to regain focus
The actual task takes two minutes. The entire process costs me twenty to thirty. Eighteen of those minutes are pure context switching overhead. That’s the gross time. And with automation, it drops to zero, because the receipt gets processed without me even knowing about it.
Sure, you could argue: just batch the receipts in the morning and evening. But that’s not the point. Receipts are just one example. The pattern is everywhere: sorting invoices, coordinating meetings, moving data from A to B. Wherever a small task forces a context switch, you pay the gross time.
Focus Is the Scarce Resource
Anyone who’s been “in the zone” while programming knows the feeling. You hold the entire context in your head, you know exactly where you are, you can see the next three steps. One interruption, and it’s gone. Completely. Getting back takes time. Sometimes you never quite reach the same level again.
The problem isn’t time. The problem is focus. Automation doesn’t just eliminate the task, it eliminates the entire context switch around it.
The Meme
There’s a well-known meme among developers: someone spends half a day automating a task that comes up twice a year and takes five minutes. XKCD even made a great table showing how much time you’re “allowed” to invest in automation for it to pay off.
If you read that table using only the net time, you’ll dismiss most automations as a waste. If you plug in the gross time, the picture changes entirely.
Key Takeaway
Context switching doesn’t affect everyone the same way — and that’s something worth understanding across roles.
People managers often spend their days moving from meeting to meeting, jumping between topics and teams. That’s not a bug, it’s the job. Their value comes from being available, connecting dots across conversations, and unblocking others. Frequent context switches are baked into the role.
Individual contributors, software engineers, designers, writers, operate differently. Their highest-value work happens during long, uninterrupted stretches of deep focus. A single interruption can cost far more than the interruption itself, because it destroys the mental state that took thirty minutes to build.
The friction arises when there’s little understanding for these different working modes. A manager who’s used to rapid switching may not realize what a “quick question” actually costs an engineer mid-flow. An engineer who resents every meeting may not see the coordination work that keeps projects on track.
Conclusion
As with so many things, the answer is honest communication. Talk about how you work best. Make the invisible costs visible. When both sides understand what focus means, and what it costs to break it, better decisions follow naturally.