Skip to content

A second brain for Claude Code. Now for every AI coding assistant.

Coding agents flood their own context with grep dumps and re-read files, then forget your conventions between sessions. OpenWolf gives Claude Code, Codex, OpenCode, and other agents one persistent project brain: verbose output governed before it enters context, a durable project index, memory that survives compaction, and every saving measured from your agent's own transcripts. No workflow changes.

terminal
$ openwolf init
Agents detected: codex, gemini (auto-wiring)
Codex hooks registered (.codex/hooks.json)
Skills installed: /handoff, /security-audit, /reframe
OpenWolf v2.4 initialized
Claude Code hooks registered (10 hooks)
Hook install verified (selfcheck passed)
Anatomy scan: 24 files indexed
You're ready. Use your agents as normal. OpenWolf is watching.

The waste is not where you think it is.

Before building 2.x we audited 16 live projects: 6,869 real API calls of transcripts. Nearly half of all tool-result tokens arrived through Bash: grep floods, git show dumps, test logs, whole files printed with cat. And every one of those tokens is re-read from cache on every later API call for the rest of the session. The cost of a byte is not its size. It is its size times every call that follows.

So OpenWolf governs the Bash channel at the source, keeps context healthy across long sessions, and measures everything it claims from your agent's own transcripts. Including its own overhead.

48%of tool-result tokens flow through Bash (measured, 16-project audit)
10xvalue of keeping bytes out of context vs trimming prompts (cache economics)
0unverifiable claims: every number traces to a transcript

One governed grep flood, measured at the rewrite point.

Command output
41,203
Entered context
1,850

The full output stays on disk with a pointer, so nothing is lost. Your own deltas: run openwolf report.

Features

Everything works invisibly

OpenWolf hooks into your agent's lifecycle. No commands to remember. It just makes every session smarter.

The Bash Output Governor

grep floods, git show dumps, and file re-prints are condensed structurally before they enter context. The full output stays on disk with a pointer. Test failures are never touched. The saving is measured per call, at the rewrite point.

Measured, Verified, Attributed

Real usage from every transcript, per model. Hook delivery verified against the harness's own records. Cache rebuilds attributed to their trigger and cost. If OpenWolf claims it, it can prove it.

Context That Survives

A ~400-token index of your project state at session start. Rules re-surfaced on a cadence to counter within-session decay. Compaction restores the path-scoped rules the platform documents as lost.

Large Repos, Navigated

openwolf find answers location queries in under 1k tokens. openwolf map ranks the important files by personalized PageRank over the import graph. Tree-sitter symbols give exact line ranges for slice reads.

A Committed Team Brain

Conventions, corrections, and bug fixes live in files that travel through git and code review, readable by every agent and every teammate. On Claude Code, they sync both ways with native auto-memory.

Provably Alive

Heartbeats on every hook, a session-start self-test, and install verification on every update. A hook cannot die silently. Plus loopback-only token-auth dashboard, zero shell interpolation, and secrets excluded from every index.

How It Works

Three steps. Then invisible.

01

Initialize

Run one command in any project. Creates .wolf/ directory, registers hooks, scans all files.

$ openwolf init
02

Work Normally

Just use claude as you always do. Hooks fire invisibly, tracking, learning, enforcing. You don't interact with any of it.

$ claude
03

See the Proof

Every session, OpenWolf learns preferences, logs bugs, and governs output. The dashboard shows tokens verifiably kept out of context, hook health, and what broke your prompt cache.

$ openwolf dashboard
Architecture

The .wolf/ directory

Every project gets a .wolf/ folder containing state, learning memory, and configuration. Markdown is the source of truth.

anatomy-index.json

Durable project index: descriptions, token estimates, content hashes, symbols, and the import graph. Rendered to anatomy.md.

cerebrum.md

Learned preferences, conventions, Do-Not-Repeat mistakes. Budgeted, committed, shared across agents and teammates.

STATUS.md

Session handoff. Regenerate it with /handoff; the next session reaches productive context in one small read.

buglog.json

Bug and fix memory with full-text search. The pre-write hook recalls relevant past fixes before an edit repeats them.

hooks/

10 Node.js lifecycle hooks shared by all wired agents. Pure file I/O, no network, no AI calls, heartbeat-monitored.

token-ledger.json

Estimated, measured, and transcript-verified usage per session and agent, plus governor deltas and cache-rebuild attribution.

Hooks

The enforcement layer

Ten hooks fire on every agent action. Heartbeat-monitored, never permission-bypassing. Pure Node.js. No network, no AI, no extra cost.

SessionStartsession-start.jsSelf-tests the install, injects the state index, restores post-compaction context
PreToolUsepre-read.jsDuplicate-read advisories, anatomy descriptions, symbol and outline hints
PreToolUsepre-write.jsDo-Not-Repeat checks and relevant past bug fixes, before the edit happens
PreToolUsepre-bash.jsSuggests output caps for commands about to flood the context
PostToolUsepost-bash.jsThe governor: condenses oversized output, preserves the original, measures the delta
PostToolUsepost-read.jsRecords real read sizes into session tracking
PostToolUsepost-write.jsUpdates the index under a lock, logs the action, enforces state budgets
PostToolBatchpost-batch.jsRe-surfaces the top rules every N batches, countering instruction decay
PreCompactprecompact.jsSnapshots session state before context compaction
Stopstop.jsFlushes the ledger with measured usage and transcript-verified hook delivery

Make your coding agent smarter

One install. One init. Then it's invisible.

AGPL-3.0 · Made by Cytostack