🌱 budding
Context Engineering

Context Engineering

Context Engineering is new term gaining traction in the AI world. The conversation is shifting from “prompt engineering” to a broader, more powerful concept: Context Engineering.

Tobi Lutke describes it as “the art of providing all the context for the task to be plausibly solvable by the LLM.” and he is right.

Four Strategies for Agent Context Engineering

From LangChain’s Context Engineering for Agents (July 2025), a clean taxonomy for managing agent context windows:

  1. Write — save context outside the window (scratchpads, long-term memories) so it’s available later without consuming tokens now
  2. Select — pull the right context in at the right time (RAG for knowledge, semantic search for tool descriptions, memory retrieval)
  3. Compress — retain only tokens needed (trajectory summarization, tool output compression, message trimming)
  4. Isolate — split context across sub-agents or sandboxes so each has a focused window (multi-agent architectures, code agent sandboxes, state schemas)

Context failure modes (via Drew Breunig): poisoning (hallucination enters context), distraction (context overwhelms training), confusion (superfluous context influences response), clash (parts of context disagree).

This maps directly to the context hygiene concepts in Agent Harnesses — the “dumb zone” (~40% context fill degradation) from Dex Horthy is the empirical observation; Write/Select/Compress/Isolate is the engineering response.

Three-Tier Context Loading (Team OS pattern)

From Build a Team OS with Claude Code - Hannah Stulberg (April 2026) — a practical tiering system for repo-based context:

  1. Tier 1 — Always loaded (<500 tokens): root CLAUDE.md, team roster, channel map. Loaded every session.
  2. Tier 2 — Loaded on query (200-500 tokens each): folder-level CLAUDE.md indexes. Only loaded when Claude navigates to that folder.
  3. Tier 3 — Loaded on demand (hundreds-thousands tokens): actual content files (PRDs, transcripts, SQL). Only loaded when specifically needed.

“Thinking room” = gap between loaded info and window size. Same concept as the “dumb zone.” A customer query consumed only 3% of context window because nested CLAUDE.md files navigated directly to the right files. Without them, explore agents burn thousands of tokens just navigating.

Counter-argument: the discipline is scaffolding around a closing gap

Context engineering exists because models handle long context badly. That is a property of a model generation, not a law, and it has been improving every release. The “dumb zone” at ~40% window fill was measured on specific models; effective context has been rising as windows grow past a million tokens and long-context retrieval improves.

If that trend continues, elaborate context pipelines are capital invested in a depreciating asset. This is the Bitter Lesson applied to harnesses: hand-engineered scaffolding tends to be outrun by general methods plus more compute. Harness Simplification as Models Improve makes the argument directly — the harness code that a weaker model needed becomes dead weight once a stronger one ships.

The four strategies also carry costs the framing understates. Compression discards signal you cannot know you needed. Isolation across sub-agents breaks exactly the cross-cutting reasoning that made the task hard, and Distilling the Distillation - Why Western Open Weights Trail China notes the related failure that delegated contexts drop the standing instructions their parent had. Each strategy is a lossy trade, not a free win.

Context engineering is the core skillContext engineering is transitional
The 40% degradation pointA durable property of attentionAn artifact of one model generation
Correct investmentBuild the pipeline; it compoundsKeep the harness thin; let the model absorb the work
What happens on the next model releasePipeline gets more valuablePipeline gets partially obsolete
Failure mode to fearContext poisoning, distraction, clashSunk engineering in scaffolding nobody needs

The empirical tell. Track the usable fraction of the window per model generation rather than the nominal size, and track whether your own harness code grows or shrinks across releases. A pipeline that keeps getting longer while models keep getting better is the signature of scaffolding fighting the trend. The honest middle is that Write and Select — persisting and retrieving knowledge — look durable, because they solve a data problem rather than a model limitation; Compress and Isolate are the two most exposed to being absorbed by the next model.


Related Notes

  • Agent-Native Architecture - Five Principles for Building After Code Ends — context injection maps to agent-native principles; Write/Select pattern implements the interface layer
  • Spec-Driven Development and AI-Native SDLC - 2026 Analysis — specs are context artifacts; context engineering is the meta-skill of the AI-native SDLC
  • The Folder Is the Agent - Context Accumulation as Specialization — folder context is accumulated context engineering applied at the project level
  • The Bitter Lesson for Agent Frameworks - Browser Use — ephemeral messages pattern: mark tool outputs with a retention window to evict stale browser state, a practical Compress strategy
  • Humanising LLM Outputs is Actually Dumb — argues Compress is being applied at the wrong layer: style instructions (“short sentences”, Simplified Technical English) sit alongside task instructions, so compression runs continuously instead of once at the human boundary

Twitter Insights (Jan 2026)

→ Full index: Twitter Bookmarks Insights#Context Engineering

Deep Dives

  • @akoratana - How to build a context graph
  • @JayaGup10 - Context Graphs AI Trillion Dollar Opportunity
  • @KirkMarple - The Context Layer AI Agents Actually Need

Key Insight

“The real moat in the agent era may be the workflow memory the agent accumulates over time.” — @levie


References


  • Cost Per Right Answer as the Metric for Agentic Data Pipelines — what context quality buys in a research pipeline: a higher share of correct answers per dollar spent
Connected Notes