Repository navigation
v0.7.0
zerograph 0.7.0
The release notes for the GitHub release page. The why behind each change is in the docs each line
links to.
Breaking
zerograph watchis removed. It ran the same poll asservewithout answering anything, and
every MCP tool now refreshes before it answers, so it was one more process per worktree and one
more writer. A script or service that startszerograph watchnow fails with an unknown-command
error: startzerograph serveinstead, which polls the tree between questions with the same
--everyand--batch.serveexits after--idleseconds without a question (30 minutes by
default), so a poller meant to stay up names a longer one, such as--idle 86400
(serve).install-agentwrites no git hooks, and removes the block an earlier release wrote. The
post-merge/post-checkoutblock lived in the common.git/hooks, so everygit worktree add
started a full embed. A re-run deletes the block and keeps the rest of each hook file; a file left with only its shebang is deleted. Every read already refreshes, and
servecatches up when it starts. Git hooks remain an option, written by hand
(keeping fresh).install-agent --claudeand--codexinstall a plugin, and take out what earlier releases
wrote. The plugin is now the only way zerograph wires into Claude Code and Codex: it starts the
MCP server, runs the session hook and carries the commands.--clauderunsclaude plugin marketplace add devmaxxx/zerograph,claude plugin marketplace update zerograph,claude plugin install zerograph@zerographandclaude plugin update zerograph@zerograph;--codexruns
codex plugin marketplace add devmaxxx/zerograph --ref v0.7.0andcodex plugin add zerograph@zerograph, re-adding the marketplace when it was pinned to an older tag. A re-run after
a binary upgrade moves either plugin to the binary's release.
Once the plugin is in, the run removes the local-scope MCP servers in~/.claude.jsonfor the
checkout and its worktrees, the hook entries in.claude/settings.jsonand$CODEX_HOME/hooks.json,
the copied hook script, thezerographandrepo-queryskills, therepo-scoutsubagent and the
instructions stanza inCLAUDE.mdorAGENTS.md; an edited file is left and named, a hook
script stays until the entries that run it are gone, and a file git tracks is left for the team
until--retire-repoasks for it. Where the CLI
is missing it prints the commands and changes nothing.--commandno longer reaches Claude Code
or Codex: the plugins runzerograph(install).- Nothing from before the repograph rename is read any more: no
.repograph/store,repograph.toml,~/.config/repograph/,~/.cache/repograph/orREPOGRAPH_*variable, andinstall-agentno longer retires therepographhook, stanza or MCP server. - The session hook no longer runs a binary from the checkout it starts in. It used
<checkout>/node_modules/.bin/zerographwhen nothing else was found, so a cloned repository that
committed one got it spawned as soon as a session started there; the Claude Code mod also tried
target/{release,debug}under the checkout. The hook and the mod now take the binary from
ZEROGRAPH_BINorPATHonly, and skip aPATHentry inside the checkout, compared as spelled
and with every link followed. A project that installs zerograph as a dev dependency and has no
global install setsZEROGRAPH_BINto that binary's absolute path (install). - The
servesocket moved to~/.cache/zerograph/sock/<hash>.sock, the hash of the canonical
checkout path, from.zerograph/serve.sockor the temporary directory for a deep checkout. One
rule now holds for every checkout depth and every$TMPDIR, which two processes of one user could
disagree on. The private$TMPDIR/zerograph-<uid>/is the fallback only when the path would not
fit insun_pathor there is no absolute home directory.zerograph statusprints the socket it checked,
andstatus --jsoncarries it asserve.socket, for a tool that looks for a server on its own
(serve).
New
- A machine-wide vector cache. A vector depends only on the model, the hub commit its files
were fetched at, its width and the row's text, so every embed is written to~/.cache/zerograph/vectors(%LOCALAPPDATA%\zerograph\vectors
on Windows), and a dense sync reads the rows it is missing from there before it embeds anything.
A row any checkout on the machine embedded once, whether a worktree, a clone or a fork, is a read
for the rest. On the zerograph repository with e5-small, a cold build took 41.9 s. A new worktree
at the same commit then built in 1.52 s, and so did an independent clone, which took
56 s before. A worktree 30 commits back took 6.33 s, with 3979 rows
read and 590 embedded. Edit→ask p90 stayed at 120 ms against 121 ms, and the top-5 was identical
on 10 of 10 questions. Only rows this user embedded on this machine enter the cache: a store's
vectors.f32is never imported. The directory is private to the user, readers take no lock, and
a torn or corrupt record is skipped, never returned. Anaskreads at most 32 of the cache's
shards, the fullest first, since it reads each whole before its budget is weighed; the rows it
did not look up are embedded when they fit its budget and otherwise left to the refresh it starts (keeping fresh,
bench). zerograph cache status|prune.statusshows the cache's rows and bytes per model and
revision.prunetrims it to 80% of its cap, least recently used first, or empties it when the
cap is 0. Every prune also drops repeated and torn records, so one under the cap can still report
rows removed; its line says how many went for each reason (commands).vector_cache_maxcaps the cache at4Gby default;0turns it off. Only the machine
config can set it, not a repository'szerograph.toml. A write that takes the cache over the cap
starts a prune in a background process, at most once every 10 minutes per process, so a
long-livedserveor MCP server keeps the cap too (configuration).
ZEROGRAPH_VECTOR_CACHEmoves the cache for one run; on Unix it is refused under a directory
another user could change.- The session hook builds a checkout that has no index, in the background, when the checkout
opted in: it holds azerograph.tomlor the hook an earlier release installed, or its main
worktree does or has an index. With an
index, theservethe hook starts catches up as it starts; withZEROGRAPH_HOOK_SERVE=0, a
detachedupdatedoes it instead (keeping fresh). - A Codex plugin,
agent/codex/: the MCP server, the session hook onSessionStart,
SubagentStartand after an edit, and the commands as skills,$zerograph:askto
$zerograph:refresh(install). - Credentials written inside an indexed file are redacted. A provider token in a source file, a
key exported in a shell script, a private key pasted into a README or a database URL with a
password in it becomes[REDACTED_SECRET]before the file is extracted, so it never reaches the
store, an index, a rerank prompt orzerograph families; the file keeps its line numbers and
updatenames the file. Coverage is by provider pattern only (GitHub, GitLab, AWS, Slack, Stripe,
OpenAI, Anthropic, Google, npm, PyPI, SendGrid, Twilio, Hugging Face, Discord, JWTs, private keys
and several hundred more): a genericpassword = "...",api_key: "..."orBearerheader is not
caught, because the catch-all rules that would catch it flagged dozens of spans on a real
repository and none of them was a secret. A span that holds an id is never redacted, and a
database URL on a loopback host or with a whole placeholder password (${VAR},$VAR,<password>,
***) is left as written, unless the password is itself a provider token.
redact_secrets = falseinzerograph.toml, orZEROGRAPH_REDACT_SECRETS=falsefor one run,
turns it off (configuration). - A
cache_statusMCP tool reports the machine's vector cache aszerograph cache statusdoes:
where it is, its cap, and its rows and bytes per model (MCP). - A store records the release that wrote it.
manifest.jsoncarriesrelease,statusshows
it, and a store a newer release wrote has anewer_grammarstate of its own, which the Claude Code
mod displays (commands).
Changed
- With no
--repo, the root is the top of the git checkout (git rev-parse --show-toplevel; a
worktree is its own root), else the nearest directory above that holds a.zerograph/, else the
current directory. A read where no store exists no longer creates.zerograph/: it answers from
nothing and sayszerograph buildbuilds it. The walk skips every directory below the root that
has its own.git, so nested worktrees, clones and submodules stay out of the index
(configuration). The session hook resolves the same root, so inside a git
checkout it asks about the top level whatever subdirectory the session is in
(keeping fresh). - The
reindexMCP tool builds a checkout that has no store with a detachedbuild, where it
used to fail; with a store it starts a detachedupdateas before (MCP). - The Claude Code mod reads files instead of polling
status --json. Every 10 s it reads
background.logand stats the socket the last report named; the full report runs at session
start, every 5 minutes, once after a refresh ends and after/zerograph
(install).
Fixed
- Windows: a command run without
--repono longer hands git a verbatim\\?\path. The root
lookup rangit rev-parse --show-toplevelwith the canonical\\?\C:\…form of the current
directory as its working directory; it now gets the plain path, as every other git call does. - Windows: the session hook takes a
zerograph.exebefore npm's.cmdshim, and a call through
the shim that runs out of time ends the whole process tree. The shim needscmd, which expands
%NAME%in the repository path, and a timeout killedcmdand leftzerographrunning. The
Claude Code mod prefers the.exethe same way and runs a.cmdthroughcmdfrom the shim's
own directory. It never handscmda checkout path that holds one of&|<>^"%!, whichcmd
would run, redirect or expand; such a checkout's line comes from the logs instead (install). import-legacytakes the writer lock and refuses a store a newer release wrote, like every
other writer.- A
servestarted by 0.6.4 can be stopped after the upgrade. It listens at the old socket,
where no client of 0.7.0 looks, and writes without the writer lock.zerograph stopnow sends the
stop line there as well, and a newservedoes so as soon as it binds, on a thread of its own: a
busy old server can take up to 310 s to read it, and meanwhile the new one answers as--stale
does and writes nothing. A deep checkout's old socket is looked for under this process's
$TMPDIRand under/tmp/zerograph-<uid>/(serve). - An older release no longer writes over a newer store. It answers read-only and prints one line
naming both generations;update,build,embedand the model switch refuse to write.ask
reads the manifest again before it writes, whether or not it could take the writer lock, so a
newerupdatethat saves in between is not stamped over (commands). - A checkout that still commits the 0.6.x hook hears one brief, not two.
install-agentleaves
a.claude/settings.jsongit tracks for the team, and its entries ran the old hook beside the
plugin's, so every session start and every search got two answers. The plugin's hook is now
silent on each event those entries still answer, and the same for entries left in
$CODEX_HOME/hooks.json(install). - Every writer takes the writer lock.
embedandmodel <id>wrote vectors, and theserve
poll wrote the graph, withoutwriter.lock, so a detachedupdatecould write the same files
meanwhile andstatusreported no refresh.embedandmodel <id>now wait for a running
refresh the wayupdatedoes, and aservepoll that finds one skips its cycle
(keeping fresh). - The session hook's in-process refresh stays inside its 5 s timeout. Every call the hook waits
on getsZEROGRAPH_READER_BUDGET=2, or a smaller value the environment orzerograph.tomlsets,
and a refresh that would not fit goes to a detachedupdateinstead of being killed
(keeping fresh). - Worktree notices. The build notice no longer promises "a couple of minutes", and it says that
rows another checkout on this machine already embedded come from the vector cache. The docs say each worktree keeps its own store
and that an APFS clone stops sharing the graph at its first refresh
(keeping fresh). - A git call from a hook's environment finds the right checkout. The root lookup, the worktree
list and the git-hook cleanup inheritedGIT_DIRandGIT_WORK_TREE, so anupdaterun by a hook
manager could take the current directory for the root and build a partial store there. They now
clear those variables, aschangesalready did.
Before upgrading
-
The first
updateafter the upgrade re-reads the whole tree, once. The store's grammar moves
from 6 to 7 because a file is now redacted before it is read, and a store stamped 6 still holds
whatever credentials its unchanged files carried. Expect the first refresh to take as long as a
buildminus the embedding, which the vector cache keeps for rows whose text did not move. -
Set
ZEROGRAPH_BINwhere zerograph is a project dependency and not onPATH, or the session
hook and the mod find no binary. APATHentry inside the checkout —node_modules/.binadded by
direnv or an.envrc— is now skipped without a word, so a checkout that relied on one needs
ZEROGRAPH_BINset to the binary's absolute path. The mod'sbinaryoption takes an absolute
path or a bare name, which means thePATHlookup; a relative path is ignored. -
A store built in a subdirectory of a git checkout by an earlier release is no longer read by
the session hook, which asks about the checkout's top level as the CLI does. Build at the top
level (zerograph buildfrom anywhere in the checkout) and delete the old.zerograph/. -
Re-run
install-agentwith the flags you used: it removes the git-hook block, and with
--claudeor--codexinstalls the plugin and removes the older install
(install). -
Replace
zerograph watchin scripts and services withzerograph serve --idle <seconds>. -
A running 0.6.4
serveis sent the stop line by the firstzerograph stopor
zerograph serveof 0.7.0; otherwise it runs until its own--idletimeout. One that does not
leave is named on stderr and has to be ended by hand (serve).