When Codex writes 15 components on single lines: SonarQube flags agent-built code debt
bibryam · x · 2026-11-02
Adrian Quiroga recounts a CI failure in his finely tuned agentic coding workflow: SonarQube flagged App.tsx for cyclomatic complexity. Inspection revealed Codex had crammed 15 complete React components, each onto a single line, inside a 30-line file.
Crucially, Codex didn't care about readability or complexity—only correctness—so it kept happily iterating on that file across multiple features. After reviewing the logic, the author confirmed it was all correct (slightly over-engineered, but complexity was warranted by requirements).
He then had Codex refactor and split the file into 10 modules to satisfy SonarQube, and CI passed. Takeaway: agent-written code can be fully correct yet accumulate human-maintainability debt, making static analysis an essential guardrail in agentic workflows.
More from coding & agent
- Tsinghua & Microsoft's HarnessMM cuts agent token use by up to 87.93% while raising success rate — rohanpaul_ai · 2026-11-02
- GitHub launches Agent HQ: Anthropic, OpenAI, Google coding agents in Copilot — emmanuelvivier · 2026-11-02
- DeepSeek open-sources Super-Agent, a coding agent that reads team chats to minimize human input — emmanuelvivier · 2026-11-02
- JPMorgan, Schwab and Amazon block AI shopping agents; Schwab says it stops dozens of attempts weekly — emmanuelvivier · 2026-11-02
- Stop waiting on AI replies: dispatch sub-agents and move to the next task — lxfater · 2026-11-02
- Open-sourced: the 6,809-part robotic lobster Claude built, in a single HTML file — atullchaurasia · 2026-11-02