Skip to content
Documentation

Read & shape context

Reuse context. Keep a recovery path.

Read caches and output archives reduce repeated delivery, but they have distinct lifetimes and recovery mechanisms.

AvailableReviewed September 2026

Three different things

Mechanism What it holds How you use it
Read cache Prior representations and source references An unchanged re-read can return a compact reference
Output archive Large tool output retained outside the prompt Follow the identifier with ctx_expand
Project knowledge Selected findings, decisions and relationships Recall with ctx_knowledge

A cache hit is not durable knowledge. An archived command result is not a live view of the repository.

Refresh a file

Ask for a fresh read when a reference is insufficient or the task needs current text:

{"name":"ctx_read","arguments":{"path":"README.md","mode":"full","fresh":true}}

Use raw: true when exact file text matters. Security processing still applies on supported paths.

Retrieve an archive

When a result includes an archive ID or path, pass that returned value to ctx_expand. Its schema supports targeted retrieval: search, line ranges, head, tail and JSON selection.

Searching an archive often gives the needed error or record without sending the entire output again. Do not invent an identifier or treat an example ID as a real source.

Respect retention

Archives are bounded by age and disk limits. Cache cleanup, source changes and access restrictions can make recovery unavailable. Store durable evidence deliberately when a workflow needs it; a recovery handle is not an indefinite backup.

The configuration reference lists the actual archive defaults. The read reference distinguishes caching controls from output modes.

Keep edits exact

Do not write summaries, omission markers or archived-output notices into source code. Recover the relevant original, check that it is current, then edit. This is especially important when an agent has only seen a signature or compressed view.

Sources & versions4 references Reviewed
Core checkout
0ce2207ee4
Installed runtime
3.10.2
SDK release
1.1.0

Separate baselines for source, CLI/configuration and SDK contracts. Review does not certify every platform or integration.

Versions & compatibility