Ask HN: How do you get into a flow state when using AI to code?
30 points by kilroy123 2 hours ago | 41 comments
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?


marmarama 25 minutes ago
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.

reply
chipsrafferty 8 minutes ago
I want something that works in the background, checking my work as I code, running tests and making suggestions... Without being obstrusive. Like a pair programmer.
reply
munk-a 6 minutes ago
I've found AI code reviews as a first pass on PRs to be quite non-obstructive to my workflow and the AI code reviewer (while not instantaneous) is certainly faster on a response than the human pass will be.
reply
jlos 2 minutes ago
*You dont*

Skill issue, not a universal problem.

reply
afavour 37 minutes ago
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.

reply
nzoschke 2 minutes ago
What has worked for me…

Pair programming. I call it pilot / copilot / autopilot. Two real people plus one or two agents working together. Classic XP stuff, the copilot can help remind what we are focusing on, file follow up issues, give instant code reviews.

Bake offs. Do the same task but in two different chats or agents or approaches (TDD vs vibe or legacy app vs next app).

I don’t do these all the time, and they don’t guarantee ROI, but it keeps me focused on one thing to completion intend of getting distracted

reply
ducttape12 52 seconds ago
You accept that what made this career rewarding (besides money) is gone and pick up a hobby that gets you into flow state. That's why I've picked up drawing again :)
reply
throwawa14223 28 minutes ago
Never, has made my programming joyless and boring. If it wasn't a requirement to keep my job I'd never touch it.
reply
bad_username 17 minutes ago
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.

reply
nonethewiser 11 minutes ago
This sounds good except when you need to cross multiple files. I feel like a significant part of the value of AI is that it can just find things instantly instead of me having to navigate some menu or enter any commands. At least in my experience changing 1 thing requires traversing a large slice.

I guess to take it a step further you could just write everything in a single file with enough context to let the LLM figure out location but this is quite literally just a prompt.

reply
jlos 5 minutes ago
(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.

reply
aaarrm 32 minutes ago
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

reply
embedding-shape 26 minutes ago
> Flow state relies on a constant information inflow

Does that mean when I'm in deep thinking without any external "information inflow" I'm not "in flow state"?

I'd agree that waiting for replies kind of pulls you out of flow if you just sit and wait, but I'm not sure why you'd do that. You can continue working along-side, validate, or continue iterating on the design while the agent does other things.

reply
munk-a 36 seconds ago
When you're deep thinking you have a constant information inflow that's coming from your own thoughts. This is different from relying on an exterior tool because in that scenario your brain is blocked from thinking by relying on that tool giving it a breather to wander off a garden path. That isn't necessarily a bad thing (it's nice to give your brain a stare off into the distance break every once in a while) but if you've adapted your thinking and working style to the constant inflow and outflow of information it can be highly disruptive.
reply
kranner 25 minutes ago
Meditation teacher Michael Taft recommends "dropping into awake awareness" whenever you're waiting for a response. [1]

It's the opposite of watching YouTube, pretty much.

[1] https://x.com/OortCloudAtlas/status/2062208343192769004

reply
kilroy123 20 minutes ago
Interesting. I still don't get what that means. Ironically, he suggests you just watch his YouTube.
reply
andrei_says_ 9 minutes ago
Not sure what the OP or the person in the videos means but a direct, fast way I have found to “drop in” is to stop thinking and intensify my awareness of everything. Takes about 5-10 seconds to transition into a nonthinking timeless presence.

Attention is on the full body, and the field of perception, then field of awareness, all at the same time.

A bit like shavasana practice, but instead of scanning part by part, expand presence to everything.

The thinking analytical mind stops, the nonthinking mind activates and softly intensifies.

reply
jasonjayr 16 minutes ago
There's an XKCD for that, "Compiling" : https://xkcd.com/303/
reply
noworriesnate 13 minutes ago
The difference is your boss isn’t going to fire the middleman so he can talk straight to the compiler
reply
mck- 30 minutes ago
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 :)

reply
igorzij 13 minutes ago
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

reply
igorzij 9 minutes ago
also forgot to mention that 90% of the work (and time) is bouncing markdown files back and forth until the design is clear and I feel happy about it. design docs, working docs, etc. implementing then is where I can engage way less and switch to a different tab in cmux to drive it
reply
fnoef 6 minutes ago
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.
reply
texuf 19 minutes ago
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.
reply
rushabh 17 minutes ago
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.
reply
nonethewiser 10 minutes ago
I never really got into flow state from planning. Too much brain power, dead ends, etc. I reached flow state from the "busy work." Knowing what needed to be built and implementing it.
reply
Alonski 20 minutes ago
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.
reply
munk-a 7 minutes ago
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).
reply
thatxliner 7 minutes ago
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
reply
airstrike 21 minutes ago
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.

reply
SCUSKU 25 minutes ago
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...
reply
win311fwg 23 minutes ago
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.

reply
spion 21 minutes ago
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

reply
kilroy123 19 minutes ago
I tried, but I just found it not smart enough. I do love how fast it is though.
reply
giorgioz 25 minutes ago
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.
reply
rglullis 22 minutes ago
This is multi-tasking and the opposite of "deep focus".
reply
meetingthrower 31 minutes ago
Welcome to management!!!
reply
dainiusse 20 minutes ago
lol, it is funny,but sadly is partly true...
reply
mrweasel 27 minutes ago
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.
reply
ballooney 31 minutes ago
Do something better with your life. Honestly, not /s. Your brain is trying to tell you something.
reply
embedding-shape 24 minutes ago
When I'm running for exercise, my brain is telling me to stop running, would it be better for me long-term to stop running or continue, regardless of what that pesky voice is telling me?
reply
patwalls 2 hours ago
[flagged]
reply
YtMtBt 33 minutes ago
[dead]
reply