I have developed a rule of thumb for when it's best to code by hand.
If I don't understand the problem super well, I'll start digging in with an agent and gaining familiarity.
However, if after 10-15 minutes of prompting, the solution isn't something that I feel I could implement myself, it's time to go do it by hand.
I do it the way I did pre-AI. Finding the relevant code, reading and understanding it, and trying out various ideas.
Usually when I'm about 30-50% done, the system is mapped out really well in my mind, and all that remains is execution.
Then I'll write up a detailed spec and ask the agent for feedback. It almost always finds edge cases I didn't consider and "gets" where I'm going with it. I let the agent take it forward and also have it do the things I usually don't have patience for, like TDD and running all the tests and whatnot. The grunt work.
What's nice is that I am fully qualified to review the code afterward and, not only that, any future agentic work on that system is easier. I understand it better because I did the manual work.
It's still really fast and it makes future work faster. It's this kind of hybrid human agent workflow that makes me feel superhuman.
At some point, and it's difficult to figure out this point ahead of time, it pays off more to just do it manually.
Having a good sense in your mind what are the edges of your system that can suffer a little slop, and what are the central avenues is more important than ever.