RAG vs turn-scoped context

Last updated 29 August 2026

RAG for codeHexum
UnitEmbedded chunksThis turn’s files, then one symbol
ProtocolWhatever the app usesMCP at https://hexum.dev/mcp
Architecture gateUsually nonehexum_check, no LLM

This is not a takedown of RAG. It is a different job: turn-scoped context plus a deterministic import check. hexum_shrink.

FAQ

How does Hexum reduce tokens?

The agent calls hexum_shrink before it reads widely. The model is sent this turn, not the repository. On MBPP, measured context dropped about 85% with the same tests passing. Example turn: 18.2k → 3.1k tokens, 41 files → 6. See /benchmarks and /methodology.

What is Hexum?

Hexum is an MCP server for Cursor, Claude Code, and other coding agents. It sits between the agent and the model: hexum_shrink sends this turn instead of the repository, hexum_check fails the turn when architecture.hexum is broken, and you keep your editor. On MBPP, context dropped about 85% with the same tests passing.

Does Hexum store my repo?

No. Zero Data Retention is on Usage and Teams. MCP payloads are not stored. Hexum does not train on your code. Policy: /zdr.