Native & MCP Ingress
Foreground VS Code agents call #cctxNativeContext; CLI and subagents call
code_context over cctx shared-mcp. Both hit the same socket/loopback RPC.
Stop feeding coding agents 200-line grep dumps. Code Context (cctx) pairs
native VS Code Language Model Tools (#cctxNativeContext) and an MCP server over one shared
Rust trigram index—cutting lookup tokens by 73.2–91.3%, accelerating warm retrieval
17.22× in the published retrieval fixture. Linux, native Windows
(cctx.exe), WSL, and SSH are supported.
No. Install the local backend and follow the quickstart. The website only publishes documentation.
git clone https://github.com/dotnetpower/code-context.git && cd code-context && bash scripts/install.sh
Scroll or toggle between Warm Hit and Cold CACHE_MISS.
Code Context never blocks an agent on index warmup: cold workspaces return immediately so host tools
proceed without delay while bounded background indexing finishes in ~19.7 ms.
Foreground VS Code agents call #cctxNativeContext; CLI and subagents call
code_context over cctx shared-mcp. Both hit the same socket/loopback RPC.
ASCII/UTF-8 case-folded trigram postings narrow regex and literal candidates in microseconds before touching line buffers, prioritizing symbol definitions.
Expands matches to clean Rust, Python, TS/React, Go, SQL, and Markdown/Office boundaries under a strict
<8 KiB inline guard with SHA-256 verification.
Incremental filesystem watchers reconcile edits live while the memory controller respects Linux cgroup v2 headroom, Windows physical RAM reports, and 15m TTL eviction.
Every high-volume token leak in real agent sessions—Office decks, 1 MB JSON responses, multi-command build logs, and context compactions—is handled natively in Rust with 0 standing MCP schema bloat.
Inspect .pptx, .docx, .xlsx, .pdf, .epub,
Jupyter notebooks, and Markdown by virtual table-of-contents or slide/section anchors—backed by 5.4×
faster 9-bit O(1) DEFLATE decoding.
architecture.pptx#tocarchitecture.pptx#slide-3-5
Replace fragile ad-hoc python3 -c, jq, and sqlite3 one-liners.
Filter 1 MB JSON payloads to 662 B in 7.82 ms and query spooled batch logs (@s1) without
re-running commands.
$ pctx json api.json --where status=500 --count-by route$ pctx log @latest "panic|deadlock" # 0 re-exec
Preserve architectural decisions across compactions in strictly <= 2,048 B with fail-open
hooks (0 PreToolUse denials), and track live AIC/USD savings in VS Code or
cctx usage --hours 24.
$ cctx usage --hours 24Evaluated across 8 daemon sessions × 40 rounds × 28 tasks on AKS Store Demo, 506-file Python and 6,000-file Rust suites, and controlled end-to-end Copilot CLI A/B trials.
CACHE_MISS plus host
fallback had a 4.409 ms median—no cold-cache speedup is claimed. See the
full methodology, confidence intervals, and reproduction commands.
| Benchmark Workload | Baseline | With cctx | Impact |
|---|---|---|---|
| Literal search (AKS Store Demo) | 5.234 ms | 0.230 ms | 22.77× faster |
| Search + context | 5.343 ms | 0.250 ms | 21.39× faster |
| Filename discovery | 4.466 ms | 0.254 ms | 17.57× faster |
| Known small read + SHA-256 | 0.081 ms | 0.190 ms | 0.43× (IPC overhead) |
| Rust 6-symbol lookup tokens | 15,028 – 25,133 tok | 4,031 tok | -73.2% to -84.0% |
| Python 6-symbol lookup tokens | 13,997 – 24,609 tok | 2,141 tok | -84.7% to -91.3% |
| BPE formula instructions | 2,048 tok | 756 tok | -63.1% per turn |
ripgrep spawns a fresh scan per call and returns raw lines without block boundaries, forcing
agents into multi-turn rg + view loops. Vector RAG requires cloud or GPU embedding
indexes that drift on edits and blur exact identifiers. cctx keeps an exact, deterministic
in-memory trigram posting index in Rust with live file-watcher updates and polyglot AST block clamping—100%
local and SHA-256 verified.
Indexing, trigram queries, document extraction, and continuity journals run locally. Explicit
pctx http probes contact the URLs you supply. AI clients receiving tool output follow their
own data policies; review the privacy boundaries.
In VS Code 1.140+, install dotnetpower.code-context-native from the Marketplace for foreground
native tool dispatch and automatic BPE-aligned agent instructions, and optionally configure
cctx shared-mcp for background subagents or MCP-only clients (Claude Code, Cursor, CLI agents).
Both surfaces share the exact same resident Rust daemon and cache.
Yes. Build or copy cctx.exe to %USERPROFILE%\.local\bin\cctx.exe. The VS Code
extension automatically starts cctx.exe daemon in the background on first use and falls back to
VS Code’s bundled rg.exe if ripgrep is not on PATH. WSL and Windows Agent
Sessions are also first-class supported.
Looking for broader LLM & Copilot token-cost playbooks and zero-code request profiling? Explore our companion
guide agent-tokenomics & tokprof ↗
or browse the machine-readable llms.txt and
llms-full.txt indexes.
Enter token counts from your own tool outputs. This arithmetic is not a forecast of billing or performance.