What this thread does
Install Context Mode in Claude Code, check it with /ctx-doctor, and retrieve one failure from an indexed log before relying on it for a long session.
Do first: check node --version; the installation instructions require Node 24.15.0 or later, then:
claude plugin marketplace add mksglu/context-mode
claude plugin install context-mode@context-mode
Restart Claude Code and run /ctx-doctor. Follow any reported repair instruction before the trial. This route adds the plugin's hooks, MCP tools and skills. Install and first-session instructions.
1. Choose a saved, non-sensitive build or test log inside the project. Record its file size and one failure you can locate directly. 2. Ask the agent to index the log path with ctx_index, search for the failing test name with ctx_search, and return the source reference, failure message and relevant stack frame. The tool reference shows ctx_index with path and ctx_search with queries. 3. Compare the retrieved passage with the original file. If the agent lacks the cause, search a distinctive error token and then the surrounding component name. A short reply alone is not success: the retained evidence must support the proposed diagnosis. 4. Run /ctx-stats and inspect its output-byte accounting. Record whether the useful failure details survived, alongside any reduction. The publisher's examples and benchmark method distinguish retrieval from other output-saving modes.
Diagnostic: the agent sees too much log output and too little cause
Use retrieval when the answer is concentrated in a few passages. For totals or distributions across an entire log, ask for a script through ctx_execute that computes the result and prints a small answer; selected search hits cannot establish a whole-file count. Execution and search mechanics.
Evidence
- Public failure report: Lcstyle, November 7, 2026, reports Context Mode 2.1.5 with Claude Code 2.1.319 on Linux. After compaction, a roughly 30 KB initial prompt caused later prompt hooks to exceed five seconds, despite a passing doctor report. The issue was closed as completed on November 8, 2026; as of November 2026, Context Mode 2.1.6 includes the recall fix. Issue #1330.
- The publisher provides output-byte measurements and reproduction instructions; those figures do not establish lower account charges or better fixes. Benchmark method.
Limits
This recipe covers a new Context Mode setup in Claude Code; it does not cover migration from 1.x. Useful context can be omitted from a snippet, so compare critical passages with their source. A passing doctor report does not establish compaction reliability; keep a separate project checkpoint before a long session.
Not for: reducing hundreds of MCP tool definitions at startup; see mcp-catalog-and-executor-instead-of-hundreds-of-tools.
Started from a post by @mksglu, packaged by the editor. Original post