Claude Code context mechanisms

Source = where the text originates (who wrote it). Invoker = what causes it to enter this session’s context.

Pre-session — automatic startup loads

Injected before the first turn, based on filesystem and config.

Mid-session — triggered injections

Enter context during the conversation, triggered by Claude, you, or a lifecycle event.

The underlying truth: all of the above, without exception, are text injected into the context window. The context window is the one real primitive. Every mechanism above is a convention for how, when, and — in Claude Code — where on the filesystem to put text into it.