Dev shares agent workflow that writes in-code LLM prompts — and the 'loop hell' it creates

Key_Horse_8632 · reddit · 2026-10-10

A developer building coding-agent workflows for designing and testing LLM calls (classifiers, extractors, tool-using agents) shares his setup: a spec records each call's input size and volume to pick the cost tier; one agent writes system prompts from a schema plus per-model structured-output profiles; a second agent checks prompts against a fixed rule list.

The pain point — which he dubs "loop hell" — is that fixes don't converge: in one run the writer reworded a prompt, the checker flagged a new mismatch, and it looped four rounds before being stopped. The same rule lives in schema, prompt and spec, so edits cause drift, and model changes force prompt rewrites.

He asks the community five open questions: agent vs handwritten prompts, checker design, what defines "done", how to evaluate agent-written prompts (golden tests, LLM judge, production metrics), and how to keep rules from diverging across artifacts.

Original post →

More from coding & agent

coding & agent channel →