Yes, you're missing a magic workflow.
If you find yourself having to copy and paste errors back and forward you need to upgrade to a coding agent harness like Claude Code so the LLM can try things out and then fix the errors on its own.
If you're not willing to do that you can also fix this by preparing a text file with a few examples of correctly formatted queries and pasting that in at the start of your session, or putting it in a skill markdown file.
Re:Don't fall into the anti-AI hype
by parliament32 on Monday January 12, 2026 @12:30PM
(#46591574)
So, let me get this straight, LLMs need a "coding agent harness" to figure out that they need to close brackets? Wild.
I know the usual clap back is "you're just missing this magical workflow" or "you need to prompt better" but.. do I really need to prompt "make sure your syntax is correct"? Shouldn't that be, ya know, a given for a prompt that starts with "Help me put together a PromQL query that..."?