HN.zip

Ask HN: 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?

45 points by kilroy123 - 52 comments

52 Comments

marmarama [3 hidden]5 mins 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.

ASalazarMX [3 hidden]5 mins ago
Getting in the flow means continuous, deep concentration and attention, at least in my experience. Prompting and checking is more like managing an underling, I couldn't get in the flow that way. It would be like a driver trying to get in the flow with a vehicle that randomly does unexpected things.
chipsrafferty [3 hidden]5 mins 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.
kot-behemoth [3 hidden]5 mins ago
I recently found llm-buddy (https://github.com/ahyatt/llm-buddy) which might be a good fit.

Llm-buddy is an “Emacs package that watches your recent buffer edits and asks an LLM to review them. When it finds something worth pointing out, it can add a short inline note in the relevant buffer or show a message in a popup buffer (it usually does the former).

The goal is lightweight feedback while you work: typos, logic mistakes, questionable edits, or prose issues that a normal compiler, linter, or spell checker may not catch.”

wjnc [3 hidden]5 mins ago
This is a UI/UX problem, no? While the current suppliers are mostly locked in the ‘chat for everything’ mode. Guess what, we didn’t go to the moon in chat mode, we don’t drive cars via chat and cyborgs don’t play chess that way. Domain specific interfaces are the way to go (opinion).
munk-a [3 hidden]5 mins 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.
jlos [3 hidden]5 mins ago
*You dont*

Skill issue, not a universal problem.

afavour [3 hidden]5 mins 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.

throwawa14223 [3 hidden]5 mins ago
Never, has made my programming joyless and boring. If it wasn't a requirement to keep my job I'd never touch it.
bad_username [3 hidden]5 mins 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.

nonethewiser [3 hidden]5 mins 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.

jlos [3 hidden]5 mins 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.

rbartelme [3 hidden]5 mins ago
Yeah, I definitely do something similar with my personal projects.

I come from more of a hardware & environmental engineering background and we were always taught that projects were iteratively built via Design, Build, Test, Learn cycles.

I drive the Design and basic skeleton of the build (pseudocode or boilerplate), then pass off the rest of the Build and Test to the agent. I pick up after the test and read the agent commits/notes, then write up next steps. Repeat DBTL. Maybe spin a few features out at a time in parallel depending on how much time I want to devote to reviewing new project features later in the day.

vova_hn2 [3 hidden]5 mins ago
Do not wait for replies, try to structure your workflow so that you are always either refining requirements for the future tasks that you are going to to give to the agent later or reviewing (sometimes also manually testing) the code that the agent has produced before.

I think that this is mostly a UI problem. Chat UI is just not a good UI for programming and the fact that the current "AI"-coding sphere has converged on it is incredibly silly.

One of of the first things that I did when I first seriously tried an LLM-based coding agent is making an ad-hoc task manager on skills and simple daemons.

So that I can interact with it using files instead of this stupid workflow of typing a prompt into the console and then just doing nothing while waiting for the response.

There is absolutely no reason not to do it asynchronously.

bluGill [3 hidden]5 mins ago
As a Staff level engineer, a large part of my job is taking interruptions from others. I also do a lot of code reviews, design meetings and the like. Which is to say I have only rarely been in the flow anyway. I just more/better code written these days just because the AI can be in the flow while I'm answer those things. However I have even more code to review because the AI needs constant "this is a bad design" prompts.
aaarrm [3 hidden]5 mins 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

embedding-shape [3 hidden]5 mins 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.

munk-a [3 hidden]5 mins 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.
kranner [3 hidden]5 mins 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

kilroy123 [3 hidden]5 mins ago
Interesting. I still don't get what that means. Ironically, he suggests you just watch his YouTube.
andrei_says_ [3 hidden]5 mins 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.

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

nzoschke [3 hidden]5 mins 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

igorzij [3 hidden]5 mins 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

igorzij [3 hidden]5 mins 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
junior44660 [3 hidden]5 mins ago
Instead of context switching to a different worktree, contemplate on next steps of the same problem. This keeps you in the loop.

I can not fathom context switching between multiple worktrees so that the PM can make JIRA graph look better.

SCUSKU [3 hidden]5 mins 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...
rushabh [3 hidden]5 mins 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.
nonethewiser [3 hidden]5 mins 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.
Alonski [3 hidden]5 mins 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.
jonnyasmar [3 hidden]5 mins ago
Since I built my own dev tool to allow me to better organize and manage multiple sessions, I've found my flow state hits when I've got agents staggering to completion. Conversation with one, wrap it up, send my response, and another one finishes. I currently have 49 agent sessions open in atrium and when I'm grinding, 5-15 are going at a time. If I get em all onto longer horizon tasks, I start to comb through other sessions to pick up parked conversations.
ducttape12 [3 hidden]5 mins 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 :)
erelong [3 hidden]5 mins ago
try more difficult tasks
fnoef [3 hidden]5 mins 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.
airstrike [3 hidden]5 mins 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.

munk-a [3 hidden]5 mins 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).
thatxliner [3 hidden]5 mins 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
ChrisArchitect [3 hidden]5 mins ago
Related:

Ask HN: Do you struggle with flow state when using AI assisted coding tools?

https://news.ycombinator.com/item?id=44811457

spion [3 hidden]5 mins 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

kilroy123 [3 hidden]5 mins ago
I tried, but I just found it not smart enough. I do love how fast it is though.
giorgioz [3 hidden]5 mins 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.
rglullis [3 hidden]5 mins ago
This is multi-tasking and the opposite of "deep focus".
johnfn [3 hidden]5 mins ago
It's interesting that the guy providing an actual answer gets downvoted, and everyone saying "it's impossible" got upvoted.
meetingthrower [3 hidden]5 mins ago
Welcome to management!!!
dainiusse [3 hidden]5 mins ago
lol, it is funny,but sadly is partly true...
mrweasel [3 hidden]5 mins 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.
munk-a [3 hidden]5 mins ago
That's likely the optimal approach but I think a lot of employers are mandating usage amounts especially with the PE firms making deals for user committal in exchange for cash from Anthropic and folks.
ballooney [3 hidden]5 mins ago
Do something better with your life. Honestly, not /s. Your brain is trying to tell you something.
embedding-shape [3 hidden]5 mins 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?