When you break the problem of "create new endpoint" down into its sub-components (Which you can do with the agent) and then work on one part at a time, with a new session for each part, you generally do have more success.
The more boilerplate-y the part is, the better it is. I have not really found one model that can yet reliably one-shot things in real life projects, but they do get quie close.
For many tasks, the models are slower than what I am, but IMO at this point they are helpful and definitely should be part of the toolset involved.
This definitely feels right from my experience. Small tasks that are present in the training data = good output with little effort.
Infra tasks (something that isn't in the training data as often) = sad times and lots of spelunking (to be fair Gemini has done a good job for me eventually, even though it told me to nuke my database (which sadly, was a good solution)).