Repository navigation
Releases
Releases · recscse/codive
v1.4.0
Added
- One shared background process for all AI clients. Every client used to start its own
codive serve, so a machine with several editors open ran a dozen processes syncing and writing the same index, which caused the "database is locked" failures.codive serveis now a thin forwarder: the first one starts a single per-user daemon (detached, loopback only, guarded by a random token), and every client talks to it. The daemon is the only writer of each index, keeps a repository open while clients use it and for 5 minutes after, and exits after 10 minutes with no clients. If a codive upgrade changes the version, the next client replaces the old daemon. If the daemon restarts or crashes, the forwarder reconnects and replays the client's handshake; only requests in flight are answered with an error. SetCODIVE_STANDALONE=1, or run where the daemon can't start, to serve from the client's own process as before. New command:codive daemon [start|stop|status]. codive doctorchecks the index for the problems that made large repositories slow or wrong: a second index nested inside a repository, an index over 1 GB, an index built by an older symbol extractor, recent index sync failures in the logs,codive serveprocesses running without the shared daemon, and a daemon of a different version.
Fixed
- One repository, one index. The index used for a client is now the nearest existing one above the directory it started in, otherwise the root of the git repository, not whatever folder the client happened to start in. Starting from a subfolder no longer builds a second index.
- The first reply on a new repository no longer waits for indexing.
initializeandtools/listare answered at once. A tool call that arrives while the first index is being built waits up to 40 seconds and then says the index is still being built, instead of hanging until the client gives up. The automatic first index also used to build the code graph, which took about 30 seconds even for a one-file Go repository; the graph is now built in the background and the graph tools use it once it is ready. Indexing a very large repository for the first time can still take several minutes. codive serveno longer creates a.codivefolder in whatever directory the client started it in.
What's Changed
- feat(daemon): one shared background process for all AI clients by @recscse in #19
- ci: scope CI concurrency by event so a push run can't cancel the PR's… by @recscse in #21
- Feat/shared daemon by @recscse in #20
Full Changelog: v1.3.4...v1.4.0
v1.3.4
Fixed
- Functions whose parameter list spans several lines are indexed. A declaration such as
def run(followed by its parameters on the next lines was dropped, sofind_symbolandread_symbolanswered "not found" for code that exists and the file outline gave its lines to the function above. This affected Python, TypeScript/JavaScript, Java, C# and Rust. Existing indexes are rebuilt once in the background. - Java and C# statements are no longer indexed as methods.
return compute(x)andthrow new MyError(msg)were recorded as methods namedcomputeandMyError. - A slow or blocked sync no longer turns tool calls into timeouts. The index sync ran inside each tool call, on the call's 60-second budget. On a large repository, or when another codive process held the database, the sync used the whole budget, the call failed, and the next call started the same sync again. The sync now runs on its own clock: a call waits up to 5 seconds for it and is otherwise answered from the index as it is. After a failed sync the next attempt waits (2 seconds, doubling to a minute) instead of every query retrying it.
- Updating one file no longer scans the full-text tables. Deleting a file's old rows filtered on a column the full-text index can't look up, so every sync read both tables in full while holding the write lock. The rows are now found through an index and deleted by rowid.
- Only one process rebuilds a shared index. When several AI clients each run
codive serveon the same repository, they all used to start the rebuild after an upgrade, each holding every file in memory. A lock file in.codivenow lets one do it. .codiveignores itself in git. The directory gets its own.gitignore, so the index no longer appears as untracked files and can't be committed by accident. Your repository's.gitignoreis not edited.- The file outline reported one line too many for files ending in a newline.
Changed
search_codelists every matching line with its line number. It used to show one excerpt per file with no line number, and its count was of files, so three matches in one file read as one. A query in double quotes is now an exact phrase. The heading says when more files match than are shown. New optional argument:max_lines_per_file.- Token savings are only reported where they are measured. The footer on
find_symbol,find_references,find_callersandfind_filesclaimed a saving computed from a fixed number of tokens per result (for example 1,200 per reference). Those footers now state the size of the response only.get_file_skeletoncompares against the real size of the file.codive statsreports queries served and the token counts for partial file reads (outlines and single definitions); the latency, cost and speed-multiplier lines, which came from assumed constants, are gone.codive stats --jsonfields changed to match. find_referencesmarks the line that declares the symbol with← definition, and labels ordinary source filesSourceinstead ofCaller / Reference.- Docs: removed the unmeasured "10–80× fewer tokens" figure and the description of search operators
search_codenever supported; corrected the tool count (18).
Added
- The web explorer has a plain-language repository overview: the languages and main areas of the repository for someone who doesn't know it yet, served at
/api/explorer/overview. codive initshows when the code graph build starts, and logs how long indexing and graph building each took.scripts/agentbenchruns the same tasks with and without codive on identical checkouts and records success, turns, tokens, cost and time. No results are published yet.
Upgrading
Running codive serve processes keep the old code until they are restarted, so restart your AI clients after installing. The first server to start after the upgrade rebuilds the index once, in the background.
What's Changed
- Feat/intent bench by @recscse in #9
- ci(release): say why a release was skipped and require a version bump… by @recscse in #10
- chore(release): prepare v1.3.4 by @recscse in #18
Full Changelog: v1.3.3...v1.3.4
v1.3.3
Fixed
codive upgradeno longer fails on slower networks or hides why it failed. A single 10-second timeout covered the whole download, so the 6.5 MB release archive could time out, and every failure was reported as "asset not found" with advice to rungo install. The version check (15 s) and the download (5 min) now have separate timeouts, transient errors and 5xx responses are retried 3 times, the real cause (for exampleHTTP 404or a timeout) is printed, and the command exits non-zero on failure. The fallback hint now points to the installer (irm https://recscse.github.io/codive/install.ps1 | iexorcurl -fsSL https://recscse.github.io/codive/install.sh | sh) and the releases page, so users no longer need Go installed. If you are on v1.2.0, run the installer once to get this fix.
Changed
- Releases are automatic. Merging to
mainwith a newVersioninmain.goruns the tests on Linux, macOS and Windows, builds all five platform archives with SHA-256 files, publishes the GitHub release with these notes plus the generated list of merged changes, and then downloads the published archives on each OS to check the checksum and that the binary runs. A version without a changelog section stops the release, and a test catches it on the PR. - CI now runs on every push, not just on
main.
Added
codive benchmeasures intent search on the repository's own history. Each recent commit becomes a question: the subject (minus prefixes such asfix(mcp):) is the query, and the definitions the commit changed, if they still exist, are the right answers. Docs, chore, merge and broad-refactor commits are skipped. The report shows how often the right function and the right file rank 1st, in the top 3 and in the top 10, next to a grep-style baseline that ranks files by how often the query's words appear. It logs nothing, so it never feeds the ranker. Measured with the starting weights:- go-chi/chi, 306 questions: the right function ranked first 35% of the time and in the top 3 53%. The right file ranked first 51% of the time, against 17% for the grep-style baseline.
- spf13/cobra, 210 questions: the right function ranked first 17% of the time and in the top 3 37%. The right file ranked first 43% of the time, against 28% for the baseline.
codive ranker historytrains the intent ranker on git history, so ranking can improve on day one instead of waiting for 20 real uses. Test functions don't count as right answers: commits change a test alongside the code, but an agent asking where something happens wants the code. Without this rule, training made ranking worse. The trained model is kept only if it ranks held-out commits better. Held-out MRR went from 0.57 to 0.66 on chi and from 0.43 to 0.63 on cobra. After training,codive benchscores the same commits it learned from; useCODIVE_LEARNING=off codive benchto see the starting weights.
What's Changed
- Measure intent search on git history; train the ranker from it by @recscse in #7
- Feat/intent bench by @recscse in #8
Full Changelog: v1.3.2...v1.3.3
v1.3.2
Added
codive config: shows, gets, sets and unsets per-project settings stored in.codive.jsonat the repository root, and lists.codiveignoreexclusions. Settings:portforcodive web(--portstill overrides it) andwatch_intervalforcodive watch. The file lives outside.codive/, socodive cleankeeps it and teams can commit it.
Fixed
- The explorer explains when it can't reach
codive web, for example after the server stops, instead of showing "Failed to fetch". - Tests that run
codive initno longer record their temporary folders in the developer's real project list.
Full Changelog: v1.3.1...v1.3.2
v1.3.1
Added
codive clean: lists every indexed project with its index size, and deletes one project's.codivefolder after confirmation (-yskips the prompt). Project code is never touched. Projects are recorded whencodive initruns, so ones indexed with older versions appear after their nextinit.
Changed
- Warning when the Go toolchain is missing: without Go, standard library types can't be loaded and some callers are missed.
codive init,codive blast, theblast_radiusMCP tool and the explorer now say so and explain how to fix it.
Full Changelog: v1.3.0...v1.3.1
v1.3.0
Added
- Type-checked Go code graph: calls are resolved with the Go type checker instead of matching names. Interface calls link to the repo types that implement the interface, marked as inferred, and functions passed as values are recorded as references.
- Routes and CLI commands from parsed code: HTTP routes, including router group prefixes, and CLI subcommands are read from Go source. Database tables are read from SQL strings and linked to the functions using them.
codive webexplorer, rebuilt: search-first home page, your uncommitted changes and what they affect, callers and callees, execution flow, blast radius with ago testcommand to copy, and a package map. It works offline and handles large repositories.codive web --port N.get_execution_flowandget_codebase_graphMCP tools.- Accuracy check against gopls:
benchmarks/accuracy.pycompares codive's Go callers with the official language server.
Changed
codive blastand theblast_radiusMCP tool use the type-checked graph for Go functions. Other symbols fall back to the previous text search, and the output says which method was used.- Website, docs and blog rebuilt, with unmeasured performance and token-savings figures removed.
Fixed
- Installers downloaded a
v1.0.0file that doesn't exist, so installing only worked when Go was present. They now fetch the latest release. The PowerShell installer no longer reports success when nothing was installed. - Explorer server rejects requests whose Host header isn't localhost, which blocks DNS rebinding.
- Go toolchain selection: codive runs
gooutside the indexed repository with the local toolchain, so a repository'sgo.modcan't choose what is executed. Indexing gitea previously crashed.
Known limitations
- Calls through standard library interfaces, reflection and some platform-specific files may be missing. Treat blast radius as known callers, not a guarantee.
- Call graphs are Go only.
- Full results need the Go toolchain installed.
Full Changelog: v1.2.0...v1.3.0
v1.2.1
Release v1.2.1: find_files tool, global Claude Code setup, SQLite bat…
v1.2.0
Added
-
Interactive Web Architecture Visualizer (
codive web): Completely revamped local browser architecture graph with 60 FPS$O(N)$ force-directed physics, directory clustering, smooth mouse-wheel zoom & pan, node dragging, live syntax-rendered code snippet inspector with line numbers, and token-optimized Markdown context prompt exporter. -
SQLite Concurrency & Batch Inserts: Added memory-mapped I/O (
mmap_size) and in-memory temporary storage pragmas, along with batching of symbol extraction inserts for faster cold repository indexing.
Security
- Local secrets and ignored files were indexed and could be sent to the AI model. The scanner ignored
.gitignore, so files such as.env, private keys, and gitignored build output were indexed, andsearch_codecould return their contents to the agent, and from there to its model provider. codive now follows.gitignore(nested files,.git/info/exclude, negation,**), checked against git's own output. It also never indexes credential-like files (.env,.env.*,*.pem,*.key,id_rsa,.npmrc,*.tfstate, …) even when they aren't gitignored..env.exampleand similar template files are still indexed. The file-reading tools refuse credential files too. Existing indexes drop these files on the next sync. codive setupcould wipe settings in AI client configs. It rewrote each client config and dropped anything it didn't recognise, including other MCP servers'envblocks (often API keys), remote server URLs and headers, and all of Continue's settings. A config containing comments was replaced entirely. setup now edits only codive's own entry and keeps a one-time*.codive-backupof the original. It leaves configs with comments untouched and prints the entry to add by hand.codive init-rulesoverwroteCLAUDE.md,AGENTS.md,GEMINI.md,.cursorrulesand.windsurfrules, andcodive install-hooksoverwrote existing git hooks. Both now edit only a marked codive block. Hooks followcore.hooksPath.codive upgradeinstalled downloads without checking them. It now verifies the SHA-256 checksum when the release publishes one, and test-runs the new binary before replacing the current one.
Added
read_symbolMCP tool returns exactly one definition (doc comment, signature and full body) instead of the whole file. It acceptsName,Type.Methodorpath:Name, and suggests close names when nothing matches exactly. On the Go standard library it returned the right definition with 11–86× fewer tokens than reading the file, typically in a few milliseconds.- Go: where a definition ends comes from Go's own parser, so it's exact.
- Python: the end is found by indentation.
- Brace languages (JS/TS, Java, C#, Rust, C/C++, …): a brace-matching scanner finds the end. It handles strings, raw strings, comments, character literals and Rust lifetimes, braces inside headers (React destructured props, generic constraints), bodyless declarations and Allman-style braces. It agrees with Go's parser on 99.99% of ~105k standard-library declarations, and a test keeps it checked against the parser.
read_symbolfinds code by what it does when the agent doesn't know the name. Passintent(for exampleretry backoff interval payment error), or asymbolcontaining spaces. Definitions are ranked by the words they share with the intent. The index covers each definition's name split into words (processPaymentError→ process payment error), its signature and doc comment, and the identifiers and comments in its body, weighted in that order. The best match is shown in full and the next five are listed, and definitions in test files rank below code. When a guessedsymbolname doesn't exist, anintentgiven in the same call is used instead. On codive's own source, 7 of 10 plain-English questions returned the right function first, in about 2 ms each. Matching is by words, not meaning, so the agent should include identifier words and synonyms it expects the code to use. Existing indexes are rebuilt automatically to add the new search data.- Intent ranking learns from use. When the agent goes on to use one of the results within 15 minutes, codive records that result as useful. Using a result means reading it by name, asking for its callers or tests, reading its lines, or editing its body. After 20 such queries, a small ranking model retrains on that feedback. It weighs the search score, where the query words matched, whether the result is in a test, and how often the definition was useful before. The new model is used only if it ranks held-out queries at least as well as the current one and the starting weights. The model only reorders results that the index found, so it can't invent code or line numbers. Everything stays in
.codive/index.dband survives index rebuilds.codive rankershows what has been learned,codive ranker resetforgets it, andCODIVE_LEARNING=offturns logging and learning off. - Indexes rebuild automatically when symbol extraction changes. Each index records which version of the symbol extractor built it. When codive's extractor changes,
serverebuilds the index once in the background (queries keep working meanwhile), andupdateandwatchrebuild before continuing. --dry-runand--undoforsetup,init-rulesandinstall-hooks.- The MCP server supports roots: it answers from the workspace the client actually has open, instead of the repository that
setupwas last run in. setupsupports Claude Code (.mcp.json), per-project Cursor configs, VS Code'sserversformat, Gemini CLI and Codex CLI, and only configures clients that are installed.doctorchecks that each detected client really has codive registered.
Fixed
- Go method signatures were stored without their receiver (
func Start(...)instead offunc (s *Server) Start(...)), so agents couldn't tell same-named methods on different types apart. Existing indexes are rebuilt automatically to pick up the fix. - A symbol used inside a minified file (one line of hundreds of kilobytes) made
find_referencesreturn the whole line. Reference snippets are now trimmed around the match, and every tool response is size-capped, with a visible marker wherever text was cut. find_references,find_callers, andblast_radiuscould return nothing at all for common identifiers on large repositories (e.g.Fprintfwith ~2,900 references in the Go standard library): the reference scan built an FTS snippet for every candidate file, ran one extra query per candidate, and re-fetched each file's content, so it ran past the tool-call deadline. References are now streamed straight from the full-text index and stop at the requested limit (find_referenceson a 10k-file repo: 1.3s → under 10ms). Measured againstgrep -won five common symbols: 0 missed, 0 extra.- Capped results no longer read as complete.
find_references/find_callerssay "MORE EXIST" when the limit was hit (previously an agent was told e.g. "Found: 30" for a symbol with thousands of references),blast_radiusreports "N+" with an explicit lower-bound note, andfind_symbolreturns at most 30 matches (configurable vialimit) with a "showing N of M" header — a broad query likeNewpreviously returned ~100,000 tokens in one response. find_referencesmatched substrings (ScanmatchedScanIncremental,rescan), andfind_callerscould miss real callers when a symbol was mostly mentioned in comments or imports. Both now match whole identifiers and filter during the scan.- Re-running
codive initkept symbols from deleted files and duplicated any symbol whose line number had moved.initnow replaces the index atomically. find_tests_forfound test files but never listed the tests inside them.- Reading a file through the MCP server (e.g.
read_file_contextonnode_modules/.env) could pull ignored files into the full-text index, and everyfind_symbolmatch triggered a full re-parse and four table rewrites even for unchanged files. Files are now only re-parsed when already indexed and actually changed. get_git_changesmishandled paths with spaces or non-ASCII characters (git C-quotes them), collapsed new untracked directories into one unreadable entry, and listed affected symbols in random order.- Commands that take a symbol name (e.g.
codive blast GenerateToken) created a stray./GenerateToken/.codive/log folder in the current directory. - A crash between a schema migration and its version bump left the database failing to open with "duplicate column" on every start. Migrations are now transactional.
- A crash mid-sync could leave a file marked as indexed at its new content hash while still holding the previous version's symbols. All index writes for a batch now happen in one transaction.
Changed
- Freshness is now guaranteed at query time: before answering, the MCP server syncs the index if its last sync is more than 2s old, and the background poll adapts to repository size. On a 10k-file repository this cut idle CPU from ~33% of a core to ~3% while new files still become visible within ~1–2s.
- No-op rescans no longer reopen files already known to be binary (0.9s → 0.25s per rescan on a 10k-file repository).
- Every MCP tool call now runs under a 60s deadline, and
get_git_changesruns a fixed number of git processes (one streamed diff for the whole repo instead of one per changed file), listing at most 500 files and analyzing at most 300 — with any skipped files disclosed in the output. read_file_contextreturns at most 1,000 lines per call and acceptsstart_line/end_line.- MCP auto-indexing of an agent-supplied
workspace_pathis limited to the configured workspace or a git repository root. - The MCP server negotiates the protocol version (
2025-06-18,2025-03-26,2024-11-05) and accepts JSON-RPC batches. find_references/find_callersoutput i...
v1.1.1
Fixed: - MCP stdio transport corruption on first-run auto-index - Fabricated codive stats replaced with real telemetry-based numbers - git status path-parsing truncation bug - get_git_changes now reports real symbols/changed-lines for new (untracked) files - Touch-only file changes no longer rehashed on every scan Changed: - Deduplicated blast-radius/call-relationship logic between CLI and MCP server
v1.1.0
docs: update CHANGELOG Unreleased section with this session's fixes Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0147z4bbxLhEuaVWnjC2K811