Concepts
The ideas behind context-mode: Think in Code, context protection, and the tool-selection hierarchy.
context-mode rests on one bet: an agent reasons better when its context window holds conclusions, not raw bytes. By running code in a sandbox and printing only the answer, context-mode keeps roughly 95-99% of the window free for the work that actually needs it.
This section explains the principles behind that result — why reading data is
expensive, how the four protection layers keep raw output out of context, and how
the tool-selection hierarchy decides which ctx_* tool fits each task.
Start here
Think in Code
Program the analysis and print only the answer instead of reading raw data into context.
Context protection
The four layers that keep raw output out of the context window.
Tool selection
A hierarchy for choosing the right ctx_* tool for each job.
Knowledge base
The local FTS5 store with BM25 ranking that you search on demand.
Session continuity
How events persist so a compacted or resumed session rebuilds its state.
Security
Why context-mode runs 100% local with zero telemetry under Elastic License 2.0.