Skip to content

This release adds 2 notable features for engineering teams evaluating rollout.

✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

ai ai-agents ai-memory anthropic artificial-intelligence claude
+12 more
claude-agent-sdk claude-agents claude-code-plugin claude-skills codex embeddings long-term-memory memory-engine openclaw openclaw-skills postgresql llm

ReleasePort's take

Light signal
editorial:auto 13d

v0.7.24 adds per-session token-savings notifications displaying concrete usage metrics from 14 test sessions (12.9k tokens saved, 63 memory searches). A critical bugfix in syncHivemindHooksToSettings restores Hivemind hook synchronization on install/update, fixing missing notifications.

Why it matters: Token savings now visible per-session, enabling cost tracking and resource optimization. Hook sync bugfix restores notification delivery on installation. Essential for Claude Code users managing Hivemind workflows and tracking token consumption.

Summary

AI summary

Per-session token‑savings notification shows ~12.9k tokens saved across 14 sessions with 63 memory searches.

Changes in this release

Feature Medium

Per-session savings notification displays token savings at session start.

Per-session savings notification displays token savings at session start.

Source: llm_adapter@2026-05-21

Confidence: high

Feature Medium

Session JSONL parsed at SessionEnd to extract memory search bytes and count.

Session JSONL parsed at SessionEnd to extract memory search bytes and count.

Source: llm_adapter@2026-05-21

Confidence: high

Feature Medium

Append/read usage statistics in ~/.deeplake/usage-stats.jsonl for session tracking.

Append/read usage statistics in ~/.deeplake/usage-stats.jsonl for session tracking.

Source: llm_adapter@2026-05-21

Confidence: high

Feature Medium

At SessionStart, compute and render token savings using local usage data.

At SessionStart, compute and render token savings using local usage data.

Source: llm_adapter@2026-05-21

Confidence: high

Feature Medium

Session ID extracted from stdin in session-notifications hook.

Session ID extracted from stdin in session-notifications hook.

Source: llm_adapter@2026-05-21

Confidence: high

Feature Medium

SessionEnd hook now records session usage before wiki-worker lock check.

SessionEnd hook now records session usage before wiki-worker lock check.

Source: llm_adapter@2026-05-21

Confidence: high

Bugfix Medium

syncHivemindHooksToSettings rewrites hivemind hooks on install/update, fixing missing notifications.

syncHivemindHooksToSettings rewrites hivemind hooks on install/update, fixing missing notifications.

Source: llm_adapter@2026-05-21

Confidence: high

Refactor Medium

"tryClaim" in state.ts uses openSync with O_CREAT|O_EXCL for deduplication claims.

"tryClaim" in state.ts uses openSync with O_CREAT|O_EXCL for deduplication claims.

Source: llm_adapter@2026-05-21

Confidence: high

Full changelog

Summary

Per-session savings notification at session start using the published LoCoMo benchmark multiplier:

🐝 Hivemind has saved you ~12.9k tokens
   14 sessions · 63 memory searches

Formula (plain math, X − Y = Z)

Y = memorySearchBytes / 4
    bytes returned from Bash tool calls grep'ing ~/.deeplake/memory/
    (memory summaries + sessions raw — both live under that root),
    summed across all records in ~/.deeplake/usage-stats.jsonl,
    divided by 4 to approximate tokens (BPE rule-of-thumb)

X = 1.7 · Y
    counterfactual: tokens to do the same work without hivemind,
    per the published LoCoMo benchmark at deeplake.ai/hivemind —
    1,008 vs 1,700 tokens / Q with Claude Haiku via `claude -p`,
    hybrid lexical + semantic retrieval

Z = X − Y = 0.7 · Y
    tokens saved (the headline number)

No LLM calls, no SQL, no new backend endpoints. Pure local file IO + arithmetic.

What's new

| File | Purpose |
|---|---|
| src/notifications/transcript-parser.ts | Walk session JSONL at SessionEnd, extract memorySearchBytes (bytes Claude received from memory-grep tool calls — matched via tool_use_id to tool_result content) and memorySearchCount. |
| src/notifications/usage-tracker.ts | Append/read ~/.deeplake/usage-stats.jsonl. Minimal record shape {endedAt, sessionId, memorySearchBytes, memorySearchCount}. Backward-compat reader for legacy records. |
| src/notifications/sources/local-usage.ts | At SessionStart, sum across all records, apply Z = 0.7 · Y / 4, render. dedupKey = {session: sessionId} so each new session refires with updated numbers. |

