Developer context switching: causes, costs, fixes

Developer context switching costs more than the minutes it takes. See what studies measured, what triggers it, and how complete bug reports cut interruptions.

Three clear glass cubes stack on one of two dark parallel rails, joined by an orange glass arc.

Developer context switching is what happens when an engineer leaves one task before it is finished and starts another. The cost is not the switch itself. It is the time spent rebuilding what the developer was holding in their head. Some of the worst switches come from something your team controls: a bug report that arrives without enough information.

Each missing detail triggers a question, and each question pulls someone away from what they were doing. Notarus attaches an annotated screenshot, a session replay, console and network logs and browser details to every report, so the questions never need to be asked.

This guide covers what the research measured, what triggers switches, how to reduce them across a team, and how to make the bug report stop being a source of them.

What context switching means for developers

Context switching means stopping one task and starting another before the first is done. A developer moves from a feature branch to a pull request review, from a review to a support question, or from a support question to a production alert. Each time, they unload one mental model (the code structure, the planned approach, the open questions) and load another.

Multitasking is a close cousin but not the same thing. Multitasking means trying to do two things at once. Context switching is sequential: you do one, leave it, then do the other. Teams usually feel the second one. Nobody writes code and answers a customer simultaneously, but many people do both within the same hour.

Not every switch costs the same. Moving between closely related work, such as reviewing a change in code you wrote yesterday, is cheap. Moving between unrelated domains, such as CSS to database tuning, is expensive. A switch is also costlier when you leave in the middle of something hard.

What the studies measured

Researchers have watched developers work for years. The numbers below come from academic studies, and they agree on the shape of the problem even where the exact figures differ.

How often developers switch

In an observational study published in 2019, Meyer, Murphy, Fritz and Zimmermann found that developers switched tasks 13 times an hour on average and spent about 6 minutes on a task before switching. In activities such as writing code or running tests, they usually stayed only 20 seconds to 2 minutes before switching to another one (Springer). The same chapter notes that the harm of a switch depends on its duration, its reason and how focused the developer was on the interrupted task.

An earlier study of collocated teams measured a task switch roughly every 5 minutes. Interruptions came from face-to-face conversation, instant messages and phone calls, and from notifications such as email and bug-database alerts (Ko, DeLine and Venolia, ICSE 2007).

What a switch costs

In the 2024 lab study “Breaking the Flow”, on-screen interruptions from a more dominant requester significantly increased the time participants spent on code comprehension (Ma, Huang and Leach, ICSE 2024).

Parnin and Rugaber analyzed 10,000 recorded sessions from 86 programmers. Only 10% of sessions resumed programming in under a minute after an interruption, and only 7% involved no navigation to other places in the code before the first edit (Parnin and Rugaber). Resuming is slow, and it is slow almost every time.

A 2018 survey of developers adds the developer’s own view: 28% said task switching is time-consuming, one respondent estimated 5 to 20 minutes to get back into flow after each switch, and 36% reported lower performance from losing focus (Shakeri Hossein Abad et al.). In a 2017 study, 20 of 25 surveyed participants (80%) agreed that context switching hurt their productivity (Shakeri Hossein Abad, Ruhe and Bauer).

Some tasks never come back

In a preliminary analysis of 44,515 recorded tasks from 23 developers, 29% of interrupted or switched tasks were never resumed (Task Interruption in Software Development Projects). The paper’s main study, of 4,910 tasks from 17 developers, found that self-interruptions, where the developer chooses to switch, were more disruptive than external ones, contrary to what most survey respondents believed.

Switching between projects has a measurable effect too. A study of GitHub developers found that those who worked on many projects were more productive when they focused on a few projects per day, while those who switched projects too often in a day had lower overall productivity (ICSE 2016 FOCUS).

What makes developers switch

The causes fall into two groups: ones the developer triggers and ones other people trigger.

Self-triggered. In the study of 132 developers, the leading reasons for interrupting oneself were these (Task Interruption in Software Development Projects):

ReasonShare of respondents
Blocked on the current task30%
Getting sidetracked23%
Planning issues and priority changes19%
Needing more information or technical knowledge16%
Boredom with complex or lengthy tasks12%

