Claude Code

Stop Junk From Eating Claude's Memory: Set Up Context Mode

The plugin that keeps raw web pages, logs and GitHub issues out of Claude's context: what it does, the two-line install, the catch about its licence, and a first prompt to try

2min read
1prompts to copy
5numbered steps
4sections

Every web page, log file and GitHub issue Claude reads lands in its context window. Context Mode's README puts it plainly: after 30 minutes, 40% of your context is gone. Context Mode is a Claude Code plugin (over 29,000 stars on GitHub) that runs that work in a sandbox and sends back only the answer.

Here's what it does, how to install it in two lines, the catch, and a first prompt to try.

What it does

  • Sandboxed tool calls: each ctx_execute call runs in its own subprocess, and only what it prints comes back into the chat. On the README's own test, 315 KB of output becomes 5.4 KB, a 98% cut.
  • Real examples from the README: a 56 KB Playwright snapshot comes back as 299 bytes; 47 file reads (700 KB) become one 3.6 KB call.
  • Search instead of re-reading: big output is indexed in a local SQLite search index, so Claude can look up the one part it needs later.
  • Session memory: before Claude compacts the chat it saves a small snapshot (2 KB or less) and restores it afterwards, so you keep working from your last prompt.
  • Hooks route Claude's tool calls through the sandbox for you, so you don't have to remember to use it.

Keep reading

Free, for an email.

Unlocks 3 more sections, 1 copy-paste prompt, the document version, and every other guide on the site, for free. Enter your email once to keep reading.

45,000+ follow where these guides come from.No spam. Unsubscribe in one click.

Read next