context-mode 0.9.22 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/.claude-plugin/hooks/hooks.json +46 -4
  2. package/.claude-plugin/marketplace.json +2 -2
  3. package/.claude-plugin/plugin.json +4 -4
  4. package/README.md +370 -185
  5. package/build/adapters/claude-code/config.d.ts +8 -0
  6. package/build/adapters/claude-code/config.js +8 -0
  7. package/build/adapters/claude-code/hooks.d.ts +53 -0
  8. package/build/adapters/claude-code/hooks.js +88 -0
  9. package/build/adapters/claude-code/index.d.ts +50 -0
  10. package/build/adapters/claude-code/index.js +523 -0
  11. package/build/adapters/codex/config.d.ts +8 -0
  12. package/build/adapters/codex/config.js +8 -0
  13. package/build/adapters/codex/hooks.d.ts +21 -0
  14. package/build/adapters/codex/hooks.js +27 -0
  15. package/build/adapters/codex/index.d.ts +44 -0
  16. package/build/adapters/codex/index.js +223 -0
  17. package/build/adapters/detect.d.ts +26 -0
  18. package/build/adapters/detect.js +131 -0
  19. package/build/adapters/gemini-cli/config.d.ts +8 -0
  20. package/build/adapters/gemini-cli/config.js +8 -0
  21. package/build/adapters/gemini-cli/hooks.d.ts +44 -0
  22. package/build/adapters/gemini-cli/hooks.js +64 -0
  23. package/build/adapters/gemini-cli/index.d.ts +57 -0
  24. package/build/adapters/gemini-cli/index.js +468 -0
  25. package/build/adapters/opencode/config.d.ts +8 -0
  26. package/build/adapters/opencode/config.js +8 -0
  27. package/build/adapters/opencode/hooks.d.ts +38 -0
  28. package/build/adapters/opencode/hooks.js +50 -0
  29. package/build/adapters/opencode/index.d.ts +52 -0
  30. package/build/adapters/opencode/index.js +386 -0
  31. package/build/adapters/types.d.ts +218 -0
  32. package/build/adapters/types.js +13 -0
  33. package/build/adapters/vscode-copilot/config.d.ts +8 -0
  34. package/build/adapters/vscode-copilot/config.js +8 -0
  35. package/build/adapters/vscode-copilot/hooks.d.ts +49 -0
  36. package/build/adapters/vscode-copilot/hooks.js +76 -0
  37. package/build/adapters/vscode-copilot/index.d.ts +58 -0
  38. package/build/adapters/vscode-copilot/index.js +512 -0
  39. package/build/cli.d.ts +7 -5
  40. package/build/cli.js +127 -421
  41. package/build/db-base.d.ts +84 -0
  42. package/build/db-base.js +128 -0
  43. package/build/executor.d.ts +6 -7
  44. package/build/executor.js +111 -51
  45. package/build/opencode-plugin.d.ts +37 -0
  46. package/build/opencode-plugin.js +118 -0
  47. package/build/runtime.js +1 -1
  48. package/build/server.js +436 -117
  49. package/build/session/db.d.ts +110 -0
  50. package/build/session/db.js +285 -0
  51. package/build/session/extract.d.ts +51 -0
  52. package/build/session/extract.js +407 -0
  53. package/build/session/snapshot.d.ts +70 -0
  54. package/build/session/snapshot.js +309 -0
  55. package/build/store.d.ts +4 -22
  56. package/build/store.js +67 -55
  57. package/build/truncate.d.ts +59 -0
  58. package/build/truncate.js +157 -0
  59. package/build/types.d.ts +101 -0
  60. package/build/types.js +20 -0
  61. package/configs/claude-code/CLAUDE.md +62 -0
  62. package/configs/codex/AGENTS.md +58 -0
  63. package/configs/codex/config.toml +5 -0
  64. package/configs/gemini-cli/GEMINI.md +58 -0
  65. package/configs/gemini-cli/mcp.json +7 -0
  66. package/configs/gemini-cli/settings.json +49 -0
  67. package/configs/opencode/AGENTS.md +58 -0
  68. package/configs/opencode/opencode.json +10 -0
  69. package/configs/vscode-copilot/copilot-instructions.md +58 -0
  70. package/configs/vscode-copilot/hooks.json +16 -0
  71. package/configs/vscode-copilot/mcp.json +8 -0
  72. package/hooks/core/formatters.mjs +86 -0
  73. package/hooks/core/routing.mjs +262 -0
  74. package/hooks/core/stdin.mjs +19 -0
  75. package/hooks/formatters/claude-code.mjs +57 -0
  76. package/hooks/formatters/gemini-cli.mjs +55 -0
  77. package/hooks/formatters/vscode-copilot.mjs +55 -0
  78. package/hooks/gemini-cli/aftertool.mjs +58 -0
  79. package/hooks/gemini-cli/beforetool.mjs +25 -0
  80. package/hooks/gemini-cli/precompress.mjs +51 -0
  81. package/hooks/gemini-cli/sessionstart.mjs +117 -0
  82. package/hooks/hooks.json +46 -4
  83. package/hooks/posttooluse.mjs +53 -0
  84. package/hooks/precompact.mjs +55 -0
  85. package/hooks/pretooluse.mjs +23 -266
  86. package/hooks/routing-block.mjs +19 -6
  87. package/hooks/session-directive.mjs +353 -0
  88. package/hooks/session-helpers.mjs +112 -0
  89. package/hooks/sessionstart.mjs +123 -16
  90. package/hooks/userpromptsubmit.mjs +58 -0
  91. package/hooks/vscode-copilot/posttooluse.mjs +58 -0
  92. package/hooks/vscode-copilot/precompact.mjs +51 -0
  93. package/hooks/vscode-copilot/pretooluse.mjs +25 -0
  94. package/hooks/vscode-copilot/sessionstart.mjs +115 -0
  95. package/package.json +20 -17
  96. package/skills/context-mode/SKILL.md +49 -49
  97. package/skills/ctx-stats/SKILL.md +1 -1
  98. package/start.mjs +47 -0
  99. package/hooks/pretooluse.sh +0 -147
  100. package/server.bundle.mjs +0 -341
package/README.md CHANGED
@@ -2,72 +2,243 @@
2
2
 
3
3
  **The other half of the context problem.**
4
4
 