Externally triggered. Messages, meetings, review requests and alerts. The 2007 study listed blocks that came from waiting on builds and tests, waiting on email replies, waiting on other teams’ changes, and missing knowledge (Ko et al.). In the 2018 survey, 45% of respondents said switching to a daily team meeting hurt their primary task after they resumed, while 23% said meetings helped because they supplied team context and priorities (Shakeri Hossein Abad et al.). Meetings are not the enemy. Unplanned ones at bad moments are.

Two of these causes belong to bug handling. “Needing more information” and “blocked” are exactly what a developer experiences when a report says “the checkout is broken” and nothing else.

The bug report is a hidden source of switches

A developer picks up a ticket. The description is vague. They ask the reporter which browser, which page, what they clicked. The reporter answers hours later. Meanwhile the developer has started something else. When the answer arrives, they switch back, reload the context of the bug, and find they still need one more detail.

This is not an edge case. A Microsoft Research study of Windows Vista bug reports found a typical report was reassigned a median of 2 times before resolution, with poor report quality among the five main causes. As one respondent put it, a report that cites only basic symptoms and no hints about cause, such as a call stack, is hard to triage and can get “bounced around” (Guo et al., CSCW 2011). Another study of what makes a good bug report found incomplete information was by far the most common problem developers met, and one developer put it plainly: the biggest delays come from absent information, not wrong information (Bettenburg et al., FSE 2008).

Every clarification exchange is at least two context switches: one when the developer stops to ask, and one when the reply pulls them back. If your team handles dozens of reports a month, that adds up quickly. You can read more about the underlying idea in our explainer on bug reproduction, the step that usually stalls first.

What a complete report contains

A developer can reproduce a bug without asking anyone when the report already holds:

  1. The environment. Browser, version, operating system, screen size and the URL.
  2. The steps. What the user did, in order, starting from a known state.
  3. Expected and actual results. What should have happened and what did.
  4. Evidence. A screenshot with the problem marked, plus console errors and failed network requests.
  5. Severity and priority, kept separate. How bad the bug is and how soon it should be fixed are different decisions. Our guide to bug severity vs priority explains the split.

The trouble is that the people who find bugs are usually customers, colleagues in sales or support, or clients. They do not know what a console log is. Asking them to write all five items by hand produces the short, vague reports that start the clarification loop. The report has to collect most of this itself. Our guide to website bug reporting walks through a reporting channel built that way.

Reduce the switches your team controls

Before touching tooling, fix the habits. These measures target the self-triggered and meeting-driven switches.

Protect focus time

One engineering team’s case study describes two daily two-hour focus blocks with notifications off and no meetings scheduled, with production incidents as the only exception. After a year of focus blocks combined with batched communication, meeting-free days and WIP limits, it reported uninterrupted focus rising from 3.2 to 5.1 hours a day and daily interruptions falling from 14.3 to 6.8 (Harbor Software). That is one team’s self-reported result, but the mechanism is sound: fewer open channels, fewer switches.

The 2019 Springer chapter suggests a lighter version: show a developer’s current focus state to the team so expensive interruptions can wait, and aim your effort at co-worker interruptions at inopportune moments, among the most often mentioned causes of costly switches (Meyer et al.).

Limit work in progress

Starting a new item before finishing the current one is a self-interruption. A common rule is one or two active items per developer, and one pull request at a time for reviewers (GitScrum best practices, 2026). Keep a queue separate from active work, and triage new requests against what is already in progress instead of adding them automatically.

Batch the interruptions that must happen

Review requests, support questions and bug triage do not need an instant answer. Pick fixed windows for them. A developer who reviews pull requests at 11:00 and 16:00 pays two switches a day, not twelve.

Leave a resume note

When you must switch, spend a minute writing where you stopped, what you planned next and what is blocking you. Research on attention residue, the lingering thinking about an unfinished task, found that a “ready-to-resume plan” reduced the residue and protected performance on the interrupting task (Leroy and Glomb, Organization Science, 2018). Given that only 10% of sessions in the Parnin and Rugaber data resumed editing within a minute, a two-line note in the code or ticket is cheap insurance.

Stop bug reports from causing switches

Habits only handle part of the problem. The remaining switches come from outside the engineering team: users, support agents and product managers filing reports. This is where the report itself has to do the work.

