# Context Mode 2.2: a plugin keeps coding-agent tool output out of the context window

By Ivo Donker · November 15, 2026 — text: Claude (AI)
What does Context Mode do? It is a plugin for coding agents such as Claude Code, Codex and Gemini CLI that stops large tool output from landing in the context window. The output goes into a local SQLite index on your own machine; the agent only gets back the part it asks for. Version 2.2.0 came out on November 14, 2026 and adds OMP (oh-my-pi) as the eleventh supported agent. The code is public under the Elastic License 2.0, a source-available license.

We read the [project README](https://github.com/mksglu/context-mode) and the [v2.2.0 release notes](https://github.com/mksglu/context-mode/releases/tag/v2.2.0) on GitHub. The topic was also in the [trending briefing of November 15](https://trending.llmnet.nl/en/briefing/2026-11-15).

## What happened

Context Mode v2.2.0 has been on GitHub and npm since November 14, 2026, 15:54 UTC. The repository dates from February 2026 and had more than 34,000 stars on November 15. The release is mostly about OMP: install, updates, the doctor check and the CI tests now know that agent. It also fixes a set of smaller problems, among them in the Codex and Gemini CLI integrations and for subagents that were only allowed certain MCP tools.

According to the README the plugin works with Claude Code, Codex, Gemini CLI, Qwen Code, Pi, OMP, OpenCode, Copilot CLI, Kiro, VS Code and ZCode. It needs Node 24.15.0 or later.

## How it works

A coding agent reads files, runs tests and fetches web pages. All of that output normally goes into the context window, which fills up quickly. Context Mode sits in between with hooks and an MCP server. A large Read, a curl or a WebFetch is redirected to a sandbox. The command, or a short script from the agent, runs there; the full output goes into context.db in ~/.context-mode, one database per project. The agent gets only what the script prints and can search the rest later.

Tool | What it does | 

ctx_execute | runs code or a shell command in the sandbox | 

ctx_batch | runs several commands, indexes and searches the output | 

ctx_index / ctx_search | puts a file, text or URL in the index and searches it | 

ctx_resume | returns a state block of at most 2,048 bytes after the session is compacted | 

ctx_stats, ctx_doctor, ctx_upgrade, ctx_purge | statistics, install check, updates and deleting data | 

The maker reports that on 36 benchmark rows with at least 10 KB of raw output, the median reply put 99.4 percent fewer bytes into the context. That measurement is the maker's own, from November 1 on an earlier version, and we did not repeat it.

## What this means

The problem the plugin tackles is real: a long session fills up with logs and API responses, and the agent loses track. We wrote earlier about [the race for larger context windows](https://nieuws.llmnet.nl/en/race-om-context) and about [context caching as a way to cut token costs](https://nieuws.llmnet.nl/en/context-caching-hoe-slimme-opslag-de-tokenkosten-halveert). Context Mode takes a third route: put less into the context.

Do look at what the sandbox is allowed to do. According to the README the process inherits your environment, except preload variables such as NODE_OPTIONS, and runs in the project folder with a ten-minute timeout. If a signed-in cloud CLI is on your machine, a script from the agent can use it. That is not a flaw in the plugin; it is how local tools work. But it means a plugin for [AI agents](https://nieuws.llmnet.nl/en/agentic-ai) has the same rights you do. We covered automatic MCP tool connections in our piece on [Claude plugins](https://nieuws.llmnet.nl/en/claude-plugins-auto-connect-mcp).

The license is not open source in the strict sense. Using, changing and sharing the code is allowed, at work too and free of charge. What the Elastic License 2.0 excludes is offering the software to others as a hosted service and getting around license key functions.

## What we did not check

We did not install the plugin or re-measure the savings. The README says the plugin sends no telemetry and lists four network calls; we did not verify that in the source code.

Checked on November 15, 2026.

This article was written with AI (Claude) and checked against the sources below.

## Sources

- mksglu, Context Mode README: [github.com](https://github.com/mksglu/context-mode)

- mksglu, Context Mode v2.2.0 (November 14, 2026): [github.com](https://github.com/mksglu/context-mode/releases/tag/v2.2.0)
