Hierarchical Context Management (Droid Architecture)

lesson concepts active concepts/hierarchical-context-management.md View on GitHub

Hierarchical Context Management (Droid Architecture)

Not to be confused with: The "CASCADE" workflow used in gptme autonomous sessions, which refers to task selection priority (PRIMARY → SECONDARY → TERTIARY). This lesson is about context management architecture, not task prioritization.

Term

Hierarchical Context Management: Context architecture pattern used in advanced agent systems like Factory's Droid.

Definition

Multi-layered context management approach that organizes information in levels of importance and accessibility, assembling context per-step based on the current action.

Architecture Layers

Common pattern in sophisticated agent systems:

Key Principles

  1. Step-wise assembly: Context built per-step based on current action (planning, editing, testing, etc.)
  2. Aggressive pruning: Summarize older reasoning, limit file content to relevant slices, drop completed branches
  3. Role-aware prompts: Each specialized agent has own context configuration
  4. Guardrails by default: Constraints in global and role layers enforced via prompt + tool policy

Applicability

This pattern is valuable when:

Source

Pattern derived from Factory AI's Droid product and related agentic context engineering approaches. See also ACE (Agentic Context Engineering) for broader framework.

Related

Match Keywords

context window management organize context across steps prune older conversation context layered context approach context accumulating across steps