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

58 points by rasca ↗ HN
It's been extremely difficult for me to achieve a flow state while using tools like `claude code` because I have to wait after every interaction. I get easily distracted, my mind wonders and I find myself reading HN and browsing the internet.

I'm more productive in most of the tasks I need to do but in some of these detours I loose long periods of times without even noticing. I've tried keeping the console open and reading through the AI agent process but that gets me nervous after a few interactions.

I also don't enjoy it as much. I don't get the feeling of accomplishment after finishing a new feature and everything feels fragmented.

Even using multiple sessions doesn't do the trick for me because I need to change task context every time. Does this happen to anyone else? Any recommendations?

How do you think we can achieve flow state while in this transition period while AI coding still needs constant hand holding and reviews?

32 comments

[ 2.9 ms ] story [ 50.2 ms ] thread
This is not going to fix the problem, but it might help some: install the ntfy.sh app on your phone and then add a Claude hook to curl a notification to ntfy when a command completes. It’s not a perfect solution but it helps avoid distraction to some extent.
No, I'd say they actually help me stay in flow. The autocomplete mode takes care of annoying boilerplate (mostly) and if I'm stuck on something the chat mode can often provide a suggestion that helps me unstuck (even if not usable directly). These two help me keep the state on for longer.

Agent mode just produces dogshit that takes me longer to clean than if I wrote it myself to begin with. I don't use that.

This totally resonates with me. There is zero flow and I just end up in yolo mode pulling that slot machine — “yes and don’t ask again”.
> I get easily distracted, my mind wonders and I find myself reading HN and browsing the internet.

This is a challenge to conquer, irrespective of whether or not you are using ai-assisted code editors or not.

Honestly, I get sooo bored just watching it do all the things.

There's simply no "flow state" when you're not the one doing the work, not the one reasoning.

I have loved almost every minute of my 20+ years as a developer, and the biggest thing agentic coding has achieved is suck the fun out of it.

I am bored for the first time in my career.

Instead of developing, I'm code reviewing. Hard to get into a flow state when claude is the one flowing, not me.
Maybe just me, but I have given up on flow state and my solution is to run 2 or 3 projects concurrently and switch between them. I use virtual desktops. work on one, give an assignment to my AI, switch to the next and cycle through them all day long.
Yes. That's one of the main reasons that I don't use them. They get in my way.
For me, flow state can be achieved through the true multitasking that agentic coding allows. Start an agent on a task, then set up another agent for another task. While one is working, the other usually needs feedback or tweaking. I run Claude Code in yolo mode in a dev container where it can cause little damage, so I’m not wasting my time approving tool calls (or managing an allowlist of tool calls). Sometimes I have 3 agents going at once, but I’ve found that 2 is usually as many as I can manage. I suppose if your project specifications are really dialed in, you could have more than that.
If you're intent on using agents, try having them work by themselves on one feature branch while you work normally on another. It feels like hiring a fast intern...

Highly opinionated: Regarding using agents for a main project or feature, as some do, I don't think there is such a thing as a "flow state." If you adhere to that working strategy, your hypothesis is that the agent is so much faster than you that you can get more done even without a flow state, even if the quality is a little worse, and your job has fundamentally changed from programmer to code reviewer. That will have its own set of skills for you to develop, such as efficiently reading their changes, managing costs and context, writing good prompts, etc.

No, I love it. Finally an end to the endless yak shaving. Yes, I love a good flow state where I can actually get shit done, but being stuck on one only semi-relevant issue that prevents me from moving on, that sucks. And with AI assisted coding, that's no longer the case.

I love building things, trying things, finding the best result that checks all the boxes, conventions, quality, etc. Not having to hand set the code is a pure net positive for me. I can discuss architecture, interfaces, data flow, data models and so on, I can let it quickly onboard me, tell me where we left of. It's great.

If everything feels fragmented after completing a feature, then you haven't driven the agent properly. You really want to yell at it from multiple angles until the output fits a narrow hole that you specify.

Yessss. I feel this. On the productivity side I banned Reddit and gave myself 15 min of HN a day, that helped with not getting waylaid.

On the pleasure side, I can get close to the same feeling with a design and review cycle going while Claude checks in, but its not as fun. Using an inline code assistant for the “interesting” parts while Claude does all the boring scaffolding.

I think of it like any industrialization process - being a cabinet maker was meditative - overseeing ikea flatpak cnc is not.

no need for flow, just vibe with it. /s
Very, very much agree with this. The nuggets of wait time are just long enough to get distracted, but not long enough to accomplish anything worthwhile.

My best "hack" for this has been to use Freedom[1] to create a blocklist of all my go-to time sucks (including, sadly, HN). This at least stops me from getting pulled in too deeply.

[1] http://freedom.to/

Yes, definitely. I would love for xkcd to redraw the “compiling” one with ”My AI code agent is thinking of a solution”

https://xkcd.com/303/

