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

Summary Information

Updated 28 minutes ago
Added to GitGenius on September 1st, 2026
Created on February 23rd, 2026
Open Issues & Pull Requests: 213 (+0)
GitHub issues: Enabled
Number of forks: 1,517
Total Stargazers: 20,731 (+5)
Total Subscribers: 93 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.9 hours
Mean response time: 2.7 days
90th percentile: 6.0 days
Tracked items: 439

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 99% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Almost all tracked open issues have seen activity in the last three months. Only 10% of issues opened in the past year have been closed. Three people close 91% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 111
New in 7 days: 9
Closed in 7 days: 2
Avg open age: 35 days
Stale 30+ days: 50
Stale 90+ days: 0

Recent activity

Opened in 7 days: 5
Closed in 7 days: 1
Comments in 7 days: 5
Events in 7 days: 6

Top labels

  • enhancement (64)
  • bug (61)
  • v1.0.0 (12)
  • next (10)
  • help wanted (3)
  • question (2)
  • invalid (1)
  • unplanned (1)

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.