Constraint Decay: The Fragility of LLM Agents in Backend Code Generation

2026-07-05 · source · source ↗ · raw capture · wiki page

Full paper content fetched from arXiv. Original URL: https://arxiv.org/html/2605.06445v1 License: CC BY-NC-SA 4.0

Abstract

The paper investigates how LLM agents perform in autonomous backend code generation when strict structural constraints are imposed. The authors find that while agents excel under loose specifications, performance degrades substantially when architectural patterns, database backends, and ORM layers are mandated. They term this phenomenon constraint decay.

Key Findings

Methodology

80 generation tasks (8 frameworks × 10 constraint combinations across 4 levels L0–L3). Each task provides an OpenAPI 3.0 spec from the RealWorld Conduit API (19 CRUD operations, 5 resource groups), structural constraints, mandatory files, and a pipeline description.

Two agent scaffolds (Mini-SWE-Agent, OpenHands) and 7 models across 4 tiers: Devstral-Small (24B), Qwen3-Coder-Next (80B), Qwen3-235B-Instruct, MiniMax-M2.5, Kimi-K2.5, GPT-5-mini, GPT-5.2.

Three constraint dimensions: architectural pattern (Clean Architecture), database backend (PostgreSQL/SQLite), and ORM integration (SQLAlchemy/Sequelize).

Isolated Docker execution with a unified HTTP test suite of 32 requests, 291 assertions, plus static verifiers for structural compliance.

Total evaluation consumed ~5 billion tokens.