I guess I'm just not asking it big enough things. I'm asking it things on the level of an individual function or component. To be honest I really haven't had much success at all with IDE integrations and giving it access to the whole codebase. I get far better results by asking very focused questions, which means I'm only waiting a few seconds for a response.

This is Claude Sonnet 4

100%. It's truly infuriating, but going back to my normal workflow now feels somehow wasteful. Like I'm able to rely on a team of devs for busywork and just deciding to do it by hand and overcharge my clients (in time).

I've had a few instances where I've been able to go into flow state with 3 concurrent sessions on fully disjoint projects. Feels like context switching is easier when there's almost zero cognitive overlap between the projects in terms of actual features, but the stacks are all similar.

But for sure I haven't even come closer to these glorious flow sessions fully locked into coding some clever bit of logic.

So, here for the suggestions too.

Development experience of AI tools is becoming the biggest blocker. And a large part of that is performance (in time, not qualitatively).

Most of us are doing relatively simple things like using with the largest/slowest models possible instead of downgrading to a smaller model. Reason: our tools lack the ability to escalate to more expensive models as needed and switching models manually is tedious. Ideally, a cheap locally running model would be first in line and respond quickly for quick things.

And then there's the whole asynchronous vs. synchronous thing. With Codex, it runs in a browser and it allows you to create a pull request whenever it is done. You can work on multiple pull requests with it even and it might work in parallel.

What's good about the Codex experience is that your input is only needed at the end. What's bad is that it takes ages. Even for simple stuff. Like a simple follow up question results in it boiling the oceans to startup the container again.

Slow AI is exactly like slow builds: frustrating and likely to distract you. If it's going to take a minute you are going to do something else. And that might not be work related. So it breaks your flow because you are sitting on your hands and filling your short term memory with garbage. Context switches are expensive (and break flow). Our brains don't do that well. And then you forget to switch back so you lose time.

I don't use reasoning models that much for this reason. It's easier and faster for me to manually patch up my code with whatever the LLM says I should fix. And on larger repositories the chance of a good PR drops sharply. So, even if it takes more context micromanagement to feed it all the detail it needs, this can be faster and more effective. And I get an answer in a few seconds instead of in a few minutes.

Yeah, when using AI assistants it often happens that I end up in a dull/low-energy/lethargic state.

Then it costs me a lot of energy to get back working on the problem and fix all the mistakes that the AI made.

I think you need to let go of wanting to achieve a flow state if you're outsourcing the coding; you're a manager, product owner and code reviewer now, not a programmer yourself. Context switching and waiting for things are normal in those roles, flow state is not.
Interestingly I feel quite the opposite but it depends on the job.

Bootstrapping things like a new project ? Yeah, things can be too fast for me to stay in the flow.

But my day to day is about working with already existing code which I have to modify and here, AI is exactly the opposite : it helps me drill down boring and legacy code. I helps me stay in the flow because I can ask questions about the code. I can ask it where is the code that does X, I can ask it how it currently works. I can describe my issue, let it analyze the code and ask it to make proposals to solve my issue. Then I discuss the options, then I let it implement the one "we" agreed upon, then I review and I discuss the solution.

In fact I stay in flow because I don't feel alone with my issues and my questions. Maybe it says more about my work environment where I cannot pair as much as I wanted to but at least I have Cursor/Claude/Whatever.

However not having that continuous interaction and hoping the AI to solve your Jira ticket in one prompt is going to be a disaster for your focus and you will not trust the result enough.

Overall, it makes my job less miserable when I'm doing boring things.

If your problem is to keep the focus while the agent is doing his work, then try the app called Black Screen. It has a nice attention refresh feature that allows you to see random photos for a few seconds. It makes waiting less boring and does not suck your attention into itself as social media does.
When you stop and wait for an LLM it breaks flow.

If you stop and review what an agent did, it breaks flow.

Personally, my experience has been the best with doing this:

- Start coding

- On a second laptop, run an agent in yolo and tell it to periodically pull changes and if there are any `AGENT-TODO:` items in the code, do them.

- As you code, if you find something irritating or boring, `AGENT-TODO: ...` it.

- Periodically push your changes.

- Periodically pull any changes your agent has pushed down.

- Keep working; don't stop and check on the agent. Don't confirm every action. Just yolo.

If that's too scary, have it put up PRs instead of pushing to the live branch. /shrug

...but, tldr: if you're sitting there watching an agent do things, you're not in flow. If you're kicking multiple agents off and sitting waiting for them, you're more productive, but that is absolutely not flow state.

Anyone who thinks they are, doesn't know what flow state is.

The key to maintaining flow is having a second clone, or a second machine or something where you can keep doing work after you kick the agent off to do something.

(yeah, you don't need a second laptop, but it's nice; agents will often run things to check they work or steal ports or run tests that can screw with you if you're on the same machine)

Tangentially, I would be curious to know what the impact is when it comes to developing novel solutions to problems. Is it letting you focus on coming up with such solutions by making more room to focus on them? To me, it feels more discouraging because the LLM came up with something right, it may not be great but tinkering with it and improving upon it might just be a red-herring, so why bother?