Original Reddit post

Six months of running Claude Code on real repos taught me the agent’s worst failures aren’t about model quality. It calls functions that don’t exist. It edits one file and breaks three callers it never opened. Ask “where does authentication happen?” and you get grep guesses. It has no structural model of the code to consult. CodeSage is a single Rust binary that fixes that. It builds a structural graph (tree-sitter) plus a semantic index (ONNX embeddings, sqlite-vec) of your repo and exposes it to the agent over MCP. No Docker, no daemon, no external vector database. The agent stops guessing. find-references returns the real call graph instead of a text match. impact answers “who breaks if I touch this?” before the edit, not after. Natural-language search finds the auth flow without you knowing the file names. It indexes PHP, Python, Rust, Go, JS/TS, C/C++, Java, and git hooks keep the index fresh on commit. Typical query lands around 250ms. I’ve shipped it steadily since mid-April and it’s settled enough now to put in front of people. Disclosure, since this is my own project: I’m the author, it’s free and open source under MIT, and there’s nothing paid or monetized here. It works with any MCP client; I built it for my own Claude Code work. https://github.com/iliaal/codesage submitted by /u/Ilia0001

Originally posted by u/Ilia0001 on r/ClaudeCode