5
- [![users](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmksglu%2Fclaude-context-mode%40main%2Fstats.json&query=%24.message&label=users&color=brightgreen)](https://www.npmjs.com/package/context-mode) [![npm](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmksglu%2Fclaude-context-mode%40main%2Fstats.json&query=%24.npm&label=npm&color=blue)](https://www.npmjs.com/package/context-mode) [![marketplace](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmksglu%2Fclaude-context-mode%40main%2Fstats.json&query=%24.marketplace&label=marketplace&color=blue)](https://github.com/mksglu/claude-context-mode) [![GitHub stars](https://img.shields.io/github/stars/mksglu/claude-context-mode?style=flat&color=yellow)](https://github.com/mksglu/claude-context-mode/stargazers) [![GitHub forks](https://img.shields.io/github/forks/mksglu/claude-context-mode?style=flat&color=blue)](https://github.com/mksglu/claude-context-mode/network/members) [![Last commit](https://img.shields.io/github/last-commit/mksglu/claude-context-mode?color=green)](https://github.com/mksglu/claude-context-mode/commits) [![License: ELv2](https://img.shields.io/badge/License-ELv2-blue.svg)](LICENSE)
5
+ [![users](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmksglu%2Fcontext-mode%40main%2Fstats.json&query=%24.message&label=users&color=brightgreen)](https://www.npmjs.com/package/context-mode) [![npm](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmksglu%2Fcontext-mode%40main%2Fstats.json&query=%24.npm&label=npm&color=blue)](https://www.npmjs.com/package/context-mode) [![marketplace](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmksglu%2Fcontext-mode%40main%2Fstats.json&query=%24.marketplace&label=marketplace&color=blue)](https://github.com/mksglu/context-mode) [![GitHub stars](https://img.shields.io/github/stars/mksglu/context-mode?style=flat&color=yellow)](https://github.com/mksglu/context-mode/stargazers) [![GitHub forks](https://img.shields.io/github/forks/mksglu/context-mode?style=flat&color=blue)](https://github.com/mksglu/context-mode/network/members) [![Last commit](https://img.shields.io/github/last-commit/mksglu/context-mode?color=green)](https://github.com/mksglu/context-mode/commits) [![License: ELv2](https://img.shields.io/badge/License-ELv2-blue.svg)](LICENSE)
6
6
  [![Discord](https://img.shields.io/discord/1478479412700909750?label=Discord&logo=discord&color=5865f2)](https://discord.gg/DCN9jUgN5v)
7
7
 
8
- Every MCP tool call in Claude Code dumps raw data into your 200K context window. A Playwright snapshot costs 56 KB. Twenty GitHub issues cost 59 KB. One access log — 45 KB. After 30 minutes, 40% of your context is gone.
8
+ ## The Problem
9
+
10
+ Every MCP tool call dumps raw data into your context window. A Playwright snapshot costs 56 KB. Twenty GitHub issues cost 59 KB. One access log — 45 KB. After 30 minutes, 40% of your context is gone. And when the agent compacts the conversation to free space, it forgets which files it was editing, what tasks are in progress, and what you last asked for.
9
11
 
10
- Inspired by Cloudflare's [Code Mode](https://blog.cloudflare.com/code-mode-mcp/) which compresses tool definitions from millions of tokens into ~1,000 — we asked: what about the other direction?
12
+ Context Mode is an MCP server that solves both halves of this problem:
11
13
 
12
- Context Mode is an MCP server that sits between Claude Code and these outputs. **315 KB becomes 5.4 KB. 98% reduction.**
14
+ 1. **Context Saving** Sandbox tools keep raw data out of the context window. 315 KB becomes 5.4 KB. 98% reduction.
15
+ 2. **Session Continuity** — Every file edit, git operation, task, error, and user decision is tracked in SQLite. When the conversation compacts, context-mode doesn't dump this data back into context — it indexes events into FTS5 and retrieves only what's relevant via BM25 search. The model picks up exactly where you left off. If you don't `--continue`, previous session data is deleted immediately — a fresh session means a clean slate.
13
16
 
14
17
  https://github.com/user-attachments/assets/07013dbf-07c0-4ef1-974a-33ea1207637b
15
18
 
16
19
  ## Install
17
20
 
21
+ <details open>
22
+ <summary><strong>Claude Code</strong></summary>
23
+
24
+ **Step 1 — Install the plugin:**
25
+
18
26
  ```bash
19
- /plugin marketplace add mksglu/claude-context-mode
20
- /plugin install context-mode@claude-context-mode
27
+ /plugin marketplace add mksglu/context-mode
28
+ /plugin install context-mode@context-mode
21
29
  ```
22
30
 
23
- Restart Claude Code. Done. This installs the MCP server + a PreToolUse hook that automatically routes tool outputs through the sandbox + slash commands for diagnostics and upgrades.
31
+ **Step 2 — Restart Claude Code.**
32
+
33
+ That's it. The plugin installs everything automatically:
34
+ - MCP server with 6 sandbox tools (`ctx_batch_execute`, `ctx_execute`, `ctx_execute_file`, `ctx_index`, `ctx_search`, `ctx_fetch_and_index`)
35
+ - PreToolUse hooks that intercept Bash, Read, WebFetch, Grep, and Task calls — nudging them toward sandbox execution
36
+ - PostToolUse, PreCompact, and SessionStart hooks for session tracking and context injection
37
+ - A `CLAUDE.md` routing instructions file auto-created in your project root
38
+ - Slash commands for diagnostics and upgrades (Claude Code only)
24
39
 
25
40
  | Command | What it does |
26
41
  |---|---|
27
- | `/context-mode:ctx-stats` | Show context savings for the current session — per-tool breakdown, tokens consumed, savings ratio. |
28
- | `/context-mode:ctx-doctor` | Run diagnostics checks runtimes, hooks, FTS5, plugin registration, npm and marketplace versions. |
29
- | `/context-mode:ctx-upgrade` | Pull latest from GitHub, rebuild, migrate cache, fix hooks. |
42
+ | `/context-mode:ctx-stats` | Context savings — per-tool breakdown, tokens consumed, savings ratio. |
43
+ | `/context-mode:ctx-doctor` | Diagnostics — runtimes, hooks, FTS5, plugin registration, versions. |
44
+ | `/context-mode:ctx-upgrade` | Pull latest, rebuild, migrate cache, fix hooks. |
30
45
 
31
- <details>
32
- <summary><strong>MCP-only install</strong> (no hooks or slash commands)</summary>
46
+ > **Note:** Slash commands are a Claude Code plugin feature. On other platforms, all three utility commands (`ctx stats`, `ctx doctor`, `ctx upgrade`) work as MCP tools — just type the command name and the model will invoke it. See [Utility Commands](#utility-commands).
47
+
48
+ **Alternative — MCP-only install** (no hooks or slash commands):
33
49
 
34
50
  ```bash
35
51
  claude mcp add context-mode -- npx -y context-mode
36
52
  ```
37
53
 
54
+ This gives you the 6 sandbox tools but without automatic routing. The model can still use them — it just won't be nudged to prefer them over raw Bash/Read/WebFetch. Good for trying it out before committing to the full plugin.
55
+
38
56
  </details>
39
57
 
40
58
  <details>
41
- <summary><strong>Local development</strong></summary>
59
+ <summary><strong>Gemini CLI</strong> <sup>(Beta)</sup></summary>
60
+
61
+ **Step 1 — Install globally:**
42
62
 
43
63
  ```bash
44
- claude --plugin-dir ./path/to/context-mode
64
+ npm install -g context-mode
65
+ ```
66
+
67
+ **Step 2 — Register the MCP server.** Add to `~/.gemini/settings.json`:
68
+
69
+ ```json
70
+ {
71
+ "mcpServers": {
72
+ "context-mode": {
73
+ "command": "context-mode"
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ **Step 3 — Add hooks.** Without hooks, the model can ignore routing instructions and dump raw output into your context window. Hooks intercept every tool call and enforce sandbox routing programmatically — blocking `curl`, `wget`, and other data-heavy commands before they execute. Add to the same `~/.gemini/settings.json`:
80
+
81
+ ```json
82
+ {
83
+ "hooks": {
84
+ "BeforeTool": [
85
+ {
86
+ "matcher": "",
87
+ "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli beforetool" }]
88
+ }
89
+ ],
90
+ "AfterTool": [
91
+ {
92
+ "matcher": "",
93
+ "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli aftertool" }]
94
+ }
95
+ ],
96
+ "SessionStart": [
97
+ {
98
+ "matcher": "",
99
+ "hooks": [{ "type": "command", "command": "context-mode hook gemini-cli sessionstart" }]
100
+ }
101
+ ]
102
+ }
103
+ }
45
104
  ```
46
105
 
106
+ **Step 4 — Restart Gemini CLI.** On first run, a `GEMINI.md` routing instructions file is auto-created in your project root. This works alongside hooks as a parallel enforcement layer — hooks block dangerous commands programmatically, while `GEMINI.md` teaches the model to prefer sandbox tools from the start.
107
+
108
+ > **Why hooks matter:** Without hooks, context-mode relies on `GEMINI.md` instructions alone (~60% compliance). The model sometimes follows them, but regularly runs raw `curl`, reads large files directly, or dumps unprocessed output into context — a single unrouted Playwright snapshot (56 KB) wipes out an entire session's savings. With hooks, every tool call is intercepted before execution — dangerous commands are blocked, and routing guidance is injected in real-time. This is the difference between ~60% and ~98% context savings.
109
+
110
+ Full hook config including PreCompress: [`configs/gemini-cli/settings.json`](configs/gemini-cli/settings.json)
111
+
47
112
  </details>
48
113
 
49
- ## The Problem
114
+ <details>
115
+ <summary><strong>VS Code Copilot</strong> <sup>(Beta)</sup></summary>
50
116
 
51
- MCP has become the standard way for AI agents to use external tools. But there is a tension at its core: every tool interaction fills the context window from both sides definitions on the way in, raw output on the way out.
117
+ **Step 1Install globally:**
52
118
 
53
- With [81+ tools active, 143K tokens (72%) get consumed before your first message](https://scottspence.com/posts/optimising-mcp-server-context-usage-in-claude-code). And then the tools start returning data. A single Playwright snapshot burns 56 KB. A `gh issue list` dumps 59 KB. Run a test suite, read a log file, fetch documentation — each response eats into what remains.
119
+ ```bash
120
+ npm install -g context-mode
121
+ ```
54
122
 
55
- Code Mode showed that tool definitions can be compressed by 99.9%. Context Mode applies the same principle to tool outputs — processing them in sandboxes so only summaries reach the model.
123
+ **Step 2 Register the MCP server.** Create `.vscode/mcp.json` in your project root:
124
+
125
+ ```json
126
+ {
127
+ "servers": {
128
+ "context-mode": {
129
+ "command": "context-mode"
130
+ }
131
+ }
132
+ }
133
+ ```
134
+
135
+ **Step 3 — Add hooks.** Without hooks, the model can bypass routing and dump raw output into your context. Hooks intercept every tool call and enforce sandbox routing programmatically. Create `.github/hooks/context-mode.json`:
136
+
137
+ ```json
138
+ {
139
+ "hooks": {
140
+ "PreToolUse": [
141
+ { "type": "command", "command": "context-mode hook vscode-copilot pretooluse" }
142
+ ],
143
+ "PostToolUse": [
144
+ { "type": "command", "command": "context-mode hook vscode-copilot posttooluse" }
145
+ ],
146
+ "SessionStart": [
147
+ { "type": "command", "command": "context-mode hook vscode-copilot sessionstart" }
148
+ ]
149
+ }
150
+ }
151
+ ```
152
+
153
+ **Step 4 — Restart VS Code.** On first run, a `.github/copilot-instructions.md` routing instructions file is auto-created in your project. This works alongside hooks as a parallel enforcement layer — hooks intercept tool calls programmatically, while `copilot-instructions.md` guides the model's tool selection from session start.
154
+
155
+ > **Why hooks matter:** Without hooks, `copilot-instructions.md` guides the model but can't block commands. A single unrouted Playwright snapshot (56 KB) or `gh issue list` (59 KB) wipes out minutes of context savings. With hooks, these calls are intercepted and redirected to the sandbox before they execute.
156
+
157
+ Full hook config including PreCompact: [`configs/vscode-copilot/hooks.json`](configs/vscode-copilot/hooks.json)
158
+
159
+ </details>
160
+
161
+ <details>
162
+ <summary><strong>OpenCode</strong> <sup>(Beta)</sup></summary>
163
+
164
+ **Step 1 — Install globally:**
165
+
166
+ ```bash
167
+ npm install -g context-mode
168
+ ```
169
+
170
+ **Step 2 — Register the MCP server and plugin.** OpenCode uses a TypeScript plugin paradigm instead of JSON hooks. Add both the MCP server and the plugin to `opencode.json` in your project root:
171
+
172
+ ```json
173
+ {
174
+ "$schema": "https://opencode.ai/config.json",
175
+ "mcp": {
176
+ "context-mode": {
177
+ "type": "local",
178
+ "command": ["context-mode"]
179
+ }
180
+ },
181
+ "plugin": ["context-mode"]
182
+ }
183
+ ```
184
+
185
+ The `mcp` entry gives you the 6 sandbox tools. The `plugin` entry enables hooks — OpenCode calls the plugin's TypeScript functions directly before and after each tool execution, blocking dangerous commands (like raw `curl`) and enforcing sandbox routing.
186
+
187
+ **Step 3 — Restart OpenCode.** On first run, an `AGENTS.md` routing instructions file is auto-created in your project root. This works alongside the plugin as a parallel enforcement layer — the plugin intercepts tool calls at runtime, while `AGENTS.md` guides the model's tool preferences from session start.
188
+
189
+ > **Why the plugin matters:** Without the `plugin` entry, context-mode has no way to intercept tool calls. The model can run raw `curl`, read large files directly, or dump unprocessed output into context — ignoring `AGENTS.md` instructions. With the plugin, `tool.execute.before` fires on every tool call and blocks or redirects data-heavy commands before they execute. The `experimental.session.compacting` hook builds and injects resume snapshots when the conversation compacts, preserving session state.
190
+ >
191
+ > Note: OpenCode's SessionStart hook is not yet available ([#14808](https://github.com/sst/opencode/issues/14808)), so startup/resume session restore is not supported — the `AGENTS.md` file is the primary way context-mode instructions reach the model at session start. Compaction recovery works fully via the plugin.
192
+
193
+ </details>
194
+
195
+ <details>
196
+ <summary><strong>Codex CLI</strong> <sup>(Beta)</sup></summary>
197
+
198
+ **Step 1 — Install globally:**
199
+
200
+ ```bash
201
+ npm install -g context-mode
202
+ ```
203
+
204
+ **Step 2 — Register the MCP server.** Add to `~/.codex/config.toml`:
205
+
206
+ ```toml
207
+ [mcp_servers.context-mode]
208
+ command = "context-mode"
209
+ ```
210
+
211
+ **Step 3 — Restart Codex CLI.** On first run, an `AGENTS.md` routing instructions file is auto-created in your project root. Codex CLI reads `AGENTS.md` automatically and learns to prefer context-mode sandbox tools.
212
+
213
+ **About hooks:** Codex CLI does not support hooks — PRs [#2904](https://github.com/openai/codex/pull/2904) and [#9796](https://github.com/openai/codex/pull/9796) were closed without merge. The `AGENTS.md` routing instructions file is the only enforcement method (~60% compliance). The model receives the instructions at session start and sometimes follows them, but there is no programmatic interception — it can run raw `curl`, read large files, or bypass sandbox tools at any time.
214
+
215
+ For stronger enforcement, you can also add the instructions globally:
216
+
217
+ ```bash
218
+ cp ~/.codex/AGENTS.md # auto-created, or copy from node_modules/context-mode/configs/codex/AGENTS.md
219
+ ```
220
+
221
+ Global `~/.codex/AGENTS.md` applies to all projects. Project-level `./AGENTS.md` applies to the current project only. If both exist, Codex CLI merges them.
222
+
223
+ </details>
56
224
 
57
225
  ## Tools
58
226
 
59
227
  | Tool | What it does | Context saved |
60
228
  |---|---|---|
61
- | `batch_execute` | Run multiple commands + search multiple queries in ONE call. | 986 KB → 62 KB |
62
- | `execute` | Run code in 10 languages. Only stdout enters context. | 56 KB → 299 B |
63
- | `execute_file` | Process files in sandbox. Raw content never leaves. | 45 KB → 155 B |
64
- | `index` | Chunk markdown into FTS5 with BM25 ranking. | 60 KB → 40 B |
65
- | `search` | Query indexed content with multiple queries in one call. | On-demand retrieval |
66
- | `fetch_and_index` | Fetch URL, detect content type (HTML/JSON/text), chunk and index. | 60 KB → 40 B |
229
+ | `ctx_batch_execute` | Run multiple commands + search multiple queries in ONE call. | 986 KB → 62 KB |
230
+ | `ctx_execute` | Run code in 11 languages. Only stdout enters context. | 56 KB → 299 B |
231
+ | `ctx_execute_file` | Process files in sandbox. Raw content never leaves. | 45 KB → 155 B |
232
+ | `ctx_index` | Chunk markdown into FTS5 with BM25 ranking. | 60 KB → 40 B |
233
+ | `ctx_search` | Query indexed content with multiple queries in one call. | On-demand retrieval |
234
+ | `ctx_fetch_and_index` | Fetch URL, detect content type (HTML/JSON/text), chunk and index. | 60 KB → 40 B |
235
+ | `ctx_stats` | Show context savings, call counts, and session statistics. | — |
236
+ | `ctx_doctor` | Diagnose installation: runtimes, hooks, FTS5, versions. | — |
237
+ | `ctx_upgrade` | Upgrade to latest version from GitHub, rebuild, reconfigure hooks. | — |
67
238
 
68
239
  ## How the Sandbox Works
69
240
 
70
- Each `execute` call spawns an isolated subprocess with its own process boundary. Scripts can't access each other's memory or state. The subprocess runs your code, captures stdout, and only that stdout enters the conversation context. The raw data — log files, API responses, snapshots — never leaves the sandbox.
241
+ Each `ctx_execute` call spawns an isolated subprocess with its own process boundary. Scripts can't access each other's memory or state. The subprocess runs your code, captures stdout, and only that stdout enters the conversation context. The raw data — log files, API responses, snapshots — never leaves the sandbox.
71
242
 
72
243
  Eleven language runtimes are available: JavaScript, TypeScript, Python, Shell, Ruby, Go, Rust, PHP, Perl, R, and Elixir. Bun is auto-detected for 3-5x faster JS/TS execution.
73
244
 
@@ -77,11 +248,11 @@ When output exceeds 5 KB and an `intent` is provided, Context Mode switches to i
77
248
 
78
249
  ## How the Knowledge Base Works
79
250
 
80
- The `index` tool chunks markdown content by headings while keeping code blocks intact, then stores them in a **SQLite FTS5** (Full-Text Search 5) virtual table. Search uses **BM25 ranking** — a probabilistic relevance algorithm that scores documents based on term frequency, inverse document frequency, and document length normalization. **Porter stemming** is applied at index time so "running", "runs", and "ran" match the same stem.
251
+ The `ctx_index` tool chunks markdown content by headings while keeping code blocks intact, then stores them in a **SQLite FTS5** (Full-Text Search 5) virtual table. Search uses **BM25 ranking** — a probabilistic relevance algorithm that scores documents based on term frequency, inverse document frequency, and document length normalization. **Porter stemming** is applied at index time so "running", "runs", and "ran" match the same stem.
81
252
 
82
- When you call `search`, it returns relevant content snippets focused around matching query terms — not full documents, not approximations, the actual indexed content with smart extraction around what you're looking for. `fetch_and_index` extends this to URLs: fetch, convert HTML to markdown, chunk, index. The raw page never enters context.
253
+ When you call `ctx_search`, it returns relevant content snippets focused around matching query terms — not full documents, not approximations, the actual indexed content with smart extraction around what you're looking for. `ctx_fetch_and_index` extends this to URLs: fetch, convert HTML to markdown, chunk, index. The raw page never enters context.
83
254
 
84
- ## Fuzzy Search
255
+ ### Fuzzy Search
85
256
 
86
257
  Search uses a three-layer fallback to handle typos, partial terms, and substring matches:
87
258
 
@@ -89,63 +260,180 @@ Search uses a three-layer fallback to handle typos, partial terms, and substring
89
260
  - **Layer 2 — Trigram substring**: FTS5 trigram tokenizer matches partial strings. "useEff" finds "useEffect", "authenticat" finds "authentication".
90
261
  - **Layer 3 — Fuzzy correction**: Levenshtein distance corrects typos before re-searching. "kuberntes" → "kubernetes", "autentication" → "authentication".
91
262
 
92
- The `searchWithFallback` method cascades through all three layers and annotates results with `matchLayer` so you know which layer resolved the query.
93
-
94
- ## Smart Snippets
95
-
96
- Search results use intelligent extraction instead of truncation. Instead of returning the first N characters (which might miss the important part), Context Mode finds where your query terms appear in the content and returns windows around those matches. If your query is "authentication JWT token", you get the paragraphs where those terms actually appear — not an arbitrary prefix.
263
+ ### Smart Snippets
97
264
 
98
- ## Progressive Search Throttling
265
+ Search results use intelligent extraction instead of truncation. Instead of returning the first N characters (which might miss the important part), Context Mode finds where your query terms appear in the content and returns windows around those matches.
99
266
 
100
- The `search` tool includes progressive throttling to prevent context flooding from excessive individual calls:
267
+ ### Progressive Throttling
101
268
 
102
269
  - **Calls 1-3:** Normal results (2 per query)
103
270
  - **Calls 4-8:** Reduced results (1 per query) + warning
104
- - **Calls 9+:** Blocked — redirects to `batch_execute`
271
+ - **Calls 9+:** Blocked — redirects to `ctx_batch_execute`
105
272
 
106
- This encourages batching queries via `search(queries: ["q1", "q2", "q3"])` or `batch_execute` instead of making dozens of individual calls.
273
+ ## Session Continuity
107
274
 
108
- ## Session Stats
275
+ When the context window fills up, the agent compacts the conversation — dropping older messages to make room. Without session tracking, the model forgets which files it was editing, what tasks are in progress, what errors were resolved, and what you last asked for.
109
276
 
110
- The `stats` tool tracks context consumption in real-time. Network I/O inside the sandbox is automatically tracked for JS/TS executions.
277
+ Context Mode captures every meaningful event during your session and persists them in a per-project SQLite database. When the conversation compacts (or you resume with `--continue`), your working state is rebuilt automatically the model continues from your last prompt without asking you to repeat anything.
111
278
 
112
- | Metric | Value |
113
- |---|---|
114
- | Session | 1.4 min |
115
- | Tool calls | 1 |
116
- | Total data processed | **9.6MB** |
117
- | Kept in sandbox | **9.6MB** |
118
- | Entered context | 0.3KB |
119
- | Tokens consumed | ~82 |
120
- | **Context savings** | **24,576.0x (99% reduction)** |
121
-
122
- | Tool | Calls | Context | Tokens |
279
+ Session continuity requires 4 hooks working together:
280
+
281
+ | Hook | Role | Claude Code | Gemini CLI | VS Code Copilot | OpenCode | Codex CLI |
282
+ |---|---|:---:|:---:|:---:|:---:|:---:|
283
+ | **PostToolUse** | Captures events after each tool call | Yes | Yes | Yes | Plugin | -- |
284
+ | **UserPromptSubmit** | Captures user decisions and corrections | Yes | -- | -- | -- | -- |
285
+ | **PreCompact** | Builds snapshot before compaction | Yes | Yes | Yes | Plugin | -- |
286
+ | **SessionStart** | Restores state after compaction | Yes | Yes | Yes | -- | -- |
287
+ | | **Session completeness** | **Full** | **High** | **High** | **High** | **--** |
288
+
289
+ > **Note:** Full session continuity (capture + snapshot + restore) works on **Claude Code**, **Gemini CLI**, **VS Code Copilot**, and **OpenCode**. OpenCode uses the `experimental.session.compacting` plugin hook for compaction recovery — SessionStart is not yet available ([#14808](https://github.com/sst/opencode/issues/14808)), so startup/resume is not supported. Codex CLI has no hook support, so session tracking is not available.
290
+
291
+ <details>
292
+ <summary><strong>What gets captured</strong></summary>
293
+
294
+ Every tool call passes through hooks that extract structured events:
295
+
296
+ | Category | Events | Priority | Captured By |
123
297
  |---|---|---|---|
124
- | execute | 1 | 0.3KB | ~82 |
125
- | **Total** | **1** | **0.3KB** | **~82** |
298
+ | **Files** | read, edit, write, glob, grep | Critical (P1) | PostToolUse |
299
+ | **Tasks** | create, update, complete | Critical (P1) | PostToolUse |
300
+ | **Rules** | CLAUDE.md / GEMINI.md / AGENTS.md paths + content | Critical (P1) | SessionStart |
301
+ | **Decisions** | User corrections, preferences ("use X instead", "don't do Y") | High (P2) | UserPromptSubmit |
302
+ | **Git** | checkout, commit, merge, rebase, stash, push, pull, diff, status | High (P2) | PostToolUse |
303
+ | **Errors** | Tool failures, non-zero exit codes | High (P2) | PostToolUse |
304
+ | **Environment** | cwd changes, venv, nvm, conda, package installs | High (P2) | PostToolUse |
305
+ | **MCP Tools** | All `mcp__*` tool calls with usage counts | Normal (P3) | PostToolUse |
306
+ | **Subagents** | Agent tool invocations | Normal (P3) | PostToolUse |
307
+ | **Skills** | Slash command invocations | Normal (P3) | PostToolUse |
308
+ | **Role** | Persona / behavioral directives ("act as senior engineer") | Normal (P3) | UserPromptSubmit |
309
+ | **Intent** | Session mode classification (investigate, implement, debug) | Low (P4) | UserPromptSubmit |
310
+ | **Data** | Large user-pasted data references (>1 KB) | Low (P4) | UserPromptSubmit |
311
+ | **User Prompts** | Every user message (for last-prompt restore) | Critical (P1) | UserPromptSubmit |
312
+
313
+ </details>
314
+
315
+ <details>
316
+ <summary><strong>How sessions survive compaction</strong></summary>
317
+
318
+ ```
319
+ PreCompact fires
320
+ → Read all session events from SQLite
321
+ → Build priority-tiered XML snapshot (≤2 KB)
322
+ → Store snapshot in session_resume table
323
+
324
+ SessionStart fires (source: "compact")
325
+ → Retrieve stored snapshot
326
+ → Write structured events file → auto-indexed into FTS5
327
+ → Build Session Guide with 15 categories
328
+ → Inject <session_knowledge> directive into context
329
+ → Model continues from last user prompt with full working state
330
+ ```
331
+
332
+ The snapshot is built in priority tiers — if the 2 KB budget is tight, lower-priority events (intent, MCP tool counts) are dropped first while critical state (active files, tasks, rules, decisions) is always preserved.
333
+
334
+ After compaction, the model receives a **Session Guide** — a structured narrative with actionable sections:
335
+
336
+ - **Last Request** — user's last prompt, so the model continues without asking "what were we doing?"
337
+ - **Tasks** — checkbox format with completion status (`[x]` completed, `[ ]` pending)
338
+ - **Key Decisions** — user corrections and preferences ("use X instead", "don't do Y")
339
+ - **Files Modified** — all files touched during the session
340
+ - **Unresolved Errors** — errors that haven't been fixed
341
+ - **Git** — operations performed (checkout, commit, push, status)
342
+ - **Project Rules** — CLAUDE.md / GEMINI.md / AGENTS.md paths
343
+ - **MCP Tools Used** — tool names with call counts
344
+ - **Subagent Tasks** — delegated work summaries
345
+ - **Skills Used** — slash commands invoked
346
+ - **Environment** — working directory, env variables
347
+ - **Data References** — large data pasted during the session
348
+ - **Session Intent** — mode classification (implement, investigate, review, discuss)
349
+ - **User Role** — behavioral directives set during the session
350
+
351
+ Detailed event data is also indexed into FTS5 for on-demand retrieval via `search()`.
352
+
353
+ </details>
354
+
355
+ <details>
356
+ <summary><strong>Per-platform details</strong></summary>
357
+
358
+ **Claude Code** — Full session support. All 5 hook types fire, capturing tool events, user decisions, building compaction snapshots, and restoring state after compaction or `--continue`.
126
359
 
127
- > Without context-mode, **9.6MB** of raw tool output would flood your context window. Instead, **9.6MB** (99%) stayed in sandboxsaving **~2,457,600 tokens** of context space.
360
+ **Gemini CLI** High coverage. PostToolUse (AfterTool), PreCompact (PreCompress), and SessionStart all fire. Missing UserPromptSubmit, so user decisions and corrections aren't captured but file edits, git ops, errors, and tasks are fully tracked.
128
361
 
129
- ## Subagent Routing
362
+ **VS Code Copilot** — High coverage. Same as Gemini CLI — PostToolUse, PreCompact, and SessionStart all fire. User decisions aren't captured but all tool-level events are.
130
363
 
131
- When installed as a plugin, Context Mode includes a PreToolUse hook that automatically injects routing instructions into subagent (Task tool) prompts. Subagents learn to use `batch_execute` as their primary tool and `search(queries: [...])` for follow-ups without any manual configuration.
364
+ **OpenCode** Partial. The TypeScript plugin captures PostToolUse events via `tool.execute.after`, but SessionStart is not yet available ([#14808](https://github.com/sst/opencode/issues/14808)). Events are stored but not automatically restored after compaction. The `AGENTS.md` routing instructions file compensates by re-teaching tool preferences at each session start.
132
365
 
133
- Bash subagents are automatically upgraded to `general-purpose` so they can access MCP tools. Without this, a `subagent_type: "Bash"` agent only has the Bash tool — it can't call `batch_execute` or `search`, and all raw output floods context.
366
+ **Codex CLI** No session support. No hooks means no event capture. Each compaction or new session starts fresh. The `AGENTS.md` routing instructions file is the only continuity mechanism.
134
367
 
135
- ## The Numbers
368
+ </details>
369
+
370
+ ## Platform Compatibility
371
+
372
+ | Feature | Claude Code | Gemini CLI <sup>(Beta)</sup> | VS Code Copilot <sup>(Beta)</sup> | OpenCode <sup>(Beta)</sup> | Codex CLI <sup>(Beta)</sup> |
373
+ |---|:---:|:---:|:---:|:---:|:---:|
374
+ | MCP Server | Yes | Yes | Yes | Yes | Yes |
375
+ | PreToolUse Hook | Yes | Yes | Yes | Plugin | -- |
376
+ | PostToolUse Hook | Yes | Yes | Yes | Plugin | -- |
377
+ | SessionStart Hook | Yes | Yes | Yes | -- | -- |
378
+ | Can Modify Args | Yes | Yes | Yes | Plugin | -- |
379
+ | Can Block Tools | Yes | Yes | Yes | Plugin | -- |
380
+ | Utility Commands (ctx) | Yes | Yes | Yes | Yes | Yes |
381
+ | Slash Commands | Yes | -- | -- | -- | -- |
382
+ | Plugin Marketplace | Yes | -- | -- | -- | -- |
383
+
384
+ > **OpenCode** uses a TypeScript plugin paradigm — hooks run as in-process functions via `tool.execute.before`, `tool.execute.after`, and `experimental.session.compacting`, providing the same routing enforcement and session continuity as shell-based hooks. SessionStart is not yet available ([#14808](https://github.com/sst/opencode/issues/14808)), but compaction recovery works via the plugin's compacting hook.
385
+ >
386
+ > **Codex CLI** does not support hooks. It relies solely on routing instruction files (`AGENTS.md`) for enforcement (~60% compliance).
387
+
388
+ ### Routing Enforcement
389
+
390
+ Hooks intercept tool calls programmatically — they can block dangerous commands and redirect them to the sandbox before execution. Instruction files guide the model via prompt instructions but cannot block anything. **Always enable hooks where supported.**
136
391
 
137
- Measured across real-world scenarios:
392
+ | Platform | Hooks | Instruction File | With Hooks | Without Hooks |
393
+ |---|:---:|---|:---:|:---:|
394
+ | Claude Code | Yes (auto) | [`CLAUDE.md`](configs/claude-code/CLAUDE.md) | **~98% saved** | ~60% saved |
395
+ | Gemini CLI | Yes | [`GEMINI.md`](configs/gemini-cli/GEMINI.md) | **~98% saved** | ~60% saved |
396
+ | VS Code Copilot | Yes | [`copilot-instructions.md`](configs/vscode-copilot/copilot-instructions.md) | **~98% saved** | ~60% saved |
397
+ | OpenCode | Plugin | [`AGENTS.md`](configs/opencode/AGENTS.md) | **~98% saved** | ~60% saved |
398
+ | Codex CLI | -- | [`AGENTS.md`](configs/codex/AGENTS.md) | -- | ~60% saved |
138
399
 
139
- **Playwright snapshot** 56.2 KB raw 299 B context (99% saved)
140
- **GitHub Issues (20)** — 58.9 KB raw → 1.1 KB context (98% saved)
141
- **Access log (500 requests)** 45.1 KB raw → 155 B context (100% saved)
142
- **Context7 React docs** — 5.9 KB raw → 261 B context (96% saved)
143
- **Analytics CSV (500 rows)** — 85.5 KB raw → 222 B context (100% saved)
144
- **Git log (153 commits)** — 11.6 KB raw → 107 B context (99% saved)
145
- **Test output (30 suites)** — 6.0 KB raw 337 B context (95% saved)
146
- **Repo research (subagent)** — 986 KB raw → 62 KB context (94% saved, 5 calls vs 37)
400
+ Without hooks, one unrouted `curl` or Playwright snapshot can dump 56 KB into context wiping out an entire session's worth of savings.
401
+
402
+ See [`docs/platform-support.md`](docs/platform-support.md) for the full capability comparison.
403
+
404
+ ## Utility Commands
405
+
406
+ **Inside any AI session** — just type the command. The LLM calls the MCP tool automatically:
407
+
408
+ ```
409
+ ctx stats → context savings, call counts, session report
410
+ ctx doctor → diagnose runtimes, hooks, FTS5, versions
411
+ ctx upgrade → update from GitHub, rebuild, reconfigure hooks
412
+ ```
147
413
 
148
- Over a full session: 315 KB of raw output becomes 5.4 KB. Session time before slowdown goes from ~30 minutes to ~3 hours. Context remaining after 45 minutes: 99% instead of 60%.
414
+ **From your terminal** run directly without an AI session:
415
+
416
+ ```bash
417
+ context-mode doctor
418
+ context-mode upgrade
419
+ ```
420
+
421
+ Works on **all platforms**. On Claude Code, slash commands (`/ctx-stats`, `/ctx-doctor`, `/ctx-upgrade`) are also available.
422
+
423
+ ## Benchmarks
424
+
425
+ | Scenario | Raw | Context | Saved |
426
+ |---|---|---|---|
427
+ | Playwright snapshot | 56.2 KB | 299 B | 99% |
428
+ | GitHub Issues (20) | 58.9 KB | 1.1 KB | 98% |
429
+ | Access log (500 requests) | 45.1 KB | 155 B | 100% |
430
+ | Context7 React docs | 5.9 KB | 261 B | 96% |
431
+ | Analytics CSV (500 rows) | 85.5 KB | 222 B | 100% |
432
+ | Git log (153 commits) | 11.6 KB | 107 B | 99% |
433
+ | Test output (30 suites) | 6.0 KB | 337 B | 95% |
434
+ | Repo research (subagent) | 986 KB | 62 KB | 94% |
435
+
436
+ Over a full session: 315 KB of raw output becomes 5.4 KB. Session time extends from ~30 minutes to ~3 hours.
149
437
 
150
438
  [Full benchmark data with 21 scenarios →](BENCHMARK.md)
151
439
 
@@ -185,26 +473,20 @@ Fetch the React useEffect docs, index them, and find the cleanup pattern
185
473
  with code examples. Then run /context-mode:ctx-stats.
186
474
  ```
187
475
 
476
+ **Session continuity** — compaction recovery with full state
477
+ ```
478
+ Start a multi-step task: "Create a REST API with Express — add routes, tests,
479
+ and error handling." After 20+ tool calls, type: ctx stats to see the session
480
+ event count. When context compacts, the model continues from your last prompt
481
+ with tasks, files, and decisions intact — no re-prompting needed.
482
+ ```
483
+
188
484
  ## Security
189
485
 
190
- Context Mode enforces the same permission rules you already use in Claude Code — but extends them to the MCP sandbox. If you block `sudo` in Claude Code, it's also blocked inside `execute`, `execute_file`, and `batch_execute`.
486
+ Context Mode enforces the same permission rules you already use — but extends them to the MCP sandbox. If you block `sudo`, it's also blocked inside `ctx_execute`, `ctx_execute_file`, and `ctx_batch_execute`.
191
487
 
192
488
  **Zero setup required.** If you haven't configured any permissions, nothing changes. This only activates when you add rules.
193
489
 
194
- ### Getting started
195
-
196
- Find your settings file:
197
-
198
- ```bash
199
- # macOS / Linux
200
- cat ~/.claude/settings.json
201
-
202
- # Windows
203
- type %USERPROFILE%\.claude\settings.json
204
- ```
205
-
206
- Add a `permissions` section (keep your existing settings, just add this block). Then restart Claude Code.
207
-
208
490
  ```json
209
491
  {
210
492
  "permissions": {
@@ -222,120 +504,23 @@ Add a `permissions` section (keep your existing settings, just add this block).
222
504
  }
223
505
  ```
224
506
 
225
- The pattern is `Tool(what to match)` where `*` means "anything".
226
-
227
- <details>
228
- <summary><strong>Common deny patterns</strong> (click to expand)</summary>
507
+ Add this to your project's `.claude/settings.json` (or `~/.claude/settings.json` for global rules). All platforms read security policies from Claude Code's settings format — even on Gemini CLI, VS Code Copilot, and OpenCode. Codex CLI has no hook support, so security enforcement is not available.
229
508
 
230
- **Dangerous commands:**
231
- ```
232
- "Bash(sudo *)" — block all sudo commands
233
- "Bash(rm -rf /*)" — block recursive delete from root
234
- "Bash(chmod 777 *)" — block open permissions
235
- "Bash(shutdown *)" — block shutdown/reboot
236
- "Bash(kill -9 *)" — block force kill
237
- "Bash(mkfs *)" — block filesystem format
238
- "Bash(dd *)" — block disk write
239
- ```
240
-
241
- **Network access:**
242
- ```
243
- "Bash(curl *)" — block curl
244
- "Bash(wget *)" — block wget
245
- "Bash(ssh *)" — block ssh connections
246
- "Bash(scp *)" — block secure copy
247
- "Bash(nc *)" — block netcat
248
- ```
249
-
250
- **Package managers and deploys:**
251
- ```
252
- "Bash(npm publish *)" — block npm publish
253
- "Bash(docker push *)" — block docker push
254
- "Bash(pip install *)" — block pip install
255
- "Bash(brew install *)" — block brew install
256
- "Bash(apt install *)" — block apt install
257
- "Bash(wrangler deploy *)" — block Cloudflare deploys
258
- "Bash(terraform apply *)" — block terraform apply
259
- "Bash(kubectl delete *)" — block k8s delete
260
- ```
261
-
262
- **Sensitive files:**
263
- ```
264
- "Read(.env)" — block .env in project root
265
- "Read(**/.env*)" — block .env files everywhere
266
- "Read(**/*secret*)" — block files with "secret" in the name
267
- "Read(**/*credential*)" — block credential files
268
- "Read(**/*.pem)" — block private keys
269
- "Read(**/*id_rsa*)" — block SSH keys
270
- ```
271
-
272
- </details>
273
-
274
- <details>
275
- <summary><strong>Common allow patterns</strong> (click to expand)</summary>
276
-
277
- ```
278
- "Bash(git:*)" — allow git (with or without args)
279
- "Bash(npm:*)" — allow npm
280
- "Bash(npx:*)" — allow npx
281
- "Bash(node:*)" — allow node
282
- "Bash(python:*)" — allow python
283
- "Bash(ls:*)" — allow ls
284
- "Bash(cat:*)" — allow cat
285
- "Bash(echo:*)" — allow echo
286
- "Bash(grep:*)" — allow grep
287
- "Bash(make:*)" — allow make
288
- ```
289
-
290
- </details>
291
-
292
- ### Chained commands
293
-
294
- Commands chained with `&&`, `;`, or `|` are split — each part is checked separately:
295
-
296
- ```
297
- echo hello && sudo rm -rf /tmp
298
- ```
299
-
300
- Blocked. Even though it starts with `echo`, the `sudo` part matches the deny rule.
301
-
302
- ### Where to put rules
303
-
304
- Rules can go in three places (checked in this order):
509
+ The pattern is `Tool(what to match)` where `*` means "anything".
305
510
 
306
- 1. `.claude/settings.local.json` this project only (gitignored)
307
- 2. `.claude/settings.json` — this project, shared with team
308
- 3. `~/.claude/settings.json` — all projects
511
+ Commands chained with `&&`, `;`, or `|` are split — each part is checked separately. `echo hello && sudo rm -rf /tmp` is blocked because the `sudo` part matches the deny rule.
309
512
 
310
513
  **deny** always wins over **allow**. More specific (project-level) rules override global ones.
311
514
 
312
- ## Requirements
313
-
314
- - **Node.js 18+**
315
- - **Claude Code** with MCP support
316
- - Optional: Bun (auto-detected, 3-5x faster JS/TS)
317
-
318
515
  ## Contributing
319
516
 
320
- We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for the full local development workflow, TDD guidelines, and how to test your changes in a live Claude Code session.
517
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for the development workflow and TDD guidelines.
321
518
 
322
519
  ```bash
323
- git clone https://github.com/mksglu/claude-context-mode.git
324
- cd claude-context-mode && npm install
325
- npm test # run tests
326
- npm run test:all # full suite
520
+ git clone https://github.com/mksglu/context-mode.git
521
+ cd context-mode && npm install && npm test
327
522
  ```
328
523
 
329
- ## Contributors
330
-
331
- <a href="https://github.com/mksglu/claude-context-mode/graphs/contributors">
332
- <img src="https://contrib.rocks/image?repo=mksglu/claude-context-mode&columns=8&anon=1" />
333
- </a>
334
-
335
- ### Special Thanks
336
-
337
- <a href="https://github.com/mksglu/claude-context-mode/issues/15"><img src="https://github.com/vaban-ru.png" width="32" /></a>
338
-
339
524
  ## License
340
525
 
341
526
  [Elastic License 2.0 (ELv2)](LICENSE) — free to use, modify, and share. You may not rebrand and redistribute this software as a competing plugin, product, or managed service.