The Pragmatic Engineer
The Pragmatic Engineer

Context engineering with Dex Horthy

July 15, 2026

AI Summary

5 min read

Context engineering with Dex Horthy

Dex Horthy built a "lights off" software factory where AI agents shipped code for months without any developer reading a single line. Four months later, he shut it down. "Things just stopped working," he says. The codebase had become easier to rewrite from scratch than to fix—a cautionary tale from someone who pushed the "let agents build everything" idea further than most.

Horthy is the founder of Human Layer and the person who coined the term "context engineering" days before Andrew Karpathy and Toby Lutke made it famous. He spent two years talking to hundreds of AI engineers about what actually works when building with language models, and he's been testing those ideas with his own team.

What context engineering actually means

Context engineering is the practice of treating every interaction with an LLM as a problem of token management. "At the end of the day, every single step in your AI workflow is just tokens in, tokens out," Horthy explains. "Your job as an engineer is to figure out what tokens you need to put in to maximize the chance that the tokens out are going to be good."

Continue reading the full summary in the app — free to try.

Read Full Summary →

Free • No credit card required

What you'll learn

  • 1 (00:00) **Intro & Dex’s Background** - Host sets up the episode: Dex Horthy, founder of Human Lair, coined "context engineering," and ran a "lights-off" software factory that he had to shut down after four months.
  • 2 The episode covers context engineering, loop engineering, software factories, and spec-driven development.
  • 3 Host introduces the concept of the "lights-off software factory" — letting AI agents ship code for months without a human reading a line.
  • 4 (02:52) **How Dex Got into Tech** - Dex describes his path from a physics undergrad to building pathfinding software for NASA at age 17, to his first job in platform engineering.
  • 5 He realized early on that the most valuable people in a company were those building the developer platform (CI/CD, sandboxes).
  • 6 He became "obsessed with software factories" from his first job, long before the AI era.
  • 7 (05:49) **The Pre-AI Software Factory Obsession** - Dex explains his long-standing interest in automating the software development lifecycle, from CI/CD to the "thing that builds the thing."

+ Full timestamped outline available in the app

Show Notes

Brought to You By:

• Antithesis – verify your system’s correctness without human review or traditional integration tests – and avoid bugs or outages.

• Buildkite – CI software built to absorb whatever your coding agents throw at the build queue.

• Sentry – application monitoring software considered “not bad” by millions of developers.

—

Knowing how LLM contexts work and how to work around context limitations – aka “context engineering” – is becoming more important for software engineers working with LLMs. Let’s look into what works and what doesn’t, today.

In this episode of The Pragmatic Engineer podcast, I sit down with the CEO and cofounder of HumanLayer, Dex Horthy, who coined the term “context engineering”. We discuss the ideas behind this context engineering, harness engineering, loop engineering, software factories, why his approach to AI-assisted software development has evolved, and how HumanLayer is helping engineering teams automate more of the software development lifecycle without sacrificing code quality.

—

Timestamps

00:00 Intro

03:35 Dex’s path into tech

05:36 Early work in platform engineering

07:30 Replicated

13:26 Metalytics

14:38 12-factor agents

20:29 Context engineering

25:40 Harness engineering

28:13 Context overload

32:47 Loop engineering

46:36 Software factories before and after AI

52:35 Automation limits

57:20 Three options for automating

1:01:02 RPI framework

1:06:18 Intentional compaction

1:13:50 Token harder vs. token smarter

1:18:46 AI slop

1:21:17 HumanLayer

1:31:11 Book recommendation

—

The Pragmatic Engineer deepdives relevant for this episode:

• How Uber uses AI for development: inside look

• Are AI agents actually slowing us down?

• AI Tooling for Software Engineers in 2026

• Vibe Coding as a software engineer

• How Claude Code is built

• The Pragmatic Engineer