HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mksglu
context-mode
JavaScript2026–2026
mksglu / context-mode

context-mode

Free, local plugin that keeps tool output out of your coding agent's context window. Sandbox and SQLite FTS5 search, 99% fewer bytes in context. Works with Claude Code, Codex, Pi, OpenCode, Gemini CLI, Copilot CLI and 4 more agents. Zero telemetry.

9Distinct people
13Mentions
0Explicit recommenders
34KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Free, local plugin that keeps tool output out of your coding agent's context window. Sandbox and SQLite FTS5 search, 99% fewer bytes in context. Works with Claude Code, Codex, Pi, OpenCode, Gemini CLI, Copilot CLI and 4 more agents. Zero telemetry.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 4:00:59 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month13 dated mentions

Observed mentions: 2026-02-25 06:23:30 UTC to 2026-11-01 11:56:19 UTC.

0123452026-02-01 00:00:00 UTC to 2026-03-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 commentsFeb 20262026-03-01 00:00:00 UTC to 2026-04-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-04-01 00:00:00 UTC to 2026-05-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2026-05-01 00:00:00 UTC to 2026-06-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-06-01 00:00:00 UTC to 2026-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJun 20262026-07-01 00:00:00 UTC to 2026-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-08-01 00:00:00 UTC to 2026-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-09-01 00:00:00 UTC to 2026-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-10-01 00:00:00 UTC to 2026-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-11-01 00:00:00 UTC to 2026-12-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments. Incomplete calendar period.Nov 2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Feb 20262026-02-01 00:00:00 UTC2026-03-01 00:00:00 UTC523
Mar 20262026-03-01 00:00:00 UTC2026-04-01 00:00:00 UTC101
Apr 20262026-04-01 00:00:00 UTC2026-05-01 00:00:00 UTC404
May 20262026-05-01 00:00:00 UTC2026-06-01 00:00:00 UTC202
Jun 20262026-06-01 00:00:00 UTC2026-07-01 00:00:00 UTC000
Jul 20262026-07-01 00:00:00 UTC2026-08-01 00:00:00 UTC000
Aug 20262026-08-01 00:00:00 UTC2026-09-01 00:00:00 UTC000
Sep 20262026-09-01 00:00:00 UTC2026-10-01 00:00:00 UTC000
Oct 20262026-10-01 00:00:00 UTC2026-11-01 00:00:00 UTC000
Nov 2026 (partial)2026-11-01 00:00:00 UTC2026-12-01 00:00:00 UTC110

What Hacker News says

5 sources
1st comment: 2 day old account, "is the real story here", summary -> comment -> question, general punchiness of style without saying that much. These llms feel like someone said "be an informal hacker news commenter" so they often end with "Curious how" instead of "I'm curious how" or "Worth building" instead of "It's worth building". Not that humans don't do any of this but all of it together in their comment history, you just get a general vibe. author reply: not as obvious, but for one thing yes literally em dash, their post has 10 em dashes in 748 words, this comment has 2 em dashes in 115 words. Not that em dash = ai, but in the context of a post about AI it seems more likely. And finally, https://github.com/mksglu/claude-context-mode/blob/main/cont... the file the author linked in their own repo does not exist! (https://github.com/m
Read the rest
ksglu/claude-context-mode/blob/main/src/... exists but they messed up the link?)
In MCP server that reduces Claude Code context consumption by 98%
No magic — standard Unix process inheritance. Each execute() spawns a child process via Node's child_process.spawn() with a curated env built by #buildSafeEnv (https://github.com/mksglu/claude-context-mode/blob/main/cont...). It passes through an explicit allowlist of auth vars (GH_TOKEN, AWS_ACCESS_KEY_ID, GOOGLE_APPLICATION_CREDENTIALS, KUBECONFIG, etc.) plus HOME and XDG paths so CLI tools find their config files on disk. No state persists between calls — each subprocess inherits credentials from the MCP server's environment, runs, and exits. This works because tools like gh and aws resolve auth on every invocation anyway (env vars or ~/.config files). The tradeoff is intentional: allowlist over full process.env so the sandbox doesn't leak unrelated vars.
In MCP server that reduces Claude Code context consumption by 98%
Author here. I shared the GitHub repo a few days ago (https://news.ycombinator.com/item?id=47148025) and got great feedback. This is the writeup explaining the architecture. The core idea: every MCP tool call dumps raw data into your 200K context window. Context Mode spawns isolated subprocesses — only stdout enters context. No LLM calls, purely algorithmic: SQLite FTS5 with BM25 ranking and Porter stemming. Since the last post we've seen 228 stars and some real-world usage data. The biggest surprise was how much subagent routing matters — auto-upgrading Bash subagents to general-purpose so they can use batch_execute instead of flooding context with raw output. Source: https://github.com/mksglu/claude-context-mode Happy to answer any architecture questions.
In MCP server that reduces Claude Code context consumption by 98%
mksglu·Feb 25, 2026Submission

Show HN: Context Mode – 315 KB of MCP output becomes 5.4 KB in Claude Code

Every MCP tool call dumps raw data into Claude Code's 200K context window. A Playwright snapshot costs 56 KB, 20 GitHub issues cost 59 KB. After 30 minutes, 40% of your context is gone. I built an MCP server that sits between Claude Code and these outputs. It processes them in sandboxes and only returns summaries. 315 KB becomes 5.4 KB. It supports 10 language runtimes, SQLite FTS5 with BM25 ranking for search, and batch execution. Session time before slowdown goes from ~30 min to ~3 hours. MIT licensed, single command install: /plugin marketplace add mksglu/claude-context-mode /plugin install context-mode@claude-context-mode Benchmarks and source: https://github.com/mksglu/claude-context-mode Would love feedback from anyone hitting context limits in Claude Code. NOTE: Because of the timezone issue, I’m resurfacing the same content here.
Read the rest
I’ve already notified support about this via email, so they’re aware. Original post: https://news.ycombinator.com/item?id=47148025
1 points · Open discussion
mksglu·Feb 25, 2026Submission

Show HN: Context Mode – 315 KB of MCP output becomes 5.4 KB in Claude Code

Every MCP tool call dumps raw data into Claude Code's 200K context window. A Playwright snapshot costs 56 KB, 20 GitHub issues cost 59 KB. After 30 minutes, 40% of your context is gone. I built an MCP server that sits between Claude Code and these outputs. It processes them in sandboxes and only returns summaries. 315 KB becomes 5.4 KB. It supports 10 language runtimes, SQLite FTS5 with BM25 ranking for search, and batch execution. Session time before slowdown goes from ~30 min to ~3 hours. MIT licensed, single command install: /plugin marketplace add mksglu/claude-context-mode /plugin install context-mode@claude-context-mode Benchmarks and source: https://github.com/mksglu/claude-context-mode Would love feedback from anyone hitting context limits in Claude Code.
84 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.