v3.38.3 β hooks intelligence --train actually trains
Fixes
#2940 β ruflo hooks intelligence --train exited 0 and printed a full success dashboard without ever training anything. The --train flag was declared on the hooks_intelligence MCP tool's input schema but never read β the handler always returned the same read-only status snapshot, and the CLI's --train branch was a cosmetic 500ms sleep followed by an unconditional "Training cycle completed". lastAdaptation (what --status reports as "Last Training") never moved, so it could only ever age no matter how many times --train ran β a naive --status diff looked like progress in exactly the wrong direction.
Now hooks_intelligence calls the existing distillLearning() when --train is passed and reports what actually happened: patterns distilled (with the count), ran but found nothing new to distill (the common case β SONA already adapts incrementally per-trajectory, so a manual pass legitimately finding nothing new isn't an error), or the intelligence system being unavailable. --status immediately reflects a real training pass (0s ago) instead of showing a stale, aged value.
Also investigated this cycle
- #2908 (
hooks post-task --store-resultswrites an entrymemory searchnever finds) β root-caused precisely:memory-bridge.ts'sgetRegistry()is a process-wide singleton that locks onto whichever DB path its first caller in a process supplies, andhooks post-taskmakes several bridge calls before the write in question β so a dbPath fix scoped to just that call site is silently discarded. Same class of issue as #2259, just resurfaced under different filenames on the current codebase. Did not ship a narrow fix since it doesn't actually work end-to-end (verified by trying). Full mechanism: #2908 comment. - #2905 (
npx @claude-flow/cli@alpha --version"hangs" on a cold cache) β reframed: it's not an infinite hang, a truly cold install completes in ~3 minutes (verified), just slow enough to look like one under a 60β90s timeout. Root-caused one concrete, narrow contributor:@agntcy/slim-bindings's nine platform sub-packages are all missingos/cpufields, so npm installs all nine on every platform instead of the one that matches. Filed upstream: agntcy/slim#1981.