What's modified

  • src/notifications/index.ts — thread sessionId from hook stdin, wire fetchLocalUsageNotifications into the source list, filter through tryClaim to prevent duplicate emission from the dual SessionStart hook registration (settings.json + marketplace hooks.json both fire in parallel).
  • src/notifications/state.tstryClaim() uses openSync(path, "wx") (O_CREAT|O_EXCL semantics) on per-(id, dedupKey-hash) claim files. First process wins, second gets EEXIST and skips. Fail-open on non-EEXIST FS errors.
  • src/hooks/session-end.ts — parse transcript_path from stdin, call recordSessionUsage() before the wiki-worker lock check.
  • src/hooks/session-notifications.ts — extract session_id from stdin (previously discarded).
  • src/cli/install-claude.tssyncHivemindHooksToSettings(): rewrites hivemind-owned hook entries in ~/.claude/settings.json from the marketplace's canonical hooks.json on every install/update. Fixes a real install bug — users whose first install predated session-notifications.js weren't seeing it fire after hivemind update because settings.json was never re-synced.

What's deferred

  • Channel 3 (skill auto-pull bytes in Y) — filed as #127. The current Y is a conservative lower bound; adding skill bytes will jump the displayed number.
  • Channel 4 (SessionStart instructions block) — explicitly excluded; it's hivemind explaining itself, not user past content.
  • $-figure rendering — model pricing varies; skip for v1.

Test plan

  • [x] Unit tests: 2263 / 2263 passing
  • [x] Per-file coverage thresholds met
    • transcript-parser.ts: 90/75/90/90
    • usage-tracker.ts: 90/75/90/90
    • sources/local-usage.ts: 90/80/90/90
    • state.ts: 90/75/90/90 (branches bumped from 80 for fail-open paths)
  • [x] Live E2E on test machine:
    • Single hook fires renders 🐝 Hivemind has saved you ~12.9k tokens / 14 sessions · 63 memory searches
    • Concurrent race (2 parallel processes, same session_id): exactly ONE emission. The other process's stdout is empty (claim file held).
    • New session_id: refires with cumulative numbers.
    • Re-invoke same session: silent (state dedup).
  • [x] Backward-compat verified: legacy records (predating memorySearchCount) are now counted in "N sessions" instead of silently dropped.

Verification math (live numbers from test machine)

total memorySearchBytes across 14 records = 73,474
Y = 73,474 / 4 = 18,368 tokens delivered
Z = 0.7 × 18,368 = 12,858 tokens saved → rounds to ~12.9k ✓
memorySearchCount total = 63 → "63 memory searches" ✓
records = 14 → "14 sessions" ✓

Citation

LoCoMo benchmark at deeplake.ai/hivemind: 100 QA, Claude Haiku via claude -p, hybrid lexical + semantic retrieval, 1,008 vs 1,700 tokens / Q → ratio 1.687 → rounded to 1.7×. Also: 25% cheaper ($6.65 vs $8.94 / 100 QA), 31% fewer turns (6.2 vs 8.9).

Summary by CodeRabbit

  • New Features
    • Per-session memory usage tracking records and automatically reports lookup activity metrics for sessions
    • Token savings recap notifications display efficiency improvements achieved through hivemind memory integration
    • Improved plugin installation with enhanced configuration management and hook synchronization capabilities
    • Streamlined and reliable installation workflows across multiple plugins and system integrations

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track Hivemind turns agent traces into skills and shares with your team

Get notified when new releases ship.

Sign up free

About Hivemind turns agent traces into skills and shares with your team

All releases →

Related context

Earlier breaking changes

  • v0.7.52 Removes `hivemind tasks` CLI and related code surfaces.
  • v0.7.51 Removes `hivemind tasks` CLI and related code surfaces.
  • v0.7.19 Module name skilify replaced with skillify; affects all imports
  • v0.7.19 CLI command skilify removed; renamed to skillify without deprecation alias
  • v0.7.18 CLI subcommand renamed from `skilify` to `skillify`; no deprecation alias.

Beta — feedback welcome: [email protected]