What to Do While Waiting for AI Code Assistants
Source: Dev.to
AI‑Assisted Coding: Turning Wait Times into Productive Micro‑Breaks
AI coding assistants create a strange new rhythm in development work. You prompt, then wait – thirty seconds, two minutes, sometimes ten. The tool does the work so you don’t have to, but what do you do with yourself in the meantime?
The Two Common Traps
| Trap | What Happens | Why It’s Bad |
|---|---|---|
| Context‑switching | Check Slack, open Twitter, skim an email. | By the time the assistant finishes, you’ve loaded an entirely new mental context and lost the thread of what you were building. |
| Staring at the spinner | Anxiously watch the pending output, getting no recovery at all. | You waste valuable time and increase stress. |
Both approaches squander time that could be used for diffuse thinking – the brain’s unconscious processing that continues during unfocused periods (Baird et al., 2012).
Why AI Waits Are Different
- Uncertain duration – A simple refactor may finish in 30 s; a complex multi‑file edit could take five minutes; an agent task might run for 20 minutes or more.
- Psychology of waiting – Uncertain waits feel significantly longer than known waits (Maister, 1985). A spinner with no ETA triggers anxiety and the impulse to “just quickly check” something else.
Research on attention residue shows even brief self‑interruptions carry real costs. Gloria Mark’s work on workplace interruptions found workers often need >20 minutes to fully return to an interrupted task (Mark et al., 2005).
Solution: Choose activities that
- Don’t load new context into working memory.
- Provide genuine micro‑recovery.
- Can be dropped instantly without loss.
- Match the uncertainty, not the actual wait length.
Physical Micro‑Breaks (Best for Any Wait Length)
| Activity | Why It Works | Approx. Time |
|---|---|---|
| 20‑20‑20 rule – look 20 ft away for 20 s | Relaxes eye muscles; combats screen‑induced eye strain. | 20 s |
| Posture check – roll shoulders back, unclench jaw | Releases accumulated tension. | 5 s |
| Stand & stretch – hip‑flexor stretch, neck roll | Breaks sedentary posture; no mental load. | 30 s |
| Hydration – grab a glass of water | Even mild dehydration impairs cognition (Ganio et al., 2011). | 10 s |
| Three deep breaths – slow breathing activates parasympathetic system | Shifts from stress to rest‑and‑digest. | 15 s |
Research: Henning et al. (1997) found brief, frequent breaks with light stretching improve comfort and productivity.
Light‑Mental Activities (Ideal for 1–5 min Waits)
- Re‑read your prompt – Reinforces what you asked the assistant to do; primes you for critical evaluation of the output.
- Scan surrounding code – Glance at functions above/below the current file; refreshes context without new mental models.
- Draft your next instruction – Write or mentally formulate the follow‑up query; can be abandoned instantly when the current output arrives.
- Review recent changes – Scroll through
git diffor recent edits; catch issues while the logic is fresh. - Mental walkthrough – Visualize the expected behavior of the pending change; keeps you engaged without external input.
- Sketch test scenarios – Jot quick notes: “handle empty input”, “fail gracefully if API down”, “edge case: user has no permissions”. AI can later turn these into real tests.
Working‑memory insight: Cowan (2010) shows we hold roughly four items in working memory. Activities that reuse the same slots (e.g., reviewing your own prompt) don’t compete with the primary task, whereas loading a new context (e.g., reading a Slack thread) creates interference.
Anti‑pattern: Reviewing someone else’s PR during an AI wait loads an entirely different codebase context. Save code reviews for dedicated blocks.
When No Activity Is Best
Sometimes the most productive thing is nothing at all. The brain continues processing problems during idle periods (incubation). Baird et al. (2012) demonstrated that participants who took a short break often solved creative problems more quickly afterward.
Quick Reference Checklist
- ☐ Physical: 20‑20‑20, posture check, stand‑stretch, hydrate, deep breaths.
- ☐ Mental (1–5 min): Re‑read prompt, scan nearby code, draft next instruction, review recent changes, mental walkthrough, sketch test scenarios.
- ☐ Avoid: New context switches (Slack, Twitter, unrelated PRs).
- ☐ Remember: Match activity to uncertainty, not to the exact wait length.
References
- Baird, B., et al. (2012). Incubation in creative problem solving. Creativity Research Journal.
- Cowan, N. (2010). The magical number 4 in short‑term memory. Trends in Cognitive Sciences.
- Ganio, M. S., et al. (2011). Evidence‑based approach to fluid intake. Journal of Athletic Training.
- Henning, R. A., et al. (1997). Microbreaks and productivity. Human Factors.
- Maister, D. H. (1985). The psychology of waiting. Harvard Business Review.
- Mark, G., et al. (2005). The cost of interrupted work. Proceedings of the SIGCHI Conference on Human Factors in Computing Systems.
Using Wait Times Effectively
Why “Undemanding” Tasks Matter
- Breaks with undemanding activities (e.g., a quick stretch) lead to noticeable performance gains compared with continuing work or doing nothing.
- Undemanding ≠ scrolling social media – the latter still demands attention and prevents recovery.
Techniques That Enable Diffuse Thinking
| Technique | How to Do It | Why It Helps |
|---|---|---|
| Window gazing | Look outside; let your eyes rest on distant objects. | Allows the mind to wander back to the problem without forcing it. |
| Walk to the kitchen | Get coffee or water without checking your phone. | Physical movement + environmental change gives the default‑mode network room to work. |
| Doodle or fidget | Engage in mindless hand movement. | Occupies the anxiety‑generating part of the brain, especially useful for longer waits. |
| Close your eyes briefly | 30‑60 seconds of nothing (not meditation). | Temporary disengagement refreshes mental energy, especially when fatigued. |
| Sanity‑check assumptions | Ask yourself: • What assumption could be wrong? • What would a simpler version look? • What breaks if this scales 10×? | Quiet metacognition catches issues before you over‑trust generated code. |
| “Shower insight” in micro‑doses | When a long task runs, let go mentally and trust your brain to keep working. | Breakthroughs often surface during unfocused moments. |
Housekeeping Tasks Perfect for Unpredictable Waits
| Activity | Why It Fits |
|---|---|
| Update notes or to‑do list | Externalizes fresh thoughts without adding new context. |
| Log time worked | Takes seconds; tools like Super Productivity make it frictionless. |
| Note a blocker or question | Capture it now; you’ll address it later. |
| Clear one notification | Respond to a single Slack DM, then stop. Set a hard boundary to avoid cascade. |
| Bookmark for later | Save an article or library link without reading it (reading = new context). |
Rule: If the activity requires reading or absorbing new information, it’s not a wait‑time activity. You’re organizing, not consuming.
Activities That Sabotage Flow
| Activity | Problem |
|---|---|
| Checking Slack/Teams | “Just a quick glance” triggers thoughts that linger (attention residue). |
| Social media (Twitter, Reddit, HN) | Dopamine spikes make subsequent focused work feel dull. |
| Starting a different task | Leads to two half‑finished tasks; you pay the context‑switch cost twice. |
| Refreshing obsessively | Watching for output doesn’t speed it up; it keeps you in anxious waiting mode. |
| Email replies | Loading others’ context and formulating responses is real work, not a break. |
| “Productive procrastination” | Switching away and back incurs double overhead, beating a single completed task. |
Exception: If the wait is genuinely long (10 + minutes), reconsider whether the AI tool is the right choice. Break the job into smaller chunks (e.g., three 5‑minute steps with checkpoints).
Suggested Activities by Wait Length
| Wait Length | Uncertainty | Best Activities |
|---|---|---|
| 30 sec – 1 min | Low | Posture check, deep breaths, 20‑20‑20 eye rule |
| 1 – 3 min | Medium | Re‑read prompt, scan surrounding code, hydrate |
| 3 – 5 min | Medium | Draft next instruction, mental walkthrough, stretch |
| 5 + min | High | Diffuse thinking, update notes, short walk |
| Unknown / long | High | Set mental checkpoint, then enter diffuse mode |
When uncertain, default to lower‑commitment activities. You can always extend a stretch if the wait continues. You can’t “un‑read” a Slack message.
Context: AI‑Tool Waits vs. Traditional Waits
- Developers have always waited—for compilers, builds, tests, deployments.
- AI‑tool waits are shorter, more frequent, and unpredictable.
- A compile might be a steady 3 minutes; Claude could finish in 30 seconds or take 10 minutes for similar‑looking tasks.
This unpredictability changes the calculus:
- You can’t start a meaningful side task during a 30‑second wait.
- You also can’t just zone out for a wait that might become 5 minutes.
The strategies above are designed for exactly this uncertainty.
Benefits of Mastering Wait Times
- Mental freshness – reduced fatigue, better focus.
- Lower context‑switch cost – fewer fragmented attention spikes.
- Leverage diffuse thinking – let the subconscious continue problem‑solving.
The waits aren’t lost time. They’re a feature you didn’t know you needed.