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 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 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

13 sources
Since this site seems to have an allergy to information density and usability, here's the GH: https://github.com/mksglu/context-mode Some discussion about this from a couple of months ago: https://news.ycombinator.com/item?id=47193064 Similar tools in this space: RTK:CLI proxy that reduces LLM token consumption: https://github.com/rtk-ai/rtk 8v: One CLI for you and your AI agent. Posted here a few days ago: https://news.ycombinator.com/item?id=47914963 Headroom:The Context Optimization Layer for LLM: https://github.com/chopratejas/headroom Of these, it looks like RTK and 8v are somewhat equivalent, while headroom is complementary. Although this does perhaps go further than rtk/v8.
In Context Mode v1.0.0
I've setup one on Hetzner. I got it a dedicated email account (via agentmail.to). Installed couple of skills, last30days and context-mode being the most useful so far (https://github.com/mvanhorn/last30days-skill and https://github.com/mksglu/context-mode). The biggest unlock was wiring it up to my agency's whatsapp group - it's now basically a multiplayer chatgpt. Not a "personal" assistant, but more of agency's assistant. It can send ad hoc mails to our clients when asked, but also tells jokes when atmosphere is tense. Each day it checks it's own inbox and once a week it sends me a kind of social listening report, but those are kind of workflows easily reproducible elsewhere. I'm actually so bullish on the potential of openclaw kind of software I've built a desktop app for it, stagewhisper.io. It's like a Granola for your OpenClaw. It l
Read the rest
istens to your system audio, records your screen (all data stays on your computer) and asks your assistant for suggestions or creates a tasks. Example: client asks for referrals during a call, StageWhisper.io picks it up and asks OpenClaw to send email with case studies. It's absurdly fun to use, mainly because the delay between when the task pops up and the work starts is approaching zero.
In Ask HN: Who is using OpenClaw?
Six days ago I posted a write-up on Hacker News explaining how Context Mode reduces Claude Code's context consumption by 98%. I expected a handful of comments. I got 565 points, 107 comments, and the kind of feedback that makes you stay up until 4 AM shipping features. What's new: - Five platform adapters: Claude Code, Gemini CLI, VS Code Copilot, OpenCode, Codex CLI - Session Continuity: survives context compactions, restores state automatically (~3h sessions vs ~30 min) - ctx_batch_execute: one call replaces 30+ individual commands - Three-layer fuzzy search: Porter stemming, trigram substring, Levenshtein - FTS5 deduplication, background mode, SSL cert auto-detection Breaking: repo renamed claude-context-mode → context-mode, tools prefixed with ctx_. Install (Claude Code): /install context-mode Install (all platforms):
Read the rest
npm install -g context-mode GitHub: https://github.com/mksglu/context-mode Release notes: https://github.com/mksglu/context-mode/releases/tag/v1.0.0 Four adapters are in beta — PRs welcome. The codebase is designed for Agentic Engineering: point your coding agent at it and let it propose fixes. Thank you to everyone who commented, starred, and opened issues on the original post. You made this release happen.
In [dead]
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.