a builder's codex
codex · operators · Sherwin Wu · ins_bottleneck-is-context-not-capability

When the agent isn't doing what you want, fix the context — not the model

By Sherwin Wu · Head of Engineering, OpenAI API and Developer Platform · 2026-04-28 · podcast · Sherwin Wu — Codex inside OpenAI, engineers as managers — Lenny's Podcast

Tier A · TL;DR
When the agent isn't doing what you want, fix the context — not the model

Claim

The dominant failure mode for AI agents in production isn't model capability. It's missing context. The fix is to encode tribal knowledge into greppable artifacts — markdown files, code comments, .md skills, a wiki — so the agent can find and apply the knowledge it needs. The team's quality is gated by contextDB completeness, not model strength.

Mechanism

Frontier models are competent at general reasoning. Their failure modes appear when they lack specifics: how this codebase is organized, what conventions the team follows, what previous decisions ruled out. Each missing piece of context produces a wrong answer. Encoding the context once compounds: every future task starts with the right priors. The investment shifts from prompt engineering (volatile) to context engineering (durable).

Conditions

Holds when:

Fails when:

Evidence

"When the agent isn't doing what you want, it's usually a problem with context — you've underspecified or there's just not enough information available."

OpenAI's discipline: encode tribal knowledge via comments, structure, .md files, Skills. The repository itself becomes the contextDB. 95% of OpenAI engineers use Codex daily; the heavy users open 70% more PRs; the gap widens with experience.

— Sherwin Wu on Lenny's Podcast, 2026-04-28

Signals

Counter-evidence

Andrej Karpathy's LLM-wiki pattern is the disciplined version of this approach. Without the discipline (append-only raw, synthesized pages, lint cycles), the corpus rots and degrades agent quality. "Encode tribal knowledge" is correct; "encode it well enough that it stays current" is the actual hard work.

Cross-references

Open the interactive view → View original source → Markdown source →