Notarus is a website feedback and bug-tracking tool built around this idea. When someone reports a problem through the widget, the report arrives with:

  • an annotated screenshot, so the reporter points at the exact element instead of describing it;
  • a session replay, so the developer sees the steps that led to the bug;
  • console and network logs, so the error is already captured;
  • browser and environment context, so “works on my machine” is settled before anyone asks.

These developer details are available on the free plan. A developer opens the ticket and starts diagnosing. No question goes back to the reporter, and nobody has to remember to answer one.

A few details matter for teams that worry about the cost of adding a tool. The widget isolates its styles from the host page, so it does not break your layout. Reporters can follow progress and read your team’s replies through a reporter portal link without creating an account, which means follow-up happens in the ticket instead of in a chat thread that interrupts someone. Tickets move through a workflow board, and an MCP server is available for managing reports.

Who benefits on your team

  • Developers get reproducible tickets and spend less time on back-and-forth.
  • Support teams stop writing “please send a screenshot and your browser version” and can pass reports on as they arrive. See how a feedback widget fills in the report for the user.
  • Product managers see which issues recur and can prioritize without asking engineering for details.
  • Website owners get reports from non-technical visitors that are still technically complete.

Getting started with Notarus

If clarification threads are eating your team’s focus, the quickest test is to put the widget on your site and see how many reports you can act on without a single follow-up question. The Free plan costs nothing and includes the developer details described above. Pro is $19 per month or $190 per year, and Scale is $99 per month or $990 per year. See the pricing page for what each plan includes.

If you are comparing options first, our overview of website feedback tools and what each one attaches lays out the differences by report content.

A weekly routine to cut switching

Put the pieces together in a routine your team can adopt in a week:

  1. Monday: set one or two focus blocks per developer and agree which channels are muted during them.
  2. Set WIP limits: one or two active items per developer, one open review per reviewer.
  3. Schedule triage: a fixed daily window for new bug reports, handled by one rotating person so the rest stay out of the queue.
  4. Require evidence: route every report through a form or widget that captures screenshot, logs and environment automatically.
  5. End each day with a resume note on every open task.
  6. Review after a month: count interruptions and reassigned tickets, and adjust.

The cheapest switch is the one that never happens. Complete reports remove many of them before they start, and the others become something the team schedules instead of absorbs. For a related failure pattern, read about the regression bug, which often arrives as exactly the vague, urgent report that breaks someone’s afternoon.

Sources

Common questions

How long does it take a developer to recover from a context switch?

It depends on the task and the interruption. In 10,000 recorded sessions, only 10% resumed programming within a minute of an interruption (Parnin and Rugaber). In a developer survey, 28% called task switching time-consuming, and one respondent estimated 5 to 20 minutes to get back into flow (Shakeri Hossein Abad et al.). Treat these as ranges, not fixed costs.

What is the difference between context switching and multitasking?

Context switching is leaving one task unfinished to start another. Multitasking is trying to work on several tasks at the same moment. In development, the first is far more common: a developer rarely does two things at once but often changes tasks several times an hour.

Are all interruptions harmful?

No. In the 2018 survey, 23% of developers said switching to a daily team meeting helped, because it gave them team context and priorities (Shakeri Hossein Abad et al.). The harm grows with the interruption's duration, its reason and how focused the developer was (Meyer et al.). Plan the useful ones, and remove the avoidable ones.

How do bug reports cause context switching?

An incomplete report forces the developer to stop, ask the reporter for details and wait. The reply then interrupts whatever they moved on to. Studies of bug reports find that missing information is the most common problem (Bettenburg et al.) and that poor reports get reassigned and bounced around (Guo et al.). Reports that arrive with a screenshot, replay, logs and environment details remove most of those questions.

What is a good work-in-progress limit for developers?

A common guideline is one or two active items per developer and one pull request at a time for reviewers (GitScrum). Start there and adjust based on how often work stalls.

The Notarus team

The people who build Notarus. We write up the decisions behind the product when the reasoning is worth more than the changelog line.

Keep reading

Reports with the evidence attached.

Start free, one script tag.

<script src="…/widget.js" data-key="pb_pub_…">