Summarizer

HN Thread Summary
1 Fetch Pages
2 Extract Text
3 Analyze Content
4 Tag Comments
5 Summarize Topics

MCP server that reduces Claude Code context consumption by 98%

87 comments · 4,680 words

Complete Created: Mar 1, 06:24 AM (00:03:29)

Models: Claude Opus 4.5 (analyze) · Gemini 3 Flash (tag) · Gemini 3 Flash (summarize)

Article URL: https://mksg.lu/blog/context-mode (757 words)

Article Summary

Context Mode is an open-source MCP server that reduces Claude Code's context window consumption by 98% by running tool outputs in isolated sandboxes instead of dumping raw data directly into context. It uses SQLite FTS5 with BM25 ranking for searchable indexing, supports 10 language runtimes, and extends session time from ~30 minutes to ~3 hours before context degradation occurs.

Comment Summary

The discussion centers on technical improvements to the approach, with commenters suggesting hybrid retrieval methods combining BM25 with vector search, questioning whether the tool actually works with MCP outputs (confirmed it doesn't intercept MCP responses), debating cache invalidation concerns, and discussing broader context management strategies like pruning failed attempts and agentic context self-management. Several users share related tools they've built for similar problems.

Topics

Raw Files

Execution Log

[2026-03-01T14:24:26.469Z] Starting step: fetch_pages (attempt 1)
[2026-03-01T14:24:26.490Z] Fetching HN page: https://news.ycombinator.com/item?id=47193064
[2026-03-01T14:24:26.663Z] Fetched HN page: 145708 bytes
[2026-03-01T14:24:26.850Z] Extracted title: MCP server that reduces Claude Code context consumption by 98%
[2026-03-01T14:24:26.867Z] Extracted linked URL: https://mksg.lu/blog/context-mode
[2026-03-01T14:24:26.883Z] Fetching linked article: https://mksg.lu/blog/context-mode
[2026-03-01T14:24:27.246Z] Fetched linked article: 38129 bytes
[2026-03-01T14:24:27.388Z] Completed step: fetch_pages in 904ms
[2026-03-01T14:24:27.498Z] Starting step: extract_text (attempt 1)
[2026-03-01T14:24:27.611Z] Extracted HN text: 34746 chars
[2026-03-01T14:24:27.741Z] Extracted 87 comments
[2026-03-01T14:24:27.827Z] Extracted linked article text: 4659 chars, 757 words
[2026-03-01T14:24:27.976Z] Comment word count: 4680
[2026-03-01T14:24:28.088Z] Completed step: extract_text in 573ms
[2026-03-01T14:24:28.200Z] Starting step: analyze_content (attempt 1)
[2026-03-01T14:24:28.288Z] Calling claude-opus-4-5-20251101 (article: 4659 chars, 87 comments)
[2026-03-01T14:24:55.935Z] Analysis complete: 19 topics, 8142 input tokens, 970 output tokens
[2026-03-01T14:24:55.965Z] Completed step: analyze_content in 27750ms
[2026-03-01T14:24:56.075Z] Starting step: tag_comments (attempt 1)
[2026-03-01T14:24:56.100Z] Tagging 87 comments with 19 topics (batch size: 50)
[2026-03-01T14:24:56.116Z] Processing batch 1/2 (50 comments)
[2026-03-01T14:25:40.305Z] Batch 1 complete: 78 tags assigned
[2026-03-01T14:25:40.320Z] Processing batch 2/2 (37 comments)
[2026-03-01T14:26:02.058Z] Batch 2 complete: 51 tags assigned
[2026-03-01T14:26:02.072Z] Tagging complete: 129 total tags, 10640 input tokens, 2005 output tokens
[2026-03-01T14:26:02.087Z] Completed step: tag_comments in 65997ms
[2026-03-01T14:26:02.204Z] Starting step: summarize_topics (attempt 1)
[2026-03-01T14:26:02.224Z] Summarizing 19 topics
[2026-03-01T14:26:02.264Z] Summarizing topic 1/19: "Hybrid Retrieval Methods # Discussion of combining BM25 with vector search using Model2Vec embeddings, sqlite-vec, and Reciprocal Rank Fusion for better handling of mixed structured and natural language data in tool outputs" (11 comments)
[2026-03-01T14:26:08.716Z] Topic 1 summarized (1378 in, 146 out)
[2026-03-01T14:26:08.742Z] Summarizing topic 2/19: "MCP Response Interception Limitations # Clarification that context-mode cannot intercept MCP tool responses because there's no PostToolUse hook in Claude Code; only built-in tools and CLI wrappers benefit from compression" (10 comments)
[2026-03-01T14:26:16.041Z] Topic 2 summarized (1199 in, 150 out)
[2026-03-01T14:26:16.064Z] Summarizing topic 3/19: "Prompt Cache Economics # Debate about whether context compression breaks prompt caching, with concerns that verbose but cached context might be cheaper than compressed context that invalidates cache" (12 comments)
[2026-03-01T14:26:24.186Z] Topic 3 summarized (1179 in, 135 out)
[2026-03-01T14:26:24.208Z] Summarizing topic 4/19: "Agentic Context Management # Ideas about models managing their own context, pruning irrelevant information, backtracking failed attempts, and treating context like git branches with cherry-picking and rebasing" (21 comments)
[2026-03-01T14:26:31.354Z] Topic 4 summarized (1753 in, 144 out)
[2026-03-01T14:26:31.376Z] Summarizing topic 5/19: "Subagent Architecture Benefits # Discussion of spawning subprocesses for work-oriented calls that don't pollute parent context, returning only summarized results to main thread" (9 comments)
[2026-03-01T14:26:38.440Z] Topic 5 summarized (1044 in, 154 out)
[2026-03-01T14:26:38.463Z] Summarizing topic 6/19: "CLI vs MCP Tradeoffs # Suggestions to use CLI tools like GitHub CLI instead of MCPs for fraction of token cost, with discussion of when each approach is appropriate" (4 comments)
[2026-03-01T14:26:43.531Z] Topic 6 summarized (365 in, 132 out)
[2026-03-01T14:26:43.556Z] Summarizing topic 7/19: "Tool Definition Compression # Reference to Cloudflare's Code Mode approach for compressing tool definitions on input side, complementing context-mode's output side compression" (3 comments)
[2026-03-01T14:26:50.211Z] Topic 7 summarized (433 in, 143 out)
[2026-03-01T14:26:50.233Z] Summarizing topic 8/19: "Incremental Indexing Performance # Discussion of hashing content for incremental re-embedding of changed chunks only, achieving 10-second updates versus 4-minute full reindexes" (2 comments)
[2026-03-01T14:26:55.464Z] Topic 8 summarized (675 in, 103 out)
[2026-03-01T14:26:55.486Z] Summarizing topic 9/19: "Extraction Script Reliability # Concerns that compressing git commits to 107 bytes requires LLM to write perfect extraction scripts upfront, risking information loss when scripts are wrong" (4 comments)
[2026-03-01T14:27:01.106Z] Topic 9 summarized (477 in, 133 out)
[2026-03-01T14:27:01.128Z] Summarizing topic 10/19: "Context Window Visibility Tools # User built claude-trace CLI to parse usage logs and break down token consumption by session, tool, project, providing measurement before optimization" (2 comments)
[2026-03-01T14:27:05.653Z] Topic 10 summarized (260 in, 116 out)
[2026-03-01T14:27:05.674Z] Summarizing topic 11/19: "Structured Data Challenges # Observations that pure BM25 underperforms on tool outputs mixing JSON, tables, config with natural language, requiring hybrid approaches" (3 comments)
[2026-03-01T14:27:10.802Z] Topic 11 summarized (478 in, 114 out)
[2026-03-01T14:27:10.824Z] Summarizing topic 12/19: "Quality vs Token Savings # Questions about whether compressed context produces equivalent output quality, noting extended sessions only matter if reasoning quality holds" (12 comments)
[2026-03-01T14:27:18.558Z] Topic 12 summarized (1031 in, 133 out)
[2026-03-01T14:27:18.579Z] Summarizing topic 13/19: "Hook Aggressiveness Concerns # Criticism that blocking all curl/wget for 56KB snapshots is excessive when many API calls return minimal data; author acknowledged and removed" (4 comments)
[2026-03-01T14:27:23.797Z] Topic 13 summarized (436 in, 117 out)
[2026-03-01T14:27:23.820Z] Summarizing topic 14/19: "Dataframe Approach for Logs # Alternative approach creating in-memory parquet dataframes with token-optimized summary views for database and log system responses" (1 comments)
[2026-03-01T14:27:29.237Z] Topic 14 summarized (313 in, 116 out)
[2026-03-01T14:27:29.259Z] Summarizing topic 15/19: "Backtracking and Pruning # Ideas for automatically detecting retry patterns and pruning failed attempts once correct solution is found, treating context as editable rather than append-only" (11 comments)
[2026-03-01T14:27:35.163Z] Topic 15 summarized (1326 in, 145 out)
[2026-03-01T14:27:35.187Z] Summarizing topic 16/19: "Cross-Platform Compatibility # Questions about support for Codex, Zed Agent, and other platforms beyond Claude Code, noting implementation should be agent-independent" (3 comments)
[2026-03-01T14:27:39.904Z] Topic 16 summarized (179 in, 79 out)
[2026-03-01T14:27:39.924Z] Summarizing topic 17/19: "Skills vs MCP Debate # Some users suggest using skills and CLI instead of injecting MCP into context, questioning whether skills running in subagents save context" (3 comments)
[2026-03-01T14:27:44.292Z] Topic 17 summarized (208 in, 106 out)
[2026-03-01T14:27:44.318Z] Summarizing topic 18/19: "Tool Count Management # Discussion of whether 80+ tools in context is the real problem, suggesting sub-agents for areas of focus rather than compressing everything" (5 comments)
[2026-03-01T14:27:49.115Z] Topic 18 summarized (371 in, 115 out)
[2026-03-01T14:27:49.137Z] Summarizing topic 19/19: "Early Internet Parallels # Observation that current coding agent optimization feels like late 1990s HTML/SQL era, with experienced engineers quickly spotting bottlenecks" (2 comments)
[2026-03-01T14:27:53.488Z] Topic 19 summarized (229 in, 108 out)
[2026-03-01T14:27:53.504Z] Summarization complete: 19 topics, 13334 input tokens, 2389 output tokens
[2026-03-01T14:27:53.518Z] Completed step: summarize_topics in 111299ms
[2026-03-01T14:27:53.557Z] Job completed successfully

LLM Invocations (Total: $0.0901)

Time Purpose Model Duration Outcome Input Output Cost
06:24 AM Generate summaries claude-opus-4-5-20251101 27.3s Success Input (8,142) Output (970) $0.0650
06:25 AM Tag comments gemini-3-flash-preview 43.9s Success Input (6,647) Output (1,163) $0.0068
06:26 AM Tag comments gemini-3-flash-preview 21.4s Success Input (3,993) Output (842) $0.0045
06:26 AM Summarize topic gemini-3-flash-preview 6.2s Success Input (1,378) Output (146) $0.0011
06:26 AM Summarize topic gemini-3-flash-preview 7.0s Success Input (1,199) Output (150) $0.0010
06:26 AM Summarize topic gemini-3-flash-preview 7.8s Success Input (1,179) Output (135) $0.0010
06:26 AM Summarize topic gemini-3-flash-preview 6.9s Success Input (1,753) Output (144) $0.0013
06:26 AM Summarize topic gemini-3-flash-preview 6.8s Success Input (1,044) Output (154) $0.0010
06:26 AM Summarize topic gemini-3-flash-preview 4.8s Success Input (365) Output (132) $0.0006
06:26 AM Summarize topic gemini-3-flash-preview 6.3s Success Input (433) Output (143) $0.0006
06:26 AM Summarize topic gemini-3-flash-preview 4.8s Success Input (675) Output (103) $0.0006
06:27 AM Summarize topic gemini-3-flash-preview 5.2s Success Input (477) Output (133) $0.0006
06:27 AM Summarize topic gemini-3-flash-preview 4.2s Success Input (260) Output (116) $0.0005
06:27 AM Summarize topic gemini-3-flash-preview 4.9s Success Input (478) Output (114) $0.0006
06:27 AM Summarize topic gemini-3-flash-preview 7.5s Success Input (1,031) Output (133) $0.0009
06:27 AM Summarize topic gemini-3-flash-preview 4.9s Success Input (436) Output (117) $0.0006
06:27 AM Summarize topic gemini-3-flash-preview 5.1s Success Input (313) Output (116) $0.0005
06:27 AM Summarize topic gemini-3-flash-preview 5.6s Success Input (1,326) Output (145) $0.0011
06:27 AM Summarize topic gemini-3-flash-preview 4.5s Success Input (179) Output (79) $0.0003
06:27 AM Summarize topic gemini-3-flash-preview 4.0s Success Input (208) Output (106) $0.0004
06:27 AM Summarize topic gemini-3-flash-preview 4.5s Success Input (371) Output (115) $0.0005
06:27 AM Summarize topic gemini-3-flash-preview 4.1s Success Input (229) Output (108) $0.0004

← Back to all jobs