Summary
The v2.1.1 release retired pai-history-system and claims that "Core installation now provides complete memory/history functionality out of the box." However, the history capture hooks were deleted from pai-history-system but never added to pai-core-install, leaving the MEMORY system without automatic event capture.
Version
- PAI Version: v2.1.1
- Affected commit:
45bb441 (2026-01-09)
Expected Behavior
According to the v2.1.1 changelog:
History System Retired
- Removed standalone pai-history-system pack
- History/context-tracking functionality is now part of pai-core-install as the MEMORY System
- Core installation now provides complete memory/history functionality out of the box
Users installing pai-core-install should have working history capture without needing pai-history-system.
Actual Behavior
-
The pai-core-install README still lists pai-history-system as an optional dependency (line 12-13):
dependencies:
- pai-hook-system (required)
- pai-history-system (optional) - History capture for skill usage and learnings
-
The pai-core-install README states "Hooks registered: 0" (line 224)
-
The settings.json.template in pai-core-install references hooks that no longer exist:
"command": "bun run $PAI_DIR/hooks/capture-all-events.ts --event-type SessionStart"
"command": "bun run $PAI_DIR/hooks/capture-session-summary.ts"
"command": "bun run $PAI_DIR/hooks/stop-hook.ts"
"command": "bun run $PAI_DIR/hooks/subagent-stop-hook.ts"
-
These hooks were deleted in commit 45bb441:
Packs/pai-history-system/src/capture-all-events.ts | 130 ------
Packs/pai-history-system/src/capture-session-summary.ts | 159 --------
Packs/pai-history-system/src/stop-hook.ts | 190 ---------
Packs/pai-history-system/src/subagent-stop-hook.ts | 233 -----------
-
No corresponding files were added to pai-core-install or pai-hook-system
Impact
- Users following the documentation will have a non-functional MEMORY system
- The
settings.json.template will reference non-existent hooks, causing errors
- The MEMORY directories exist but never get populated with data
Suggested Fix
Either:
Option A: Add hooks to pai-core-install
- Move the 4 deleted hooks to
Packs/pai-core-install/src/hooks/
- Move
lib/metadata-extraction.ts to Packs/pai-core-install/src/hooks/lib/
- Update INSTALL.md to copy hooks during installation
- Update paths from
history/ to MEMORY/ in the hooks
Option B: Add hooks to pai-hook-system
- Move the 4 deleted hooks to
Packs/pai-hook-system/src/
- Move
lib/metadata-extraction.ts to Packs/pai-hook-system/src/lib/
- The
settings.json.template in pai-core-install already expects them in $PAI_DIR/hooks/
Files That Need the Hooks
The hooks can be recovered from git history:
git show 45bb441^:Packs/pai-history-system/src/capture-all-events.ts
git show 45bb441^:Packs/pai-history-system/src/capture-session-summary.ts
git show 45bb441^:Packs/pai-history-system/src/stop-hook.ts
git show 45bb441^:Packs/pai-history-system/src/subagent-stop-hook.ts
The metadata-extraction.ts library still exists in pai-observability-server:
Packs/pai-observability-server/src/hooks/lib/metadata-extraction.ts
Additional Notes
- The hooks need path updates:
history/ → MEMORY/ to match the v2.1.1 structure
- The default PAI_DIR should be
~/.claude not ~/.config/pai to match Claude Code's default
Workaround
Users can manually recover the hooks from git history and install them:
cd ~/PAI
git show 45bb441^:Packs/pai-history-system/src/capture-all-events.ts > ~/.claude/hooks/capture-all-events.ts
# ... etc, then update paths from 'history' to 'MEMORY'
Found while installing PAI v2.1.1 on a fresh system.
Summary
The v2.1.1 release retired
pai-history-systemand claims that "Core installation now provides complete memory/history functionality out of the box." However, the history capture hooks were deleted frompai-history-systembut never added topai-core-install, leaving the MEMORY system without automatic event capture.Version
45bb441(2026-01-09)Expected Behavior
According to the v2.1.1 changelog:
Users installing
pai-core-installshould have working history capture without needingpai-history-system.Actual Behavior
The
pai-core-installREADME still listspai-history-systemas an optional dependency (line 12-13):The
pai-core-installREADME states "Hooks registered: 0" (line 224)The
settings.json.templateinpai-core-installreferences hooks that no longer exist:These hooks were deleted in commit
45bb441:No corresponding files were added to
pai-core-installorpai-hook-systemImpact
settings.json.templatewill reference non-existent hooks, causing errorsSuggested Fix
Either:
Option A: Add hooks to pai-core-install
Packs/pai-core-install/src/hooks/lib/metadata-extraction.tstoPacks/pai-core-install/src/hooks/lib/history/toMEMORY/in the hooksOption B: Add hooks to pai-hook-system
Packs/pai-hook-system/src/lib/metadata-extraction.tstoPacks/pai-hook-system/src/lib/settings.json.templatein pai-core-install already expects them in$PAI_DIR/hooks/Files That Need the Hooks
The hooks can be recovered from git history:
The
metadata-extraction.tslibrary still exists inpai-observability-server:Additional Notes
history/→MEMORY/to match the v2.1.1 structure~/.claudenot~/.config/paito match Claude Code's defaultWorkaround
Users can manually recover the hooks from git history and install them:
Found while installing PAI v2.1.1 on a fresh system.