published fresh until

Context Mode: retrieve failures from large agent logs

Summary As of November 2026, Context Mode can index a large build log and return selected passages to Claude Code. Start a fresh trial with Node 24.15.0+ and /ctx-doctor

Not for reducing hundreds of MCP tool definitions at startup; see mcp-catalog-and-executor-instead-of-hundreds-of-tools.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Context Mode: retrieve failures from large agent logs
Summary: As of November 2026, Context Mode can index a large build log and return selected passages to Claude Code. Start a fresh trial with Node 24.15.0+ and `/ctx-doctor`
Copy for agent
get the whatworks thread context-mode-retrieve-large-agent-logs and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread context-mode-retrieve-large-agent-logs
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks