More Beyond Coding episodes

Why Coding Agents Keep Making Your Codebase Worse thumbnail

Why Coding Agents Keep Making Your Codebase Worse

Published 30 Sept 2026

Duration: 00:45:15

"Explores McDonald's World Menu Heist, AI's coding limitations (like poor long-term maintenance and refactoring), critiques unrealistic AI hype, and emphasizes engineering best practices, human oversight, and incremental productivity improvements."

Episode Description

HumanLayer CEO Dexter Horthy, who coined "context engineering", on why AI agents degrade codebases over time. He breaks down a benchmark that measures...

Overview

The podcast discusses key challenges and limitations of AI in software engineering, particularly its inability to maintain code quality over time. Benchmarks like Slop Code Bench highlight how AI models degrade codebases during incremental development, struggling with refactoring, abstraction changes, and long-term maintenance. Despite advances, current AI systems generate code that often requires significant rework - sometimes 25 - 75% - and fixing AI-generated code is more difficult than starting from scratch due to embedded assumptions and context loss.

There is a strong emphasis on the importance of human judgment, planning, and collaboration in mitigating these issues. Effective practices include early design reviews, clear problem scoping, and using AI as a tool to augment - not replace - human decision-making. The discussion warns against over-reliance on future AI improvements to clean up poor code, advocates for writing maintainable code today, and stresses that true progress lies in balancing automation with foundational engineering principles, team culture, and iterative learning.

What If

  • What if you simulated long-term code decay before shipping your next feature?

    • Move: Run your next feature addition through a mini Slop Code Bench simulation - make 5 incremental updates to a core module over a week, measuring test degradation and tech debt accumulation each time.
    • Why Now?: AI-generated code often passes initial tests but degrades maintainability; catching this early prevents future rework when the codebase scales or changes.
    • Expected Upside: Reduce long-term debugging time by 30 - 50% and avoid inheriting unfixable abstractions that require full rewrites later.
  • What if you shifted 80% of your AI usage to planning instead of coding?

    • Move: For your next project, use AI exclusively to generate design docs, user flows, and edge-case analysis - then write all code manually based on that output.
    • Why Now?: AI excels at context synthesis but fails at clean execution; leveraging it upstream where human judgment dominates reduces rework from low-quality "slop" code.
    • Expected Upside: Cut post-implementation revisions by 50 - 75% and increase ownership/understanding of the final code, accelerating future iterations.
  • What if you enforced a "one-PR-at-a-time" rule with automated checkpointing?

    • Move: Break your next task into small, sequential PRs (under 200 lines), use a bot to block concurrent PRs, and run automated checks to validate incremental progress toward the goal.
    • Why Now?: Incremental control loops reduce debugging surface and prevent context collapse - especially critical when working solo and relying on AI for execution.
    • Expected Upside: Ship features 2 - 3x faster with fewer regressions, while maintaining a clean, reviewable history that supports future automation or handoffs.

Takeaway

  • Implement a strict self-review process before submitting any code for peer review, ensuring you understand and validate your own changes to reduce rework and improve code quality.
  • Break large development tasks into small, incremental pull requests (e.g., under 200 lines) with clear labels and limits (one PR per type) to enable faster feedback, easier debugging, and better merge hygiene.
  • Use design documents as formalized prompts for AI collaboration, reviewing and refining them iteratively to align human and agent understanding before writing code.
  • Run non-critical or research-based tasks asynchronously overnight to maximize available model usage without blocking primary workflows, especially under subscription-limited AI access.
  • Focus on completing one high-priority task at a time by dedicating blocks of time to deep thinking and execution, avoiding over-parallelization that increases context-switching and delays delivery.

Recent Episodes of Beyond Coding

19 Aug 2026 How Amazon Turns Real Failures Into Better AI Models

AI's evolution and challenges are explored through agentic systems like Amazon's Nova, model routing inefficiencies, simulated learning, enterprise tool integration, dynamic benchmarks, and the balance between specialized and generalized models.

More Beyond Coding episodes