init 后需在 agent 中完成项目或 hook 信任确认,并新开会话才生效;hook 覆盖范围取决于已安装的 agent 版本;openwolf bench 会真实调用模型并可能产生付费用量
openwolf
cytostackAGPL-3.0活跃维护给 Claude Code、Codex、OpenCode 等编码代理提供可跨工具共享的本地项目记忆,并根据运行记录统计 token 消耗,全程本地文件读写、不联网。
Portable project memory across Claude Code, Codex and OpenCode, plus token accounting measured from harness transcripts. Local file I/O, no API calls, no telemetry.
npm install -g openwolf
cd your-project
openwolf initREADME 未说明;仅要求 Node.js 20 或更高版本,以及至少一个受支持的 agent,可在 macOS、Linux 和 Windows 上运行
在 Claude Code、Codex 和 OpenCode 之间共享项目记忆,并按 agent 统计 token 用量
给 Claude Code、Codex、OpenCode 等编码代理提供可跨工具共享的本地项目记忆,并根据运行记录统计 token 消耗,全程本地文件读写、不联网。
核心能力
- 把任务目标、已完成工作和下一步保存为检查点,供 Claude 和 Codex 恢复
- 用项目地图索引文件描述、符号和导入关系,支持局部扫描
- 归档旧会话笔记,保留活跃、最新和置顶笔记
- 识别未变文件的重复读取,可缩短 Claude 的大段 Bash 输出并本地留存原文
- 按 agent 和模型汇总 token 计数与 API 成本估算
容易踩的坑
- v2.5.3最新正式版2026-10-19 · 2026-10-19 19:40 UTC
OpenWolf 2.5.3 improves daemon reliability, Windows execution, OpenCode V2 support and everyday project maintenance.
- Keep source watchers alive on errors and apply project exclusions. Repair Windows PM2 and OpenCode npm execution.
- Support native OpenCode V2 events and safe migration from managed V1 plugins, including read fingerprints, successful edits and per-step usage.
- Reduce repeated startup context, respect disabled projects, repair upgrades and catch up supported maintenance after sleep or restart.
- Fix #114: excluded and generated files no longer count as anatomy misses. Historical counters remain unchanged.
- Put activity, memory approval and system diagnostics in their own dashboard pages. Report actual connection state and distinguish daemon versions from project hook versions.
- Default to light mode, refresh the website and documentation, and add an animated command walkthrough and contributor links.
- Offer opt-in task-review nudges that never stop or terminate an agent task.
Upgrade
Install
[email protected], runopenwolf update --dry-run, then update the intended projects. Restart each project daemon withopenwolf daemon restartand start new agent sessions. Review customized OpenCode plugins and global Claude commands before migrating them. See the upgrade guide.Validation
369 regression tests passed. Windows, macOS, Linux and Node 20 CI passed, including clean package installation and upgrades from published 2.5.2. Native OpenCode 2.0.32 passed enabled and disabled integration checks on macOS with a local deterministic model fixture. Documentation builds and desktop/mobile browser checks passed. Native live-provider and representative interactive Windows timing are not claimed by these checks.
Thanks
Thanks to @itdove, @CochainComplex, @davdittrich and @CBenadieBHC for contributed implementations, and @Noboxer, @citizenshanegit, @Jezzaw56, @eram, @aethyron and @marrahi for reports and reproductions. Original contributor commits are preserved. Full roles and prior contributors are recorded in CREDITS.md and the October audit.
Implementation: #140. This GitHub release does not itself publish the npm package.
- v2.5.22026-09-15 · 2026-09-15 16:00 UTC
查看更新说明
OpenWolf 2.5.2 adds saved task handover, more reliable project memory, recorded usage by model and quiet session notices.
Changes
- Transfer selected saved context between Claude Code and Codex with explicit handover packets and project checks.
- Recover task checkpoints after supported session restarts and compaction.
- Archive eligible old notes with restore pointers. Preserve active, latest and pinned notes.
- Preserve project-map entries during partial scans and improve updates after file changes.
- Reconcile available Claude, Codex and OpenCode token counters. Estimate API costs using the actual provider and model, with missing data shown.
- Prepare compatible stable hook and plugin updates for new sessions. Major upgrades remain notification-only by default.
- Show short notices for completed OpenWolf work and synchronize handover, usage, memory and activity in the dashboard.
- Fix concurrent writes, missing hook dependencies, malformed settings handling and Windows runtime and daemon path issues.
Upgrade
npm install -g [email protected] openwolf update --dry-run openwolf updateRestart project daemons and start new agent sessions. Automatic runtime updates do not replace the global CLI or a running daemon.
Checks and limits
All 322 regression tests passed on Linux, macOS and Windows. Package installation, 2.5.1 upgrade and daemon checks passed, including Node 20. Main validation.
Native Codex recovery through resume and compaction, OpenCode notifications and Grok startup were checked. A full live Claude to Codex to Claude coding handover and broader token-efficiency comparisons remain unverified. Protected durable instructions require independent administrator setup. Handover imports remain explicit. API cost estimates are not subscription charges.
Credits
Thank you to the reporters, PR submitters, code authors and reviewers. Contributor credits and the issue and PR audit record each role and distinguish adapted work from merged PRs.
- v2.5.02026-08-29 · 2026-08-29 20:52 UTC
查看更新说明
[2.5.0] - 2026-08-22
Positioning, and the removal of the last thing that made "no API calls" untrue.
Added
- Cost. The dashboard prices measured usage at Anthropic's published rates, per model, split into cache reads, output, cache writes and fresh input. On one real 277-call project that is $84, of which 67% is cache reads: a number that was previously visible only as "102.3M" with no way to size it. Labelled as list price throughout, because a subscription user is not billed per token.
- Overhead as a ratio. "1.4K injected" now reads "1.6% of what it kept out", which is the claim the footnote on openwolf.com already makes.
- Governor breakdown by command family. The classifier always knew the
family at the rewrite point, but the rollup threw it away and kept only
scalars. Sessions now carry
bash_governed_by_family, folded into a lifetime map that survives session trimming, so the dashboard can answer which families are paying off and which are set to suggest. - A plain-language panel. Not everyone using OpenWolf reads ledgers. One paragraph states how many tokens were kept out of context, what that would have cost at the ceiling, what OpenWolf spent doing it, and the net.
Changed
- Reads and writes were two numbers glued with a dot; they are now "edits per file read", with the raw counts underneath.
- A sub-30% anatomy hit rate is called out in the accent colour instead of sitting in a neutral tile: it is the most actionable number on the page.
- The "saved · denied re-reads" tile no longer renders a dead "n/a" in warn mode. Warn mode says what it caught and how to switch to deny.
Removed
- AI suggestions and every other model call. The
ai_taskcron action shelled out toclaude -pfor two weekly tasks (cerebrum reflection and project suggestions). It was the only path in OpenWolf that reached a model, and it contradicted the one claim the whole project rests on. Gone, along with the Insights dashboard panel,suggestions.json, and thecron.use_claude_p/cron.api_key_envsettings.openwolf updatedeletes the leftover file; a stale manifest entry now fails loudly instead of silently reaching the network.
Fixed
- Windows hooks, properly this time. 2.0.4 swapped
$CLAUDE_PROJECT_DIRfor%CLAUDE_PROJECT_DIR%on Windows, which fixed nothing: PowerShell is Claude Code's shell there and has no%VAR%expansion, and the variable is not in the hook environment on any platform to begin with (project context arrives through the stdin JSON payload). Every hook died with MODULE_NOT_FOUND on every tool call. Hook commands now carry the resolved absolute path, so no shell expansion is involved at all. Hooks also derive the project root from their own location when no environment variable is set. Reported in detail by @aevnar. - A malformed buglog no longer takes anything down. A
.wolf/buglog.jsonwritten as a bare array of entries (the natural shape when an agent writes the file by hand) reachedbugs.lengthunguarded. In one real project the pre-write hook failed on 465 consecutive invocations with nothing but the heartbeat noticing,openwolf bug searchthrew, the SessionStart file index was silently dropped, and the dashboard rendered a blank page. Both shapes are now normalised at the boundary, in the hooks, the CLI, and the dashboard loader. - Dashboard panels render inside an error boundary: one malformed state file degrades a single panel instead of blanking the page.
detectAgent()recognises Claude Code byCLAUDECODE, which is actually set, instead ofCLAUDE_PROJECT_DIR, which is not. Sessions were being attributed to "default" and losing their per-agent ledger rows.openwolf updatenow also removes hand-patched hook entries written with native Windows path separators, which previously survived the filter and ran alongside the new on
- v2.5.12026-08-29 · 2026-08-29 20:45 UTC
查看更新说明
[2.5.1] - 2026-08-30
Sixteen reported defects, fixed. Fifteen were found and reported by @davdittrich, one by @krsfer, each with a reproduction. Every fix carries a regression test that was first run against the unfixed code and observed to fail.
Fixed
daemon stopcould terminate an unrelated process (#78). The fallback path sent SIGTERM to every PID listening on the configured dashboard port. Port occupancy is not ownership. The daemon now records.wolf/daemon.pidafter a successful bind, and stop signals a process only when the record was written on this host, for this project root, for a live PID that still looks like the daemon. Anything else holding the port is reported and left alone.- An existing dashboard token kept its permissions (#79). New tokens were written 0600; a token file that already existed at 0644 was returned as-is and stayed readable by other local users. It is now repaired in place, never rotated, since a readable token is still the token a live browser tab holds.
- Read tracking escaped the project root (#80). Containment was a
startsWithcheck, so../project-private/secret.tsshares a prefix with../projectand was recorded in that project's session state and token metrics. The Bash read channel had no root check at all. All three hooks now share one lexicalpath.relativecheck, with a realpath fallback so a project reached through a symlink is not silently dropped. - Codex install destroyed a malformed
hooks.json(#81). A parse failure was caught and OpenWolf-only defaults were written over the user's file, reporting success. The file is now left byte-identical, hooks are not reported as registered, and one actionable warning explains how to recover. - Parallel hooks lost session state (#83). Atomic writes prevent torn files, not lost updates: two hook processes that each read, modify and write both produce valid JSON, and the second erases the first. Measured at 60 concurrent post-read hooks, 6 of 60 reads survived. Every shared-state read-modify-write now runs through one bounded lock-backed transaction that reads inside the lock. 21 call sites across 13 files.
- Concurrent SessionStart lost ledger increments (#84). 60 concurrent startups created 60 session files and counted 31.
- Cron state writes bypassed the lock after timeout (#86). The fallback wrote anyway once the budget expired, which defeats the lock for every writer that respects it. Contention now fails closed and reports itself.
- Concurrent registry updates lost projects (#88). 60 concurrent
registrations kept 31.
openwolf initin several projects at once is exactly this shape. - Concurrent OpenCode sessions shared one state file (#89). Every handler
received a session id but all of them persisted to
hooks/_session.json, so a second session overwrote the first and later reads from either mutated the survivor. State is now per session id, with the legacy file kept only when no usable id exists, and session files are garbage collected after 7 days. - The Bash governor pointed at a deleted log (#82). Full output was written, the cache was pruned, and the model was then handed a pointer to a file the prune had just removed, described as "preserved verbatim". Output is now verified present before anything claims it was preserved; an output larger than the whole cache budget says so plainly instead.
- A skipped anatomy write still advanced freshness (#85). On lock
contention the scan wrote nothing but recorded the current Git HEAD in
_scan-state.json, so the index was reported current when it was empty and the rescan that would have fixed it was suppressed. - Unknown cron task IDs reported success (#87).
runTasklogged a warning and resolved, so the API returned 200 and the CLI printed "triggered" for a task that does not
- v2.4.12026-08-20 · 2026-08-20 19:43 UTC
查看更新说明
Fix from the pre-publish end-to-end test: the anatomy scanner no longer indexes agent-config directories (.claude, .codex, .opencode, .gemini, .cursor). Harness config is noise in a code index and was even topping importance rankings in real projects.
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
| Without OpenWolf | With OpenWolf |
|---|---|
| A new session may need the same project explanation again | Saved task context, project notes and known fixes remain in .wolf/ |
| Switching agents can leave unfinished work in the previous conversation | Explicit Claude and Codex handover packets carry selected saved context |
| Usage records are spread across agent sessions | Available token counters and API cost estimates are grouped by agent and model |
| Older session notes make useful information harder to find | Eligible old notes are archived with verified restore pointers |
| Repeated file reads and large command results use session space | Read guidance and supported output controls help reduce repeated context |
What it does
A coding session produces useful context: the task objective, files changed, failed tests and the next action. That information can be difficult to recover after compaction, a restart or a change of agent. Large file reads and command results can also fill a session with repeated text.
OpenWolf stores selected context beside your project and connects to the session and tool events your coding agent supports:
- Keep the objective, completed work, unresolved problems and next action in a checkpoint. Supported Claude and Codex hooks can restore saved context.
- Find files and symbols through a project map with descriptions, line ranges and import relationships. Partial scans preserve earlier entries.
- Save project notes and known fixes for later sessions. Archive eligible old session notes while retaining active, latest and pinned notes.
- Identify repeated reads of unchanged files. Supported Claude hooks can shorten selected large Bash results and retain the original output locally.
- Review available provider token counters, model cost estimates, hook health and completed OpenWolf activity in the dashboard.
Quick start
npm install -g openwolf
cd your-project
openwolf init
init detects installed agents and sets up their project integration.
Complete any project or hook trust review shown by your agent, then start a
new session. You can select agents with --agent claude codex opencode.
Supported agents
| Agent | Integration |
|---|---|
| Claude Code | Lifecycle hooks, read guidance, Bash output controls and skills |
| Codex CLI | Project hooks and AGENTS.md: saved task recovery and supported session and tool events |
| OpenCode | Native plugin and AGENTS.md: session and tool events, usage records and activity toasts |
| Grok Build | Enabled Claude-compatible hook discovery; activity notices stay in the dashboard |
| Cursor | Rules file (context only) |
| Gemini CLI | GEMINI.md block (context only) |
| Antigravity | AGENTS.md block (context only) |
Agents use the project's .wolf/ directory. The generated .gitignore
excludes local runtime data. Review notes, bug records and indexed content
before sharing them. Hook coverage depends on the installed agent version.
See the integration guide for details.
How it works
openwolf init creates .wolf/ and registers supported hooks or a plugin.
Memory, indexing and usage processing run locally without extra model calls.
The optional background update worker contacts npm to check for new runtimes.
| File | Purpose |
|---|---|
anatomy-index.json | Project index: file descriptions, sizes, symbols and imports |
cerebrum.md | Candidate preferences, conventions and recurring corrections |
STATUS.md | Current project status and unfinished work |
buglog.json | Searchable records of problems and fixes |
memory.md | Session notes and outcomes |
token-ledger.json | Operational records and separate content-size estimates |
hooks/ | Installed lifecycle hooks and session state |
cache/bash/ | Preserved originals of shortened Bash output |
handoff/ | Task checkpoints, source references and handover packets |
archive/ | Older session notes with verified restore pointers |
usage/, activity/ | Recorded usage and completed OpenWolf actions |
During a session:
- Session start. Load a short project index and available saved task evidence. New sessions can select a verified compatible runtime update.
- Before reads. Identify eligible repeated reads and offer symbol guidance for large indexed files. Changed files and ranged reads are handled separately.
- After Bash. Supported Claude hooks can shorten selected output above an estimated size threshold. The original stays in a local cache. Test and build output are advisory-only by default.
- Every 25 tool batches. Supported Claude events can repeat selected approved rules within a size budget. Durable instruction injection requires an independently protected installation and administrator review.
- On compaction. Save a checkpoint for supported recovery paths. Recovery uses persisted task evidence; it cannot reproduce every part of live context.
- On stop. Record available usage and session observations. Eligible activity notices report completed work within the configured message limit.
Measurement
openwolf report
Example from a checked Codex session, shown in a shortened format:
Recorded provider usage
Input tokens: 50,393
Cached input: 28,800
Fresh input: 21,593
Output tokens: 146
Reasoning tokens: 80
Total tokens: 50,539
Cost calculation
Fresh input: model input rate
Cached input: model cached-input rate
Output: model output rate
Coverage
Cached input is included in input tokens.
Reasoning is included in output tokens in this record.
Content-size estimates are reported separately.
How to read the reports:
- Recorded usage comes from available Claude transcripts, Codex session records and OpenCode plugin records. Repeated records are reconciled. Missing counters remain unavailable rather than being reported as zero.
- Cost estimates use the relevant provider and model rates, including separate cache categories where available. They represent API list prices, not subscription charges. Unknown models and pricing assumptions are shown.
- Local estimates describe content size and output changes. They are separate from provider counters and do not prove a fixed amount of token savings.
openwolf usage report --json provides the recorded-usage report.
openwolf bench --repo <fixture> --yes compares supported coding tasks with
and without OpenWolf. It uses real model access and can consume paid usage.
Reliability
Hook heartbeats, runtime checks and dashboard health help identify missing or failing integrations. Project updates check installed hook modules and report errors. Concurrent writes use journals or locks where required, and incomplete project scans retain entries they did not reach.
Compatible stable hook and plugin updates can be prepared in the background for new sessions. Major upgrades are notification-only by default. A running session keeps its selected runtime. This does not replace the global CLI or a running dashboard daemon. See automatic updates.
Security
- The dashboard binds to
127.0.0.1by default and requires a project token. - Hooks do not approve tool calls. Permissions remain with the agent and user.
- Handover imports check project identity, source records and repository drift.
- Sensitive-file exclusions and path checks reduce accidental exposure. Review saved content before sharing it; automatic filtering has limits.
- Saved notes do not approve themselves. Automatic durable instruction injection requires independent administrator review and a protected runtime.
Skills
Available through the supported agent integration:
/handoffhelps updateSTATUS.mdwith current work and open items./security-auditguides a project review and records findings in the bug log./reframeguides interface review, framework selection and migration work.
Skills guide your coding agent and use its normal model budget. For an explicit
Claude and Codex transfer, use the handover commands.
OpenWolf can read supported local session records used for Claude recovery;
it does not run Claude's /resume inside Codex or access private reasoning.
Dashboard
openwolf dashboard
The local dashboard shows project memory, the code index, handover records, recorded token usage and API cost estimates by agent and model. Usage coverage and missing data remain visible.
Activity history shows completed OpenWolf work, such as saved checkpoints, restored context and archived notes. Hook health and update status show which runtime is installed and whether a newer compatible runtime is ready. Data refreshes while the dashboard is open. Restart the daemon after a package upgrade to load updated dashboard code.
Commands
openwolf init Set up .wolf/ and detected agents
openwolf status Check installation and hook health
openwolf scan Refresh the project index
openwolf scan --check Check index freshness without writing
openwolf find <query> Find an indexed symbol or file
openwolf find --file <p> Show one file's description and symbol map
openwolf map Show a focused project overview
openwolf report Review operational records and usage
openwolf usage report Report available provider token counters
openwolf handoff list Find saved Claude and Codex sessions
openwolf handoff search <q> Search saved task evidence
openwolf memory archive Archive eligible older session notes
openwolf bench Compare supported tasks (--yes required)
openwolf bug search <term> Search known problems and fixes
openwolf dashboard Open the local dashboard
openwolf cron list List scheduled maintenance tasks
openwolf update Refresh registered projects from the installed package
openwolf self-update Check npm and prepare a compatible project runtime
openwolf restore [backup] List backups or restore the selected snapshot
Requirements
Node.js 20 or later and at least one supported agent. OpenWolf runs on macOS, Linux and Windows. Bug-log search uses Node's built-in SQLite where available and falls back to a simpler matcher otherwise.
Limitations
- Recorded usage is limited to the counters each agent saves. Local character-ratio estimates are not exact provider token counts.
- Hook and display support differ by agent and version. Claude output controls are not available through every other integration.
- Handover transfers selected saved evidence. A full live Claude to Codex to Claude coding handover and broader token-efficiency comparisons remain unverified. See the validation record.
- Protected durable memory needs independent administrator setup. Ordinary project maps, checkpoints, archival and activity reporting work without it.
Contributors
Contributor acknowledgements are retained below. The credits and issue and PR audit distinguish reporters, PR submitters, original authors and co-authors. Adapted work is identified separately from merged contributions.
License
Author
Created by Farhan Palathinkal, Cytostack