Repository navigation
Releases
Hydra 0.3.8: Windows install fix, opt-in recall and meaning search
A Windows install fix, and two opt-in commands that find things by meaning.
Fixed: Windows reinstalls took Hydra's own MCP entries for someone else's (#10)
On Windows, running the installer again reported "already has a mcp.hydra entry that Hydra did not write; add this by hand" for OpenCode and Antigravity, and hydra agents status / hydra agents remove could not see those entries. Hydra checked its path against the entry's JSON text, where every backslash is doubled. It now checks each path on its own. On Windows, run hydra self-update, then hydra agents status.
New, experimental and opt-in: hydra recall and hydra search --meaning
hydra embed installdownloads EmbeddingGemma 2 (Google, Apache 2.0; pinned Q8_0 GGUF, about 310 MB, SHA-256 checked). The managed llama-server serves it on127.0.0.1:11436, beside the chat model.hydra recall "<question>"returns the paragraphs of the project's markdown notes that answer it, with newer dated notes first when they are about as relevant.hydra search --meaning "<question>"finds code by what it does, for when you don't know the names.- Both print the files' own lines with
file:line, only read, and keep a rebuildable index in~/.hydra/index.hydra auditlists the model, the process, the index and the download.
On development sets (not real sessions yet):
| Right answer in the top 5 | Keyword search alone | |
|---|---|---|
| Notes, 20 new questions | 15 | 10 |
| Code, 80 questions in 4 languages | 72 | 65 |
Recall returns about 1,000 tokens, against about 65,000 to read this repository's notes whole. Agents are not told to use it yet. That waits until it is measured in real sessions.
Hydra 0.3.7: the 10,000-task benchmark in full
The 10,000-task benchmark, now shown in full on npm, GitHub and the model card. No code changes from 0.3.6.
10,000 fresh tasks
A third held-out set, 2,000 per head, with new seeds, source files and wordings. It was built before scoring and run once on a Kaggle T4 with the pinned Q8_0 model.
| Head | Tasks | Solved |
|---|---|---|
| Git | 2,000 | 97.2% |
| Files | 2,000 | 98.1% |
| Read | 2,000 | 97.6% |
| Test logs | 2,000 | 97.5% |
| OS | 2,000 | 99.0% |
| All | 10,000 | 97.9% (9,787 solved, zero errors) |
These are the scores of the 0.3.6 code. With 0.3.5, Git scored 94.2% and OS 98.0% on these wordings. Both were fixed using separate development sets, without reading this set's failures. Receipt: evals/results/suite/holdout3/holdout3-summary.json.
Docs
- The README gives this result its own table instead of one line under the 1,000-task table.
- The npm page showed the 0.3.5-era 97.1%; 0.3.7 carries the new README.
- The model card's Read held-out row now reads 982/1,000 (98.2%), matching the README.
Hydra 0.3.6: hydra audit, real use per tool, better Git and OS wording
See exactly what Hydra did to your machine, and which of your coding tools actually use it.
New: hydra audit
- One read-only report: every config file Hydra registered itself in, with its permissions and the backup of the original; which coding tools have actually called Hydra; where the model server listens; every network address Hydra contacts and when; where telemetry is kept; and what the MCP server is allowed to run.
- It makes no network call and writes nothing.
hydra audit --jsongives the same for a security reviewer. - It warns when
~/.codex/config.tomlis more open than the original Hydra backed up (older Hydra versions widened it).
hydra agents status shows use, not just registration
- Each tool now shows its last call to Hydra and how many, or "never called", plus any folders refused by the MCP folder limit. A tool Hydra registered itself in but that never calls it now stands out.
An old local copy can no longer stand in for the latest release
- A
hydra-nanoinstalled into anode_modulesfolder above you (for example bynpm install hydra-nanoin your home folder) made everynpx hydra-nanothere reinstall that old version.hydra doctornow warns about such a copy and shows how to remove it,hydra self-updateruns from a temporary folder so no local copy can interfere, and the docs install withnpx hydra-nano@latest.
Git and OS questions in your own words
- Git questions about what is staged now read the way developers write them: "changes that aren't staged yet", "excluding staged changes" and "before staging anything" get the unstaged patch; "including staged ones" and "whether staged or not" get both; "what did I stage?" gets the staged files; "working-tree changes for a file" gets that file's edits, not the worktree list. "Commits mentioning X" searches commit messages, and a file named in the question is no longer mistaken for message text.
- An OS question about one port ("is anything on port 5432, and which process?") returns just the listener line, which already names the process.
- On new development sets worded by a different model, Git went from 94% to 100% and OS from 99% to 100%, with no change on the earlier sets.
Docs
- Corrected the model size (about 812 MB) and the list of platforms Hydra has been verified on.
Hydra 0.3.5: self-update, version reporting, shorter repeated failures
Hydra can now update itself and tell you which version it is, and test digests stay short when the same failure repeats across copies of a project.
New: hydra self-update
- Checks the npm registry for the latest
hydra-nano. If it is newer, Hydra stops its local server and reruns the installer pinned to that exact version, with the options you installed with (--agent,--no-hooks,--no-agents,--runtime-only). hydra self-update --checkonly reports;--forcereinstalls even when you are current.- The only network call is one read from the npm registry; it sends nothing about you.
HYDRA_REGISTRYpoints it at a mirror. - The installer now records what it installed in
~/.hydra/installed.json. Installs from before 0.3.5 have no record, so their firsthydra self-updatereinstalls with default options. To get the command at all, update once withnpx hydra-nano.
New: hydra version
hydra version(also--version,-v) prints the installed version.hydra doctorshows it too, and the MCP server now reports it to clients instead of "0".
Test and build digests
- When the same failure repeats word for word across copies of a file (agent worktrees, vendored or duplicated packages), only the first copy is shown in full; each other copy keeps its first line, which names its path, and a note says how many were shortened. In real use, a prettier error repeated once per worktree copy had filled the digest to its limit.
- A short failing run is labelled
(exit N)instead of repeating the command you ran.
Hydra 0.3.4: accurate file reads, cleaner digests, MCP folder limit
Correctness fixes for file reads and test digests, a tighter MCP server, and a 10,000-task held-out evaluation.
File reads (hydra read, Read head)
- Go outlines were wrong for about a third of files. JavaScript's
varpattern picked up Govarblocks, and generic functions (func Map[T any](), non-struct types (type Mode int), aliases and groupedtype ( … )specs were missed. Outlines now follow each language's own rules. - Symbol lookups now match case first (Go's
insertno longer findsInsert), no longer take a Rustlet len = …for a definition, end Python blocks where the parser does (one-linedefs and trailing comments included), skip definitions inside strings, prefer a Rust implementation over its trait signature, and stop multi-line bodyless Go functions where they end. - JavaScript generators (
function*) and Rustunsafe traitnow appear in outlines. - Checked against the language parsers on every development source file: 884 of 884 outlines and 7,070 of 7,070 symbols now match exactly. The Read held-out score rose from 96.1% to 98.2%.
Test and build digests
- A short cargo failure could come back larger than the raw log:
[unoptimized + debuginfo]was read as a diff line, which pulled in the build preamble and every passing test. Cargo status lines, passing-test lines and theRUST_BACKTRACEhint are no longer treated as failure evidence. The 20-task benchmark is now 20/20.
MCP server
- Tools now work only inside the folders the client opened. Hydra asks a client that supports MCP roots for its folders; otherwise it uses the folder it was started in, or
HYDRA_MCP_ROOTSif set. A refused folder is recorded locally, sohydra improveshows it.
Privacy
- Masking in the local usage ledger now stops at
;,&and|. Before, inA=x;B='y z'part of B's value could stay in clear. Masking an already-masked row now changes nothing.
Evaluation
- Hydra Nano v2 on a fresh 10,000-task held-out set (2,000 per head, scored once on a Kaggle T4): Files 98.1%, Read 97.6%, Test 97.5%, OS 98.0%, Git 94.2%, 97.1% overall. Git and OS score lower on wordings they had not seen before; that is the next thing to work on.
Hydra 0.3.3: line blame, written-out ranges, installer hardening
Fixes for two git questions that real use answered wrongly, plus the remaining hardening from the 0.3.2 security audit.
Git head
- Questions about a line now blame that line. "Which commit last changed line 16 of x.js",
x.js:16and "lines 10-20 of x.js" used to return the file's log, whose top commit need not have touched the line. They now rungit blame -Lon exactly those lines. The code reads the line numbers from the question; the model never supplies them. The result comes back whole. - A range written in the question is used as written.
master..origin/masterused to becomemaster..HEAD, which is empty when you are behind your remote. Now anA..BorA...Brange whose ends git can resolve goes tologordiffunchanged. Questions about files, paths or a patch, and three-dot ranges, get the range's diff. If the 50-commit cap cuts the list short, a last line says how many commits the range holds. - Inside such a range, a word from the question ("what themes stand out") is no longer turned into a commit-message filter unless the question asks about messages.
Hardening
- The installer runs a pinned
skillsCLI (1.7.6) instead of whatever is newest on the registry. - The installer looks for
npxonly in absolutePATHentries, so a project folder can't supply its own. - Installing into a tool's JSON config no longer replaces a
hydraMCP entry that Hydra didn't write; it reports it instead, as the Codex TOML writer already did. - Ledger masking stops at
;,&and|. Before, inA=x;B='y z'part of B's value could stay in clear. Masking an already-masked row now changes nothing. .gitignorecovers common credential files (*.pem,*.key,credentials*.json,kaggle.json).
Hydra 0.3.2: security fixes
Security fixes from an audit of the CLI, MCP server and hooks. Each one has a regression test. Updating is recommended for anyone using the MCP server.
High
hydra_runcould run arbitrary code. The gate checked only the runner name, sonode --test /any/file.mjs,--import,make --eval,cargo --configandgo -vettoolall got through. It now refuses paths that leave the working directory (including through../and symlinks) and each runner's code-loading flags. A project's ownnpm teststill runs.
Medium
hydra_smell,hydra_refactorandhydra_designcould read any file on the machine and echo parts of it. They now accept only source files inside the working directory, and no dotfiles.
Low
- The usage ledger could keep credentials from commands.
NAME=valuesettings, URL passwords and secret-named flags are now masked, and the ledger is written owner-only (0600 in a 0700 folder). - Rewriting an agent's config file could widen it from 0600 to 0644. The original mode is now kept.
- Any local process on 127.0.0.1:11435 was trusted as Hydra's model server. Hydra now trusts it only if its recorded process is alive, belongs to the same user and runs the configured server.
- The maintainer dashboard listened on all interfaces and started evals for any origin. It now binds to 127.0.0.1, checks the Host header and accepts only same-origin JSON POSTs.
Hardening
- The OS head's environment probe now hides values such as
DATABASE_URL,*_DSN,GH_PATandMYSQL_PWD, and any value that contains a URL password or connection-string key. - The managed llama-server starts with
--no-slots --no-webui --cors-origins localhost. Restart it once after updating:hydra stop, and the next call starts it again. - MCP tools carry
readOnlyHintannotations, so clients can gatehydra_run. hydra smell --diffnow runs through the git head's guards, so a repository'sdiff.externaldriver no longer runs.blamealso adds--no-textconv.
Other fixes (most from @sarfaraz1212, #1 to #8)
- The git head keeps the requested count in more phrasings ("the newest 3 commits", "the oldest 5 commits"), and build-failure questions route to the test head.
- The OS head answers about the environment variable the question names (
HOME,TERM, a lowercasevariable pwd) instead of falling back toPATH. The sensitive-name and credential-value guards still apply to every name. - A command killed by a signal reports the usual 128+signal exit code.
- The
hydra improvelatency figures use nearest-rank percentiles. - Smell scanner: indentation depth is measured with the file's own indent width (its most common indent step, #9);
smell --diffreports real line numbers in new files; and siblingif/elsebranches without braces are no longer flagged as dead code. npm testno longer writes its MCP test calls into your usage ledger.
Hydra 0.3.1: whole ranges, T3 Code records
A small fix release on top of 0.3.0. The published model is unchanged (Hydra Nano v2).
Install
npx hydra-nanoFixed
- Range questions return the whole range. Asking for "the commits between v0.2.0 and main" also used "main" as a word to search commit messages for, so the answer quietly listed 1 commit instead of 22. A branch or tag named in the question is now kept out of the message filter, unless the question asks to search messages for it ("messages that mention main"). The git development sets score the same before and after (200/200, 800/800, 800/800).
New
- T3 Code sessions are told apart in local telemetry. Calls from agents that T3 Code starts (Claude Code, Codex, Antigravity) are recorded with
app: "t3code", andhydra improveshows how many calls each agent made from T3 Code. Antigravity in T3 Code picks up the Hydra skill through T3's link to~/.gemini/config/skills; T3 keeps MCP servers and hooks separate by design.
Hydra 0.3.0: measured uses, quieter replies
Hydra now points agents only at the jobs where real use shows it saves tokens, and it is quieter when it saves nothing. The published model is unchanged (Hydra Nano v2).
Install
npx hydra-nanoChanged
- The skill names the measured uses: test and build runs, git history, and machine inspections (ports, processes, disk). Agents now read and search source files themselves;
hydra search,read,smell,refactoranddesignstay available when you ask for them. - No footer when nothing was saved. The
[hydra ... returned ...]line appears only when the reply is smaller than what Hydra read, so a short test run comes back as its output alone. This applies to every head and the MCP server. - The test hook lets through runs the agent already cut short with
| tail -n(40 lines or fewer),| head,| grep -cor| wc. Its message now says that| grep ... | head -40passes.
New
- Refactoring tools, local and read-only, based on Refactoring.Guru:
hydra smellscans files, trees or a diff for code smells;hydra refactorgives step-by-step recipes for a function or line range;hydra designlooks up the 22 GoF patterns. MCP toolshydra_smell,hydra_refactorandhydra_design. - Antigravity IDE is a separate install target (
~/.gemini/config), and its calls are recorded asantigravity. - Real-use savings in the README, refreshed from the local ledger with
npm run stats:readme. It counts only calls made inside an agent session and shows totals only: no commands, project names or session ids.
Hydra 0.2.0: every coding tool, local telemetry
Hydra now works beyond Claude Code. It joins Codex, Cursor, OpenCode, Gemini CLI and Antigravity through an MCP server and each tool's own hooks, and it records local telemetry so you can see what it saves.
Install
npx hydra-nanoHeads up: the installer now edits other tools' settings
For every coding tool it finds, the installer adds Hydra's MCP server, plus its test/build hook where the tool has hooks:
| Tool | What Hydra adds |
|---|---|
| Codex | [mcp_servers.hydra] in ~/.codex/config.toml, hooks in ~/.codex/hooks.json (trust them with /hooks) |
| Cursor | ~/.cursor/mcp.json, ~/.cursor/hooks.json |
| OpenCode | mcp.hydra in opencode.json(c), ~/.config/opencode/plugins/hydra.js |
| Gemini CLI | mcpServers.hydra and a BeforeTool hook in ~/.gemini/settings.json |
| Antigravity | ~/.gemini/antigravity/mcp_config.json, and the skill |
Every edited file is backed up once as <file>.before-hydra, and only Hydra's own entries change. A JSON file with comments is left alone, and the entry to add by hand is printed instead. To skip this, run the installer with --no-agents. To undo it, run hydra agents remove.
Status: Claude Code is tested. Codex lists Hydra's MCP server and OpenCode connects to it. Cursor, Gemini CLI and Antigravity are in preview.
New
- MCP server (
hydra mcp, stdio, no dependencies) with three tools:hydra_git,hydra_runandhydra_os.hydra_runaccepts only one recognised test or build command; it refuses shell operators, redirection and env prefixes. hydra agents install|remove|statusmanages Hydra in each tool.- Local telemetry in
~/.hydra/ledger.jsonl, which never leaves your machine; setHYDRA_TELEMETRY=0to turn it off.hydra improvereads it and shows, for each head and each tool, which calls returned more than the raw output, the latency, and whether agents followed the hooks.
Fixed
- A short passing test run comes back as its output alone, and replies drop the program's directory. One run that came back at 53 tokens from 29 now comes back at 29.
- The test hook no longer stops commands whose quoted text or heredoc data mentions
pytest. - The test suite no longer writes fixture calls into your ledger.
- The bootstrap test passes on macOS.
Docs
The README is rewritten, and the full detail now lives in docs/how-it-works.md and docs/evaluations.md.