Personal AI News Digest
1 topics from 1 sources · Archive
430 words · ~2 min read
Dex Horthy, CEO of HumanLayer and coiner of the term "context engineering," discusses practical approaches to building reliable AI-assisted software systems. Key findings from his conversations with ~100 AI engineers building production systems:
**Code review is non-negotiable.** Shipping unread code fails within months. Horthy experimented with fully unreviewed model-generated code in July 2025; four months later the system collapsed when production broke and the model couldn't diagnose the root cause (a primary key wrongly routed through the codebase). Recovery took three weeks of manual code archaeology. He estimates this failure cycle would compress to weeks with today's faster models.
**Current coding models degrade codebases.** Models are optimized for SWE-bench-style benchmarks that reward reproducing known fixes in existing codebases like Django, but cannot measure poor architecture decisions—the cost function of bad design cannot be evaluated by unit tests. Horthy's hypothesis: eval models on building 20 features in sequence without knowing what's next.
**Context engineering 101: find the "dumb zone".** Less context window usage yields better outcomes because attention is quadratic. For a 1M context window, Horthy uses ~300–400K tokens; for smaller models, ~100K. Beyond this heuristic, models degrade and perform "stupid" actions like deleting .env files. A larger context window does not make a smarter model—intelligence lies in deciding which context is relevant.
**Intentional compaction for complex projects.** Compress long, noisy context into a Markdown document and start a fresh session pointing to this compressed context.
**Optimize LLM usage only at scale.** Start with the smartest available model; engineering time is the bottleneck. Optimize context and model choice only when costs are high and scale is real—then consider cheaper models like GPT-OSS-120B (1/1,000th the cost of Opus) for simpler steps.
**Trajectory poisoning signals.** Responses like "You're completely right!" or "you're right to push back" indicate the session is trajectory-poisoned and wasting tokens. Models are autoregressive; restart the session.
**Four things matter in the context window:** (1) system prompt, (2) relevant code, (3) error messages, (4) user intent.
**Slow loops for code quality.** Horthy's team runs nightly agents that each open one PR focused on code quality improvements; humans review all PRs before merging. Four agents now open four PRs by morning.
**"Token harder" vs. "token smarter".** Horthy participates in a group chat optimizing Claude subscriptions ("token harder"). The alternative, "token smarter," aims for maximum value while maintaining control—harder to execute.
**Three viable software factory models:** (1) nightly batch agents opening PRs, (2) continuous agents with human gates, (3) fully autonomous agents (riskiest).
Horthy's 12-Factor Agents framework, based on these learnings, is published on GitHub.
Sources The Pragmatic Engineer
Links Context engineering with Dex Horthy, YouTube, Spotify, Apple, HumanLayer, 12-Factor Agents - Principles for building reliable LLM applications, chapters, https://x.com/dexhorthy, linkedin.com/in/dexterihorthy, https://www.langchain.com/blog/improving-deep-agents-with-harness-engineering, https://www.humanlayer.dev/blog/skill-issue-harness-engineering-for-coding-agen…, https://martinfowler.com/articles/harness-engineering.html, https://newsletter.pragmaticengineer.com/p/martin-fowler