Context Inheritance
How child contexts automatically receive and can override parent context settings.
Category: AI
Tags: ai, context-engineering, architecture, systems
Explanation
Context Inheritance is the mechanism by which child context layers receive and extend context from parent layers. In the context layering architecture, enterprise context flows down to teams, team context flows down to individuals, and individual context flows down to tasks.
## How it works
Like class inheritance in object-oriented programming:
- **Child inherits parent**: a team automatically gets enterprise-wide rules without explicitly copying them
- **Child can override**: a team can set stricter coding standards than the enterprise default
- **Child can extend**: a team adds project-specific context that the enterprise layer does not know about
- **Overrides are local**: a team override does not change the enterprise rule for other teams
## Inheritance in practice
In tools like Claude Code, this is already implemented:
- **Enterprise**: organization settings propagate to all projects
- **Project**: CLAUDE.md rules apply to all team members working in the repo
- **User**: personal settings and memory layer on top
- **Session**: conversation-specific context overrides everything for the current task
## Design considerations
- **Explicit over implicit**: it should be clear which layer a piece of context comes from. Silent inheritance creates context confusion when you cannot tell why the model behaves a certain way
- **Override visibility**: when a child overrides a parent, the override should be visible and auditable
- **Conflict resolution**: clear precedence rules prevent context confusion when layers disagree (narrower scope wins)
- **Budget impact**: inherited context consumes context budget in the child layer. Heavy enterprise context leaves less room for team and personal context
Related Concepts
← Back to all concepts