🌱 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.

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

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

Connected Notes