context-mode
Concepts

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

On this page