How do you get into a flow state when using AI to code?
Before agentic coding, I always prided myself on how long I could work in a flow state. I was really good at working deeply.
Now, with slow agents like Claude, I find myself no longer working deeply.
What are you all doing to stay focused?
Here's the neat thing: you don't.
I've tried, and I feel like I've got closer with faster models, but ultimately the agentic loop excludes you. Even if you're asking the agent to do simple short tasks, it's still: prompt, wait, wait, wait, check, and you never really feel like you're the one in control.
The problem with faster models is also that they're more stupid, so that additionally breaks your flow when you have to fix something dumb it's done.
LLM-powered autocomplete is a bit more like it, but that tends to be either so dumb as to be a net negative, or slow enough to be useless. And autocomplete is pretty distracting for me.
I feel like I'm missing a mode that works more like a pair programmer. Perhaps a multimodal model that can talk to you about what you're writing, as you write it, and offer suggestions rather than trying to take over and do everything for you.
(1) Spending time building a plan. I have lots of artifacts like diagrams, tables, web pages that help me think through all the details quickly. Get code snippets to reduce uncertainty, get options for architectural decisions, flesh out assumptions.
Main thing is (1) how do I verify the agent hits the happy path and (2) how can I elicit and clarify assumptions it might make.
Then follow up the build with exploring and refactoring.
(2) prioritized context switching (like playing an RTS)
I have several tasks going at once, while one works I hop onto other tasks.
I usually have one or two “core” goals I’m trying to accomplish that take deeper thinking and get priority. The other tasks are smaller and require less thinking.
A lot of times I’ll have the secondary agents build research docs I can review in detail later.
Short answer is I don’t and it adversely affects my job satisfaction.
I’m quite sure I’ve left money on the table over the years as a result of my reluctance to manage and mentor junior developers. Disappointing that I’ve ended up managing junior AI developers who won’t even grow as a result of the time I’m putting into them.
Never, has made my programming joyless and boring. If it wasn't a requirement to keep my job I'd never touch it.
I use "comment-driven development" by building out the skeleton manually, writing comments instead of code, and letting the agent fill the code in (and then repeat, until done). It is a "lower level" of AI usage, compared say to full-vibe mode, spec-driven development, whatever. But I feel that it's even easier to stay in the flow, because I do not get bored by boilerplate or mundane implementation details.
"Higher levels" of AI usage are exhausting and flow-free endeavours.
I think if you find that your coding style is disrupting your productivity or job satisfaction then you're misapplying the tool to your particular working style. We're all different in how we approach problems and tools should support our preferred approach (assuming that approach isn't unacceptable from a working performance perspective which, to defeat your imposter syndrome, I absolutely guarantee you isn't the case if your performance hasn't majorly shifted since the introduction of AI).
I don’t, nor I want to. If I’m forced to train my replacement by using these tools, I might as well enjoy the time it takes the agent to do work by doing something I like and enjoy in the meantime.
Flow state relies on a constant information inflow that holds your attention perfectly, often hinging on competency and challenge. You can't enter it in AI coding because you need to wait for replies. It's incompatible.
I just watch YouTube in the downtime these days, or movies that I don't care too much about
im finding it way way more "flowy" than pre-ai. all the boring trivia is gone, i can focus on what i actually care about - the shape of what i am building, tradeoffs, second- and third-order consequences of decisions.
the trick to get it uninterrupted is "selective multitasking". i don't like having too many Claudes / Codexes in parallel on auto-pilot; this way im finding i'm getting _something_ that is perfectly plausible, but rarely what i wanted. but I have N going at any given time, just enough to be basically non-stop reading. problems need to be related; within one project, ideally adjacent areas that are complementary. then my "flow" is just switching between reading and typing non-stop. never felt time flying by faster in my life, pure flow
For me the flow state has always come from a sensation of creative juices spawning ideas, a vision for an end result, and the deep focus that ensues in working towards that.
Such a cycle previously could take hours or days, resulting in long, deep flow states. But now I go through dozens such cycles a day.
So less of a single flow state, more so many short flow states. As for waiting, that’s when you can explore another idea in parallel. Double the flow states for me :)
I just work on multiple projects at the same time. This way, the time it takes for one prompt to complete does not disturb my productivity
For working on a single project, I have a text document open where I’m working on future prompts. For working on tasks in a team setting, with prs and reviews, i built a tui that manages multiple tmux sessions. It creates a worktree for each task. It has status indicators for each session, hotkeys to quickly cycle through them, hotkeys to pull, annotate and paste pr comments, pull, annotate and paste linear tasks and comments, hotkeys to launch external tools and to jump directly to the pr url, and any time there’s a period when all the dots are busy i just start a new task. It’s a bit manic, but it’s manageable because it’s all in one terminal window. It’s also for AI as it existed 3 months ago, work slowed down and i haven’t tried to apply loops or whatever the latest crazy thing is.
I try and make very small and deterministic steps. I do the planning (in flow state) and let the model to the execution. When the model is executing, I follow the "thinking" and keep seeing the diff like I would when I was coding.
I reach the same flow state by multitasking across multiple tasks in multiple repos. I can hold my own context across 5-10 different terminal tabs each running their own Claude code or pi. Watching Claude especially with sub agents is like watching paint dry.
I do 3-4 things at the same time, and in between waiting periods, keep pushing on something else.
It's more taxing because I'm switching problems but at least these are all libraries within the same ecosystem so eventually, they line up.
I've half-joked a few times that ADHD with hyperfocus is a perk in this agentic coding era.
I have this problem too. The only thing that has 10x'd is my boss's expectations and the number of draft PRs I have open...
I have turned to projects that aren't rooted in software.
I still work on software, but that now means queuing up a bunch of tasks upfront for the LLMs to burn through and then let it ride, enabling my flow state focus to exist elsewhere in parallel.
Use composer 2.5 fast in cursor (or cursor cli).
YMMW but I find it fast enough to maintain focus on one task (if that's what you're going for given a particular problem
Read the blog posts from Peter Steinberget blog steipete.me about his setup.
Many AI builders converged on using the terminal with multiple panes.
When a prompt is running if you don't have anything to do add another pane and start another prompt. Little by little you might have 1-6 prompts in parallel at some point. The flow state with AI is managing productively several prompts in parallel.
Could you not just, you know, not use Claude? Or if you must, delegate some tasks to the agent and go work on something yourself, the agent doesn't mind waiting for you to get back.
Do something better with your life. Honestly, not /s. Your brain is trying to tell you something.