
15 July 2026
The Myth of Multitasking and Context Switching
It would be great to handle multiple tasks at once, but does it actually boost productivity, or is it just an illusion? Let’s find out in this article.
There are moments when, as developers, we find ourselves with 15 project tabs open, while simultaneously following 3 different chats (and, lately, at least 2 of these with Claude Code), producing line after line of code in just a few moments.
It seems like the height of productivity, right? Yet, if we look at the results, that's not always the case: completing a single task can take multiple iterations, sometimes we later realize we've introduced a new bug while trying to fix another one, and often all those open tabs are just leftovers from work already completed or quick searches.
In practice, what often happens is that being busy gets confused with being productive. Having more open conversations, more tasks in WIP, more screens in front of us doesn't automatically make us more productive — quite the opposite.
Let's find out together why being busy doesn't necessarily mean producing more, and how we can actually give our productivity a real boost.
Context switching hinders our productivity
Multitasking gives us the illusion of optimizing our time. We do it at work, but also in everyday life: maybe we remember to call our parents while doing a load of laundry, or we listen to a voice message a friend sent us while cooking dinner.
Yet what we're actually doing isn't performing several tasks at the same time, but alternating the object our attention rests on: from the conversation to the washing machine, from the message to the pan.
The truth is that several studies show that every shift in focus comes with a switch cost (more details here): our brain isn't actually able to follow multiple events at the same time, so it continuously shifts attention from one task to another.
Even though a person may be more or less skilled at continuously switching context, depending on biological and experiential factors, in all cases following multiple tasks at the same time results in:
- Greater mental fatigue,
- Higher reported levels of stress and frustration,
- Negative consequences on performance, such as a higher error rate and sloppier work.
Multitasking, then, is just a myth: it actually involves frequently shifting focus and requires deploying more cognitive resources (in particular selective attention and working memory) than we would use if we focused on a single task at a time.
What happens when we switch context
Why is context switching so difficult? Let's think about what happens every time we have to move from one task to another:
- We shift our attention away from the first task.
- We move our focus to the second, for which we need to recall the context from memory: what had been said and done before? Where had it gotten to?
- We go back to focusing on the first, but here too we have to remember again: where had we left off? What had we already done and what was still to do?
And even in cases where the two tasks can actually be carried out at the same time, such as listening to someone talk while performing a manual task, the attentional resources we can draw on are limited and get divided up.
In particular, juggling multiple tasks leads to:
- Reducing the level of processing for each task, because we fragment our attention.
- Losing sight of contextual elements, because we use up more resources of our working memory, which is limited.
Concretely, this means we might miss part of a conversation we're listening to on the phone, forget to salt the pasta, or absentmindedly add the laundry detergent twice.
In short, the output is worse and the effort is greater too; there's therefore no real advantage to doing multiple tasks at once, other than the illusion of being able to "do it all."
What being productive really means
So, to be more productive, should we train ourselves to switch context more easily? That's certainly one possible path, but perhaps not the most desirable one. What we really want is to be truly present in what we're doing, without distractions, so we can do it faster and do it better.
The ideal state, then, is that of the flow experience, a mental state of complete absorption in the task being carried out. The characteristics of this flow, theorized by psychologist Csíkszentmihályi, are:
- Complete concentration on the task, unaffected by external factors.
- A sense of control over what one is doing, which must be perceived as neither too difficult nor too easy.
- A distortion of time perception, which seems to pass much more slowly or much more quickly.
- A loss of self-consciousness: one is so absorbed as to pay attention to nothing but the task.
Achieving this state requires certain conditions that aren't always applicable at work, such as: an appropriate level of task difficulty, and the perception that what one is doing has value and produces an immediate effect.
The real-world context, then, doesn't always work in our favor when we're trying to increase productivity. There are, however, some measures we can adopt to boost our own productivity.
A few tips on how to be productive
In a context that doesn't help us, how can we still produce at our best? Some measures we can adopt are:
Make a to-do list. A to-do list helps us visualize the tasks we want to complete and prioritize them. Having them written down in black and white keeps us from constantly spending energy trying to remember what we need to do, especially when we move from one task to another.
Reduce distractions. When you're in focus mode, isolate yourself physically and mentally from colleagues, clients, and other potential sources of distraction. Where necessary, let the people around you know too, so they only grab your attention when it's truly essential. Don't check messages as soon as they arrive, especially if you get a lot of them — quite the opposite: turn off notifications and instead set a reminder to check them once an hour.
Group similar tasks together. Do you need to work on three different elements of the same section? Do all the tasks in sequence, so you don't have to switch context each time. This works especially well if you're working with an AI assistant: it's also more efficient for the AI to keep the same context, sparing you from having to re-explain which section you're talking about or what the current situation is.
Limit work in progress. Having lots of tasks in WIP isn't something to boast about — it's an attack on your ability to focus. Here too, even though it may feel like you're "doing a lot," in reality you end up not finishing any of it.
How to reconcile AI use with attention
Today, many developers delegate part of their work to artificial intelligence. Tools like Claude Code make it possible to generate code, analyze files, or refactor entire portions of a project in just a few minutes. But there's a side effect: waiting.
While the AI is working, an ambiguous space opens up, in which we're not actively writing code, but we also haven't finished the task. The temptation is to do something else in the meantime: check email, start a new task, reply to messages.
We've seen, however, that this comes at a cost, since it requires a context switch: once the AI has finished its work, we have to go back into that context to review it, and once again understand what we were doing and why.
To avoid the switch cost, it helps to follow one simple rule: don't start anything that requires building a new mental context. Concretely, there are three things we can do in the meantime:
- Keep working within the same context. This can mean preparing the next prompt or defining what the next step will be. This way, the logical thread is kept intact.
- Dedicate ourselves to a low-cognitive-load activity. These are activities like renaming variables, cleaning up code, adding comments, testing interface details — things that don't require fully shifting our attention.
- Take a break. This is often an underrated option, and obviously it's not feasible after every single task, but every once in a while, taking a moment to stop helps you work better.
What should be avoided, on the other hand, are activities that require making decisions or opening up entire conversations. Even though they may seem like they'll only take a few minutes, these tend to expand and take up more time and attention than expected.
And how do you manage context switching at work? Tell us your tricks and let us know if our tips helped you.







