mksglu/context-mode

Context window optimization for AI coding agents. Sandboxes tool output (98% reduction), persists session memory, and enforces routing across 17 platforms...

View on GitHub ↗Jump to charts ↓Open shareable report →

mksglu/context-mode has 29k+ stars and 2k+ forks on GitHub, is written in TypeScript, and was last pushed on Oct 16, 2026. Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 35 minutes ago
Added to GitGenius on September 1st, 2026
Created on February 23rd, 2026
Open Issues & Pull Requests: 359 (+0)
GitHub issues: Disabled - open counts may still include pull requests.
Number of forks: 2,092
Total Stargazers: 29,962 (+25)
Total Subscribers: 110 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 3.3 hours
Mean response time: 4.4 days
90th percentile: 10.4 days
Tracked items: 480

Maintainer activity

3 people did triage or write work on this repository in the last 12 months.

Counts unlabeled, assigned, unassigned, milestoned, demilestoned, locked, unlocked over the last 12 months. These are issue and pull request events that require triage or write permission. Commits and code review are not counted. labeled and renamed are excluded because GitHub issue forms record the issue author as the actor. Figures from October 11, 2026. This count is not comparable across projects: each project's automation decides which of these events a person emits.

How this project is maintained

About 19% of issues opened in the past year have never received a reply. 99% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. 14% of tracked open issues have had no activity in three months. 70% of issues opened in the past year have been closed, leaving a working backlog. Three people close 90% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

GitHub issues are disabled for this repository, so issue analytics and the issue explorer are not available.

Detailed Description

Context Mode is a context window optimization tool for AI coding agents that reduces tool output bloat and maintains session continuity across multiple platforms.

The problem it addresses is that tool calls from Model Context Protocol servers dump raw, uncompressed data into the agent's context window, rapidly consuming available tokens. A single Playwright snapshot or access log can consume tens of kilobytes, and after extended sessions, a significant portion of context is lost. When agents compact conversations to reclaim space, they lose track of editing state, task progress, and user intent. Additionally, agents generate verbose filler and explanations that waste output tokens. Context Mode solves this through sandboxing tool output to achieve substantial size reduction, persisting session memory across interactions, and enforcing routing across multiple platforms via MCP servers and hooks.

The tool is designed for teams building AI coding agents who need to maximize effective context window usage. It suits projects where agents interact with external tools frequently and where maintaining coherent session state across long interactions is critical. The project explicitly positions itself as addressing "the other half of the context problem," suggesting it complements existing context management approaches rather than replacing them wholesale.

The project shows active development with ongoing refinement of its core optimization mechanisms. The codebase is maintained in TypeScript and integrates with a broad ecosystem of AI coding platforms and tools through MCP and hook-based routing. The tool has been adopted across multiple organizations, indicating real-world validation of its approach to context efficiency.