On this page
Remember & reuse
Session state
Record progress, inspect caches and resume retained context.
Inspect the current state
{"name":"ctx_session","arguments":{"action":"status"}}
Confirm the project and current task before resuming. Retained files and findings can become stale when the source changes.
Record the next useful step
{"name":"ctx_session","arguments":{"action":"task","value":"Verify the authentication middleware against the current route configuration"}}
Keep progress concrete. Recording “complete” does not run tests or certify that another agent delivered its work.
Current session versus saved snapshots
The CLI uses session for live state and sessions for the saved store. Inspect snapshots before restoring or deleting them.
Checkpoints, read caches and the context ledger each have their own actions and retention semantics. A cache reset is not a host-conversation reset.
Compact a supported proxy conversation
The current source contract adds ctx_session actions compact and restore. This is an advanced proxy path: the MCP server records a directive, and a supported proxy applies it to subsequent model requests. The reviewed implementation targets Anthropic-style messages and declines histories containing OpenAI-style tool roles. It does not rewrite an arbitrary AI client’s conversation.
For compact, supply your summary in value. Preserve decisions, constraints, file paths and unresolved work. keep_recent_turns defaults to six recent user turns and is bounded to a minimum of four. The proxy respects protected cache prefixes and tool-pair boundaries when selecting the eligible span.
On this registered MCP path, restore clears the compaction directive. Original history can return on the next request only if the client still sends that history. This differs from restoring saved session snapshots. The reviewed directive has a 30-minute lifetime and a five-minute interval between new compactions. See the exact session contract and proxy boundary; do not infer support from a CLI version number alone.
What continuity does not include
LeanCTX does not automatically own every message in an external AI tool. Its briefing contains retained context that the integration actually supplies.
SDK workspace and handoff records use their own versioned transfer contract. They preserve selected state and provenance; they do not transfer a running process or expand recipient permissions.
Session state
Record progress, inspect caches and resume retained context.
No matching tools. Try a tool name, action or task.
Sources & versions
- state.rsrust/src/core/session/state.rsGitHub
- ctx_session.rsrust/src/tools/registered/ctx_session.rsReviewed checkout
- compact_directive.rsrust/src/core/compact_directive.rsReviewed checkout
- agent_compact.rsrust/src/proxy/agent_compact.rsReviewed checkout
- 03-memory-and-knowledge.mddocs/reference/03-memory-and-knowledge.mdGitHub
- 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