Membership Required
You need to sign in and have a Premium subscription to access this content.
- 01 The biggest context window consumer is reading entire large files. An 800-line file costs ~4KB of context.
- 02 claude-context-mode achieves 98% context savings via sandbox execution, but requires Elastic License and additional runtime.
- 03 claude-context (Zilliz) offers accurate code search via AST chunking, but depends on Milvus Cloud + OpenAI API.
- 04 A fully local, zero-dependency approach is possible: hybrid search with SQLite FTS5 + sqlite-vec + tree-sitter.
+ Why does Claude Code's context window fill up so fast?
Every Read, Grep, and Bash tool call output gets added to the context window. Reading an 800-line file costs ~4KB, a broad grep can consume 10KB+. In long sessions, tool outputs make up a significant portion of context, and context rot causes performance degradation.
+ What does the PreToolUse hook do?
Claude Code's PreToolUse hook intercepts tool calls before execution. It blocks Read on large files and redirects to MCP search tools, so only relevant 20-30 line chunks enter context instead of entire 800-line files.
+ Why use SQLite instead of Milvus?
For a solo developer scenario, a remote vector DB is overkill. SQLite FTS5 provides full-text search, sqlite-vec extension provides vector search. Single file, zero network overhead, zero cost. Sufficient scale for a developer's knowledge base.
+ What is the difference between AST chunking and line-based chunking?
Line-based chunking splits code by fixed line counts and can cut functions mid-body. AST chunking uses tree-sitter to extract function/class/method nodes from the parse tree. Result: each chunk is a meaningful unit and search accuracy improves.
+ Which tool should I use?
If you already have MCP infrastructure and want a local solution, dnomia-knowledge. If you only want context savings, claude-context-mode. If you are working in a team with cloud infrastructure, claude-context.