Guide

Coding with ADHD: making AI agents work for your brain

Coding with ADHD: making AI agents work for your brain

If you code with ADHD, you already know the shape of the problem: the work isn't the hard part — starting is. So is staying on one thread when a tab, a Slack ping, or your own brain yanks you somewhere else. So is the stretch of boredom between "I ran the thing" and "the thing finished," which is precisely where attention leaks out and the session quietly ends.

AI coding agents change that loop in ways that happen to line up with how ADHD brains work — and in a couple of ways that can make things worse if you're not deliberate. This is an honest look at both, plus a setup that works with your attention instead of against it. (Standard caveat up front: this is about workflow, not medicine. Tools help; they're not a substitute for treatment, and what follows is one developer's pattern, not advice from a clinician.)

The task-initiation wall

The blank cursor is an ADHD boss fight. The task is clear in your head, but the activation energy to type the first line is enormous, and the longer you stall the worse the wall gets. An agent lowers that wall dramatically, because the first move isn't writing code — it's describing what you want. "Add input validation to the signup form and write tests for it" is a sentence you can say even on a low-executive-function day. The agent turns that sentence into a running start, and a diff to react to is infinitely easier to engage with than a blank file.

That's also the core idea behind vibe coding: describe intent, react to results. For an ADHD brain, "react to something concrete" is a far more reliable mode than "generate something from nothing."

Context-switching and the working-memory leak

ADHD working memory is leaky. You go to check one function, see something else, follow it, and twenty minutes later you've lost the original thread entirely. The agent helps here because it holds the thread for you. The plan, the files in play, what's been changed and why — that lives in the session, not only in your head. When you come back from a tangent (and you will), the context is still on screen instead of evaporated.

A plan-then-build rhythm makes this even stronger: you get the plan written down before any code happens, so the structure survives your attention wandering off and back. The externalized plan is the working memory you don't have.

The waiting trap — where ADHD sessions die

Here's the dangerous part. The agent runs for a few minutes on its own, and those few minutes are an eternity for an ADHD brain with nothing to do. You alt-tab "just to check something," and that's the ballgame — you're on YouTube, the agent finished ten minutes ago, and the momentum is gone. The waiting is exactly where the workflow falls apart.

The fix is to not rely on yourself to remember to check. Set the agent up so it comes and gets you — a chime and a flash when it finishes or needs a decision — instead of demanding you hold vigil over a terminal. That single change, moving from "watch and wait" to "get pinged," is the difference between finishing and drifting. It's the whole point of not babysitting your agent, and it matters triple if your attention won't sit still.

Hyperfocus, the double-edged sword

ADHD hyperfocus is real and it's a superpower — until it points at the wrong thing. The risk with agents is over-steering: hyperfocusing on micromanaging the agent, or rabbit-holing on a tiny detail while the actual goal drifts. Two guardrails help. First, write the goal down where you can see it (the plan), so hyperfocus has a rail to run on. Second, let the agent take the well-scoped, boring parts so your intense focus is spent on the decisions that need a human — not on watching it type.

Turning dead time into progress

ADHD brains crave stimulation, which is why pure waiting is intolerable. The trick isn't to force yourself to sit still through the agent's run — it's to fill the wait with something engaging while the agent works, and let the ping pull you back. For some people that's a second task; for some it's literally a game. That's not a joke: using a game's downtime to run an agent (and getting yanked back by a notification) is a genuinely effective pattern for brains that need the dopamine to stay in the chair — see code while you play.

A setup that works with your attention

Concretely, here's a loop that holds up on a scattered day:

If you tend to start three things at once anyway, lean into it deliberately: run a few agents in parallel, one per task, and let the notifications tell you which one needs you. Channeled, that scatter becomes throughput.

The honest caveats

None of this is a fix for ADHD, and it can backfire. Auto-accepting everything while you're checked out can ship changes you didn't really review — keep approvals on the genuinely risky stuff. The dopamine of "fire off ten tasks" can become its own avoidance. And an agent that holds context for you can, over time, mean you hold less of it yourself. Use it as a scaffold for the parts that are hard, not a replacement for understanding your own codebase.

Where Backgrind fits

Backgrind is built around exactly this loop. It runs your agent — Claude Code, Cursor, or hosted Grindy — in an always-on-top overlay that stays visible over whatever you're doing, and it comes to you: a flash and a chime when the agent finishes or needs a yes/no, and quiet otherwise, so you're never relying on yourself to remember to check a terminal. Fire off a task by voice, let it work while you do something that holds your attention, run several at once in tabs, and approve the one decision that matters when the ping pulls you back. Built for brains that don't sit still. See it in the live demo.