Constraint Decay: The Fragility of LLM Agents in Backend Code Generation
2026/05/07 by Francesco Dente, Dario Satriani, Paolo Papotti · 24 voices
#cs.SE #cs.AI
paper · pdf
Abstract
Large Language Model (LLM) agents demonstrate strong performance in autonomous code generation under loose specifications. However, production-grade software requires strict adherence to structural constraints, such as architectural patterns, databases, and object-relational mappings. Existing benchmarks often overlook these non-functional requirements, rewarding functionally correct but structurally arbitrary solutions. We present a systematic study evaluating how well agents handle structural constraints in multi-file backend generation. By fixing a unified API contract across 80 greenfield generation tasks and 20 feature-implementation tasks spanning eight web frameworks, we isolate the effect of structural complexity using a dual evaluation with end-to-end behavioral tests and static verifiers. Our findings reveal a phenomenon of constraint decay: as structural requirements accumulate, agent performance exhibits a substantial decline. Capable configurations lose 30 points on average in assertion pass rates from baseline to fully specified tasks, while some weaker configurations approach zero. Framework sensitivity analysis exposes significant performance disparities: agents succeed in minimal, explicit frameworks (e.g., Flask) but perform substantially worse on average in convention-heavy environments (e.g., FastAPI, Django). Finally, error analysis identifies data-layer defects (e.g., incorrect query composition and ORM runtime violations) as the leading root causes. This work highlights that jointly satisfying functional and structural requirements remains a key open challenge for coding agents.
Citations
Discussions
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation [hn, 287 points, 197 comments]
- cool study. I have been worried about this and they articulate it well. there are important rules in large codebases that are not written down, and are only enforced when a small number of senior code [bsky, 137 points, 9 comments]
- arxiv.org/abs/2605.06445 This paper highlights that jointly satisfying functional and structural requirements remains an open challenge for coding agents. Work led by Francesco Dente and Dario Satrian [bsky, 4 points, 1 comments]
- Constraint Decay: The Fragility of #LLM Agents in Backend Code Generation arxiv.org/abs/2605.06445 #AgenticAI #AI #ML #Programming [bsky, 3 points, 0 comments]
- Constraint decay: The Fragility of LLM Agents in Backend Code Generation [lemmy, 3 points, 0 comments]
- LLMによるバックエンドコード生成の脆弱性を指摘する論文が登場。複雑な制約条件下で指示が守れなくなる「制約の減衰」現象が明らかに。自動化の実装には慎重な評価と検証プロセスが不可欠です。AIの現状と限界を冷静に見極める必要があります。 #AI #LLM https://arxiv.org/abs/2605.06445 [bsky, 1 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation https://arxiv.org/abs/2605.06445 https://news.ycombinator.com/item?id=48256912 [bsky, 1 points, 0 comments]
- The most surprising thing in this paper is that the agent preformed (well?) in the step without any constraints. I’m not AT ALL surprised that we can’t ”one time” generate complex APIs using LLMs with [bsky, 1 points, 1 comments]
- Explore the vulnerabilities of LLM agents in backend code generation with "Constraint Decay." This insightful analysis unveils how fragile these systems can be and the implications for developers. Sta [bsky, 1 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation https://arxiv.org/abs/2605.06445 comments #arxiv.org [bsky, 0 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation https://arxiv.org/abs/2605.06445 [bsky, 0 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation View Article | Join the HN Conversation Summary of HN discussion 🧵👇 [bsky, 0 points, 1 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation https://arxiv.org/abs/2605.06445 [comments] [117 points] [bsky, 0 points, 0 comments]
- 📰 Constraint Decay: The Fragility of LLM Agents in Back End Code Generation 🔗 https://arxiv.org/abs/2605.06445 💬 Discuss on HN [bsky, 0 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation https://arxiv.org/abs/2605.06445 (https://news.ycombinator.com/item?id=48256912) [bsky, 0 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation https://arxiv.org/abs/2605.06445 (http://news.ycombinator.com/item?id=48256912) [bsky, 0 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation https://arxiv.org/abs/2605.06445 (http://news.ycombinator.com/item?id=48256912) [bsky, 0 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation [bsky, 0 points, 0 comments]
- 📰 Constraint Decay: The fragility of Large Language Models (LLMs) in back-end code generation highlights their limitations and potential vulnerabilities when generating complex code without explicit [bsky, 0 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation https://arxiv.org/abs/2605.06445 (https://news.ycombinator.com/item?id=48256912) [bsky, 0 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Backend Code Generation arxiv.org/abs/2605.06445 自分が日々感じているエージェンテックコーディングでバックエンド開発をやる困難さが実験的に示されていた.LLMモデルにサーバー開発をやらせるときに制約が多いほど実装が破綻すると. [bsky, 0 points, 1 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation #HackerNews https://arxiv.org/abs/2605.06445 [bsky, 0 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation https://arxiv.org/abs/2605.06445 https://news.ycombinator.com/item?id=48256912 [bsky, 0 points, 0 comments]
- Constraint Decay: The Fragility of LLM Agents in Back End Code Generation https:// arxiv.org/abs/2605.06445 # arxiv # llm [mastodon, 0 points, 0 comments]
Related