claude-recall 0.20.9 → 0.20.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -1 +1,114 @@
1
- {"hooks": {}, "hooksVersion": "1.0.0"}
1
+ {
2
+ "hooks": {
3
+ "SubagentStart": [
4
+ {
5
+ "hooks": [
6
+ {
7
+ "type": "command",
8
+ "command": "node /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/claude-recall/dist/cli/claude-recall-cli.js hook run subagent-start",
9
+ "timeout": 5
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "SubagentStop": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "node /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/claude-recall/dist/cli/claude-recall-cli.js hook run subagent-stop",
20
+ "timeout": 10
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "SessionStart": [
26
+ {
27
+ "matcher": "compact",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "node /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/claude-recall/dist/cli/claude-recall-cli.js hook run post-compact-reload",
32
+ "timeout": 10
33
+ }
34
+ ]
35
+ }
36
+ ],
37
+ "PostToolUse": [
38
+ {
39
+ "hooks": [
40
+ {
41
+ "type": "command",
42
+ "command": "node /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/claude-recall/dist/cli/claude-recall-cli.js hook run tool-outcome-watcher",
43
+ "timeout": 3
44
+ }
45
+ ]
46
+ }
47
+ ],
48
+ "PostToolUseFailure": [
49
+ {
50
+ "hooks": [
51
+ {
52
+ "type": "command",
53
+ "command": "node /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/claude-recall/dist/cli/claude-recall-cli.js hook run tool-failure",
54
+ "timeout": 3
55
+ }
56
+ ]
57
+ }
58
+ ],
59
+ "PreToolUse": [
60
+ {
61
+ "matcher": ".*",
62
+ "hooks": [
63
+ {
64
+ "type": "command",
65
+ "command": "python3 /home/ebiarao/repos-wsl/personal-projects/claude-recall/.claude/hooks/search_enforcer.py"
66
+ }
67
+ ]
68
+ }
69
+ ],
70
+ "UserPromptSubmit": [
71
+ {
72
+ "hooks": [
73
+ {
74
+ "type": "command",
75
+ "command": "node /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/claude-recall/dist/cli/claude-recall-cli.js hook run correction-detector"
76
+ }
77
+ ]
78
+ }
79
+ ],
80
+ "Stop": [
81
+ {
82
+ "hooks": [
83
+ {
84
+ "type": "command",
85
+ "command": "node /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/claude-recall/dist/cli/claude-recall-cli.js hook run memory-stop",
86
+ "timeout": 30
87
+ },
88
+ {
89
+ "type": "command",
90
+ "command": "node /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/claude-recall/dist/cli/claude-recall-cli.js hook run memory-sync",
91
+ "timeout": 10
92
+ }
93
+ ]
94
+ }
95
+ ],
96
+ "PreCompact": [
97
+ {
98
+ "hooks": [
99
+ {
100
+ "type": "command",
101
+ "command": "node /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/claude-recall/dist/cli/claude-recall-cli.js hook run precompact-preserve",
102
+ "timeout": 60
103
+ },
104
+ {
105
+ "type": "command",
106
+ "command": "node /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/claude-recall/dist/cli/claude-recall-cli.js hook run memory-sync",
107
+ "timeout": 10
108
+ }
109
+ ]
110
+ }
111
+ ]
112
+ },
113
+ "hooksVersion": "12.0.0"
114
+ }
@@ -8,26 +8,14 @@ source: claude-recall
8
8
 
9
9
  # Corrections
10
10
 
11
- Auto-generated from 16 memories. Last updated: 2026-04-06.
11
+ Auto-generated from 4 memories. Last updated: 2026-04-06.
12
12
 
13
13
  ## Rules
14
14
 
15
15
  - CORRECTION: Memory with complex metadata
16
16
  - CORRECTION: Memory with complex metadata
17
17
  - CORRECTION: Memory with complex metadata
18
- - CORRECTION: Memory with complex metadata
19
- - CORRECTION: Memory with complex metadata
20
- - CORRECTION: Memory with complex metadata
21
- - CORRECTION: Memory with complex metadata
22
- - CORRECTION: Memory with complex metadata
23
- - CORRECTION: Memory with complex metadata
24
- - CORRECTION: Memory with complex metadata
25
- - CORRECTION: Memory with complex metadata
26
- - CORRECTION: Memory with complex metadata
27
- - CORRECTION: Memory with complex metadata
28
- - CORRECTION: Memory with complex metadata
29
- - CORRECTION: License copyright should include user's name instead of 'Claude Recall Contributors'
30
- - CORRECTION: License copyright should list your name instead of 'Claude Recall Contributors'
18
+ - CORRECTION: Use true agentic design where agents decide when to run, not cron jobs
31
19
 
32
20
  ---
33
21
  *Auto-generated by Claude Recall. Regenerate: `npx claude-recall skills generate`*
@@ -1,24 +1,12 @@
1
1
  {
2
2
  "topicId": "corrections",
3
- "sourceHash": "1313608fb812bd1bed85d9854e8958179f7584619e0160604c56bd40ec8cc5b0",
4
- "memoryCount": 16,
5
- "generatedAt": "2026-04-06T17:24:01.505Z",
3
+ "sourceHash": "a6c78344ee4e1fb49b692fc1361cc992b2262c5e55ac59db8242e7e8ecbf07c0",
4
+ "memoryCount": 4,
5
+ "generatedAt": "2026-04-06T18:39:00.487Z",
6
6
  "memoryKeys": [
7
+ "memory_1775500740471_dp5hmdxaf",
8
+ "memory_1775499328353_2ade6746o",
7
9
  "memory_1775496241485_1yyc5ht88",
8
- "memory_1775494279035_j6uj5lzxo",
9
- "memory_1775492069326_vksvzmt3f",
10
- "memory_1775491767369_sepsjmg8y",
11
- "memory_1775169786543_43p8to1hu",
12
- "memory_1775169704632_wzwczltzu",
13
- "memory_1775169639101_rmxkftqtk",
14
- "memory_1775169273281_4fod7ku6f",
15
- "memory_1775169256118_y7kc07y6y",
16
- "memory_1775169244673_d6d0uc33a",
17
- "memory_1775160781806_vnqf355e9",
18
- "memory_1775159399542_awfryrxp3",
19
- "memory_1775157082825_8uvrul28i",
20
- "memory_1775156381094_dr1nihes8",
21
- "hook_correction_1774180798682_9b5a2hadq",
22
- "hook_correction_1774180805192_4ft4zhfsa"
10
+ "hook_correction_1775498361284_9amjuw4le"
23
11
  ]
24
12
  }
@@ -8,12 +8,20 @@ source: claude-recall
8
8
 
9
9
  # Failure Lessons
10
10
 
11
- Auto-generated from 16 memories. Last updated: 2026-04-02.
11
+ Auto-generated from 40 memories. Last updated: 2026-04-06.
12
12
 
13
13
  ## Rules
14
14
 
15
+ - Check command syntax, file paths, and prerequisites before running
16
+ - Check inputs and prerequisites before retrying
15
17
  - SQLite query syntax error: LIKE clause requires single quotes around string literal, not double quotes
16
- - Avoid: Command failed: claude-recall outcomes 2>&1 Instead: Check command syntax, file paths, and prerequisites before running
18
+ - Fix pairing in tool-outcome-watcher fails when the original failing command and the fix command have low string similarity (low Jaccard similarity). Pattern matching is insufficient; needs LLM reasoning about command intent.
19
+ - Avoid: Command failed: kill $(pgrep -f "node.*webui/server.js") 2>/dev/null; sleep 1; cd /home/ebiarao/repos-wsl/persona... → Instead: Check command syntax, file paths, and prerequisites before running
20
+ - Avoid: Command failed: ls artifacts/urgent-trigger-ORACLE.json 2>&1 → Instead: Check command syntax, file paths, and prerequisites before running
21
+ - Avoid: Command failed: node agents/shared/tools/post-comms.js '{"agent":"TEST","type":"handoff","priority":"bad","messag... → Instead: Check command syntax, file paths, and prerequisites before running
22
+ - Avoid: Command failed: kill $(pgrep -f "node.*webui/server.js") 2>/dev/null; kill $(pgrep -f "node.*mock-eiap/server.js"... → Instead: Check command syntax, file paths, and prerequisites before running
23
+ - Avoid: Command failed: pgrep -af "webui/server" ; curl -s http://localhost:3000/api/service-health 2>&1 → Instead: Check command syntax, file paths, and prerequisites before running
24
+ - Avoid: Command failed: kill $(pgrep -f "node.*webui/server.js") 2>/dev/null; sleep 1; node webui/server.js > /tmp/webui.... → Instead: Check command syntax, file paths, and prerequisites before running
17
25
  - Avoid: Command failed: npm whoami 2>&1 && npm config get registry 2>&1 → Instead: Check command syntax, file paths, and prerequisites before running
18
26
  - Claude-recall MCP Server failed to start with npx claude-recall@latest mcp start
19
27
  - Claude-recall MCP Server failed to start with command: npx -y claude-recall@latest mcp start
@@ -21,6 +29,22 @@ Auto-generated from 16 memories. Last updated: 2026-04-02.
21
29
  - Avoid: Command failed: npx jest tests/unit/failure-detectors.test.ts 2>&1 → Instead: Check command syntax, file paths, and prerequisites before running
22
30
  - SQLite query error: LIKE clause needs proper string literal syntax with single quotes in better-sqlite3
23
31
  - Node.js syntax error: multiline strings in -e flag not properly escaped; newlines break the command parsing
32
+ - Fix pairing based on Jaccard string similarity between failing command and fix command is too weak when fixes look syntactically different from original commands (e.g. adding echo pipe vs original bash call); consider semantic matching or explicit fix linking
33
+ - {"what_failed":"Bash command failed: bash scripts/upgrade-sandbox.sh 2>&1","why_failed":"Exit code 1\n\n\u001b[0;32m[upgrade]\u001b[0m ==========================================\n\u001b[0;32m[upgrade]\u001b[0m NeMoClaw Sandbox Rebuild\n\u001b[0;32m[upgrade]\u001b[0m ==========================================\n\n\u001b[0;32m...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\n\n\u001b[0;32m[upgrade]\u001b[0m ==========================================\n\u001b[0;32m[upgrade]\u001b[0m NeMoClaw Sandbox Rebuild\n\u001b[0;32m[upgrade]\u001b[0m ==========================================\n\n\u001b[0;32m...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
34
+ - {"what_failed":"Bash command failed: echo \"Waiting 2 min for next SENTINEL cron tick to fire with delivery:silent...\" && sleep 120 && ...","why_failed":"Exit code 1\nWaiting 2 min for next SENTINEL cron tick to fire with delivery:silent...\nTraceback (most recent call last):\n File \"<string>\", line 1, in <module>\n import json,sys;d=json.load(sys.s...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\nWaiting 2 min for next SENTINEL cron tick to fire with delivery:silent...\nTraceback (most recent call last):\n File \"<string>\", line 1, in <module>\n import json,sys;d=json.load(sys.s...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
35
+ - {"what_failed":"Bash command failed: pkill -f \"node.*trigger-watcher\" 2>/dev/null; sleep 1; rm -f /tmp/trigger-watcher.log artifacts/....","why_failed":"Exit code 144","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 144","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
36
+ - {"what_failed":"Bash command failed: pkill -f \"trigger-watcher\" 2>/dev/null; sleep 1; rm -f /tmp/trigger-watcher.log artifacts/.trigge...","why_failed":"Exit code 144","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 144","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
37
+ - {"what_failed":"Bash command failed: kill $(pgrep -f \"trigger-watcher.js\") 2>/dev/null; sleep 1; rm -f artifacts/.trigger-watcher-offs...","why_failed":"Exit code 144","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 144","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
38
+ - {"what_failed":"Bash command failed: openshell sandbox list 2>/dev/null; openshell status 2>/dev/null; ls ~/.openclaw-ata/cron/jobs.js...","why_failed":"Exit code 2\n\u001b[1mNAME \u001b[0m \u001b[1mNAMESPACE\u001b[0m \u001b[1mCREATED \u001b[0m \u001b[1mPHASE\u001b[0m\nnka-telco openshell 2026-04-06 11:22:57 \u001b[32mReady\u001b[39m\n\u001b[1m\u001b[36mServer Status\u001b[39m\u001b[0m\n\n \u001b[2mGatewa...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 2\n\u001b[1mNAME \u001b[0m \u001b[1mNAMESPACE\u001b[0m \u001b[1mCREATED \u001b[0m \u001b[1mPHASE\u001b[0m\nnka-telco openshell 2026-04-06 11:22:57 \u001b[32mReady\u001b[39m\n\u001b[1m\u001b[36mServer Status\u001b[39m\u001b[0m\n\n \u001b[2mGatewa...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
39
+ - {"what_failed":"Bash command failed: ls artifacts/urgent-trigger-ORACLE.json 2>&1","why_failed":"Exit code 2\nls: cannot access 'artifacts/urgent-trigger-ORACLE.json': No such file or directory","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 2\nls: cannot access 'artifacts/urgent-trigger-ORACLE.json': No such file or directory","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
40
+ - {"what_failed":"Bash command failed: echo \"38\" > artifacts/.trigger-watcher-offset && timeout 8 node scripts/trigger-watcher.js 2>&1","why_failed":"Exit code 124\n[trigger-watcher] 2026-04-06T18:17:44.804Z started — polling every 5s\n[trigger-watcher] 2026-04-06T18:17:44.806Z initial offset: 39 lines","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 124\n[trigger-watcher] 2026-04-06T18:17:44.804Z started — polling every 5s\n[trigger-watcher] 2026-04-06T18:17:44.806Z initial offset: 39 lines","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
41
+ - {"what_failed":"Bash command failed: node webui/server.js > /tmp/webui.log 2>&1 & sleep 3 && curl -s http://localhost:3000/api/service...","why_failed":"Exit code 7\n[1]+ Exit 1 node webui/server.js > /tmp/webui.log 2>&1","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 7\n[1]+ Exit 1 node webui/server.js > /tmp/webui.log 2>&1","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
42
+ - {"what_failed":"Bash command failed: sleep 2 && curl -s http://localhost:3000/api/service-health 2>&1","why_failed":"Exit code 7","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 7","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
43
+ - {"what_failed":"Bash command failed: kill $(pgrep -f \"node.*webui/server.js\") 2>/dev/null; sleep 1; cd /home/ebiarao/repos-wsl/persona...","why_failed":"Exit code 144","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 144","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
44
+ - {"what_failed":"Bash command failed: ls artifacts/urgent-trigger-ORACLE.json 2>&1","why_failed":"Exit code 2\nls: cannot access 'artifacts/urgent-trigger-ORACLE.json': No such file or directory","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 2\nls: cannot access 'artifacts/urgent-trigger-ORACLE.json': No such file or directory","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
45
+ - {"what_failed":"Bash command failed: node agents/shared/tools/post-comms.js '{\"agent\":\"TEST\",\"type\":\"handoff\",\"priority\":\"bad\",\"messag...","why_failed":"Exit code 1\n[post-comms] Error: priority must be \"normal\" or \"urgent\"","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\n[post-comms] Error: priority must be \"normal\" or \"urgent\"","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
46
+ - {"what_failed":"Read failed","why_failed":"File content (10265 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whol...","what_should_do":"Check inputs and prerequisites before retrying","context":"Error: File content (10265 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whol...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
47
+ - {"what_failed":"Read failed","why_failed":"File content (11505 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whol...","what_should_do":"Check inputs and prerequisites before retrying","context":"Error: File content (11505 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whol...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
24
48
  - Avoid: Test command reported failures: npx jest tests/unit/failure-detectors.test.ts 2>&1 → Instead: Read test output carefully — exit code 0 does not mean all tests passed
25
49
  - Node.js -e flag cannot parse multiline strings with unescaped newlines in single quotes
26
50
  - claude-recall reconnection failed after reinstall
@@ -1,11 +1,19 @@
1
1
  {
2
2
  "topicId": "failure-lessons",
3
- "sourceHash": "f3351c090380fb67413721e169ecee6882c991fff7f46e1bbd3b13b208e4c24b",
4
- "memoryCount": 16,
5
- "generatedAt": "2026-04-02T18:23:28.296Z",
3
+ "sourceHash": "168f7a6d77c7a73d97228d1c554a25f923339f11fc3225feae751a4ea38101e0",
4
+ "memoryCount": 40,
5
+ "generatedAt": "2026-04-06T18:39:00.441Z",
6
6
  "memoryKeys": [
7
+ "promoted_1775498319002_awwrsovw6",
8
+ "promoted_1775499579486_bxvgjc80r",
7
9
  "hook_failure_1772637584921_0tj4rrxnt",
8
- "hook_failure_non-zero-exit_1774020949485_6ubuoswae",
10
+ "hook_failure_1775500665745_zl6zsp7jw",
11
+ "hook_failure_non-zero-exit_1775499579462_n5xb6rr8r",
12
+ "hook_failure_non-zero-exit_1775499579440_2tv110hs9",
13
+ "hook_failure_non-zero-exit_1775499579425_n53js176o",
14
+ "hook_failure_non-zero-exit_1775498318987_pqbmsatub",
15
+ "hook_failure_non-zero-exit_1775498318976_mzbyvdceo",
16
+ "hook_failure_non-zero-exit_1775498318963_thiuiiqef",
9
17
  "hook_failure_non-zero-exit_1773409269877_ful451241",
10
18
  "hook_failure_1773409616313_gmsfcbuzh",
11
19
  "hook_failure_1773409607268_83ie5yunz",
@@ -13,6 +21,22 @@
13
21
  "hook_failure_non-zero-exit_1772640279977_g3gwlfoqi",
14
22
  "hook_failure_1772637570984_yxs8zmurp",
15
23
  "hook_failure_1772637485532_djep8eysa",
24
+ "hook_failure_1775500618695_6grbwpm3t",
25
+ "hook_failure_1775500273633_yrw798ahh",
26
+ "hook_failure_1775500125145_ad65bw8rs",
27
+ "hook_failure_1775499854068_ze23fp9gf",
28
+ "hook_failure_1775499797961_6ziqluf1i",
29
+ "hook_failure_1775499784048_qsshv04hl",
30
+ "hook_failure_1775499638896_pfhgi3kn5",
31
+ "hook_failure_1775499503779_k9vabnkif",
32
+ "hook_failure_1775499472886_1exmgb4ef",
33
+ "hook_failure_1775499266183_drme5d0j6",
34
+ "hook_failure_1775499258759_4unleb4yv",
35
+ "hook_failure_1775499252924_czqqpfsp3",
36
+ "hook_failure_1775499173022_pkye9oqx8",
37
+ "hook_failure_1775499039635_67oste4m3",
38
+ "hook_failure_1775498545106_8348kw22h",
39
+ "hook_failure_1775498542480_wc23ux8gt",
16
40
  "hook_failure_silent-test-failure_1772640279996_m8f3ks8fw",
17
41
  "hook_failure_1772637495154_i21dho3dv",
18
42
  "hook_failure_1773410663873_oegccxk83",
@@ -8,89 +8,30 @@ source: claude-recall
8
8
 
9
9
  # Preferences
10
10
 
11
- Auto-generated from 79 memories. Last updated: 2026-04-06.
11
+ Auto-generated from 20 memories. Last updated: 2026-04-06.
12
12
 
13
13
  ## Rules
14
14
 
15
+ - Session test preference 1775500740595
16
+ - Test preference 1775500740495-2
17
+ - Test preference 1775500740495-1
18
+ - Test preference 1775500740495-0
19
+ - Test memory content
20
+ - Session test preference 1775499328559
21
+ - Test preference 1775499328384-2
22
+ - Test preference 1775499328384-1
23
+ - Test preference 1775499328384-0
24
+ - Test memory content
15
25
  - Session test preference 1775496241643
16
26
  - Test preference 1775496241514-2
17
27
  - Test preference 1775496241514-1
18
28
  - Test preference 1775496241514-0
19
29
  - Test memory content
20
30
  - Session test preference 1775494279149
21
- - Test preference 1775494279061-2
22
- - Test preference 1775494279061-1
23
- - Test preference 1775494279061-0
24
- - Test memory content
25
- - Session test preference 1775492069465
26
- - Test preference 1775492069353-2
27
- - Test preference 1775492069353-1
28
- - Test preference 1775492069353-0
29
- - Test memory content
30
- - Session test preference 1775491767519
31
- - Test preference 1775491767395-2
32
- - Test preference 1775491767395-1
33
- - Test preference 1775491767395-0
34
- - Test memory content
35
- - When planning implementation work, always divide into phases/stages. Each phase must have its own verification tests with concrete commands and expected outputs. Only proceed to the next phase when the current phase's tests pass. Never combine untested changes into a single deployment. This prevents hours of debugging cascading failures.
36
- - Solving issues and testing that they are solved takes priority over committing and pushing. Don't suggest committing until the fix is verified end-to-end.
37
- - When the user says "jam" it means "just answer me" — give a direct, concise answer without extra exploration, tool calls, or elaboration. Skip the research and just respond.
38
31
  - After each refactoring, document the changes made. Don't batch documentation to the end — write it as you go.
39
32
  - Any major refactoring requires exhaustive search to make sure nothing is missed. Always grep/search comprehensively before and after changes to verify no stale references, broken imports, or missed files remain.
40
- - Session test preference 1775169786712
41
- - Test preference 1775169786565-2
42
- - Test preference 1775169786565-1
43
- - Test preference 1775169786565-0
44
- - Test memory content
45
- - Session test preference 1775169704849
46
- - Test preference 1775169704668-2
47
- - Test preference 1775169704668-1
48
- - Test preference 1775169704668-0
49
- - Test memory content
50
- - Session test preference 1775169639212
51
- - Test preference 1775169639121-2
52
- - Test preference 1775169639121-1
53
- - Test preference 1775169639121-0
54
- - Test memory content
55
- - Session test preference 1775169273366
56
- - Test preference 1775169273296-2
57
- - Test preference 1775169273296-1
58
- - Test preference 1775169273296-0
59
- - Test memory content
60
- - Session test preference 1775169256189
61
- - Test preference 1775169256133-2
62
- - Test preference 1775169256133-1
63
- - Test preference 1775169256133-0
64
- - Test memory content
65
- - Session test preference 1775169244752
66
- - Test preference 1775169244686-2
67
- - Test preference 1775169244686-1
68
- - Test preference 1775169244686-0
69
- - Test memory content
70
33
  - Markdown documentation files should be named with the convention YYYYMMDD_<filename>.md (e.g., 20260402_nemoclaw_integration.md). Use underscores, not hyphens, in the date-prefixed filenames.
71
- - Never commit to git unless the user explicitly approves. Always show the commit message and wait for a clear "yes", "go ahead", "commit", or similar confirmation before running git commit.
72
- - Session test preference 1775160781884
73
- - Test preference 1775160781820-2
74
- - Test preference 1775160781820-1
75
- - Test preference 1775160781820-0
76
- - Test memory content
77
- - Session test preference 1775159399698
78
- - Test preference 1775159399559-2
79
- - Test preference 1775159399559-1
80
- - Test preference 1775159399559-0
81
- - Test memory content
82
- - Session test preference 1775157082982
83
- - Test preference 1775157082853-2
84
- - Test preference 1775157082853-1
85
- - Test preference 1775157082853-0
86
- - Test memory content
87
- - Session test preference 1775156381211
88
- - Test preference 1775156381110-2
89
- - Test preference 1775156381110-1
90
- - Test preference 1775156381110-0
91
- - Test memory content
92
- - axios npm package was compromised in a supply chain attack (axios@1.14.1 pulled in malicious plain-crypto-js@4.2.1). Claude Recall is NOT affected — does not use axios. Verified 2026-04-01. If axios is ever added as a dependency, pin the version and audit lockfiles.
93
- - Upgrade all projects whenever a new version is pushed
34
+ - For agentic design, agents should decide when to run rather than using cron jobs for scheduling
94
35
 
95
36
  ---
96
37
  *Auto-generated by Claude Recall. Regenerate: `npx claude-recall skills generate`*
@@ -1,87 +1,28 @@
1
1
  {
2
2
  "topicId": "preferences",
3
- "sourceHash": "1cad20b547cd1594370facfdae6b4ae8700516e9be712d8b28459462398c9276",
4
- "memoryCount": 79,
5
- "generatedAt": "2026-04-06T17:24:01.663Z",
3
+ "sourceHash": "2e99c86d7042ef4e9b0cd7c8eda4aa322d1678f9389a2a413ec9d6083db85194",
4
+ "memoryCount": 20,
5
+ "generatedAt": "2026-04-06T18:39:00.616Z",
6
6
  "memoryKeys": [
7
+ "memory_1775500740596_xok3iey9j",
8
+ "memory_1775500740545_op5713e5i",
9
+ "memory_1775500740519_ln1fd8ow4",
10
+ "memory_1775500740497_f06v303gf",
11
+ "memory_1775500740399_ud5aghy9a",
12
+ "memory_1775499328561_9m7ao3h8s",
13
+ "memory_1775499328480_e2zx9g5ly",
14
+ "memory_1775499328425_plvaaxd69",
15
+ "memory_1775499328386_dqcav3itu",
16
+ "memory_1775499328258_cilhe1owj",
7
17
  "memory_1775496241645_xtz7cwan4",
8
18
  "memory_1775496241576_j7sxxuge3",
9
19
  "memory_1775496241542_rg3hj24ud",
10
20
  "memory_1775496241516_y3inz8rlf",
11
21
  "memory_1775496241411_vwdz6igrm",
12
22
  "memory_1775494279150_n4pq7zy11",
13
- "memory_1775494279108_6hbe8qoit",
14
- "memory_1775494279088_nv8hjdm7s",
15
- "memory_1775494279062_jx4wrwn6s",
16
- "memory_1775494278982_fsc491z41",
17
- "memory_1775492069467_5cturlg0a",
18
- "memory_1775492069400_icg4tjivf",
19
- "memory_1775492069377_goix7nu9v",
20
- "memory_1775492069354_wma3zh5i7",
21
- "memory_1775492069258_q9d2k28wt",
22
- "memory_1775491767523_p2xtn4uak",
23
- "memory_1775491767447_q1dwsdfk3",
24
- "memory_1775491767421_vgntf4jt8",
25
- "memory_1775491767397_f181w5lqd",
26
- "memory_1775491767290_s7ntmkwpg",
27
- "memory_1775491073130_p8b493ay9",
28
- "memory_1775236195716_i3pb5nls7",
29
- "memory_1775210227089_j433ldlva",
30
23
  "memory_1775208934902_2kovciriy",
31
24
  "memory_1775208477621_fqa3w21j1",
32
- "memory_1775169786717_1zmwoe6ai",
33
- "memory_1775169786630_rdudb8hbc",
34
- "memory_1775169786589_zurej1v51",
35
- "memory_1775169786567_3esvhc01j",
36
- "memory_1775169786460_vugzw5yl0",
37
- "memory_1775169704852_ezdebznpz",
38
- "memory_1775169704771_ak9vkaswc",
39
- "memory_1775169704739_dg78h7lte",
40
- "memory_1775169704670_f1yhtrmsz",
41
- "memory_1775169704515_lby33vw9c",
42
- "memory_1775169639213_w3i85h357",
43
- "memory_1775169639170_iewh2evi0",
44
- "memory_1775169639145_x9s0519l7",
45
- "memory_1775169639123_fa53agp0a",
46
- "memory_1775169639037_f290kffwd",
47
- "memory_1775169273368_c1e5jdl9r",
48
- "memory_1775169273337_wozxe12k3",
49
- "memory_1775169273319_3o1ww90na",
50
- "memory_1775169273297_oqmyxziav",
51
- "memory_1775169273232_eoymf3ezj",
52
- "memory_1775169256190_681x8frvt",
53
- "memory_1775169256164_kqderurux",
54
- "memory_1775169256150_0nqbk7tx9",
55
- "memory_1775169256134_ftj0m44bb",
56
- "memory_1775169256069_dywd646f7",
57
- "memory_1775169244754_sjfarlk41",
58
- "memory_1775169244722_mavida9fg",
59
- "memory_1775169244707_nmmu0s0lu",
60
- "memory_1775169244688_03q4mmcky",
61
- "memory_1775169244628_7kuhf5met",
62
25
  "memory_1775168901303_o8o0i4952",
63
- "memory_1775162828137_l6uw5swdn",
64
- "memory_1775160781885_fkbnc0s85",
65
- "memory_1775160781857_gj5y299dr",
66
- "memory_1775160781842_0xmv146n5",
67
- "memory_1775160781821_o9ipt8nsc",
68
- "memory_1775160781747_70e5gbp7j",
69
- "memory_1775159399702_yg6ynd05n",
70
- "memory_1775159399631_fmy4s2vhr",
71
- "memory_1775159399606_xymkvcjfv",
72
- "memory_1775159399561_o6vpb3fto",
73
- "memory_1775159399463_0pvhuixyr",
74
- "memory_1775157082984_oiyt9u65w",
75
- "memory_1775157082927_29d7mm59z",
76
- "memory_1775157082892_o9i0jbw76",
77
- "memory_1775157082855_zlbl2ib0j",
78
- "memory_1775157082743_fu07oklto",
79
- "memory_1775156381212_ptlo01224",
80
- "memory_1775156381158_3p6goornd",
81
- "memory_1775156381132_ikx95mk0n",
82
- "memory_1775156381111_1x4fxfu9n",
83
- "memory_1775156381012_3tw7we7cz",
84
- "memory_1775154208266_arwo2fctx",
85
- "hook_preference_1774106575282_45sk4ep52"
26
+ "hook_preference_1775498374200_6d21qj14y"
86
27
  ]
87
28
  }
@@ -693,8 +693,30 @@ async function main() {
693
693
  // This avoids registry lookups on every hook invocation.
694
694
  const cliScript = path.join(packageDir, 'dist', 'cli', 'claude-recall-cli.js');
695
695
  const hookCmd = `node ${cliScript} hook run`;
696
- settings.hooksVersion = '11.0.0'; // v11 = add SessionStart(compact) for post-compaction rule reload
696
+ settings.hooksVersion = '12.0.0'; // v12 = add SubagentStart/Stop for sub-agent recall integration
697
697
  settings.hooks = {
698
+ SubagentStart: [
699
+ {
700
+ hooks: [
701
+ {
702
+ type: "command",
703
+ command: `${hookCmd} subagent-start`,
704
+ timeout: 5
705
+ }
706
+ ]
707
+ }
708
+ ],
709
+ SubagentStop: [
710
+ {
711
+ hooks: [
712
+ {
713
+ type: "command",
714
+ command: `${hookCmd} subagent-stop`,
715
+ timeout: 10
716
+ }
717
+ ]
718
+ }
719
+ ],
698
720
  SessionStart: [
699
721
  {
700
722
  matcher: "compact",
@@ -90,6 +90,16 @@ class HookCommands {
90
90
  await handlePostCompactReload(input);
91
91
  break;
92
92
  }
93
+ case 'subagent-start': {
94
+ const { handleSubagentStart } = await Promise.resolve().then(() => __importStar(require('../../hooks/subagent-hooks')));
95
+ await handleSubagentStart(input);
96
+ break;
97
+ }
98
+ case 'subagent-stop': {
99
+ const { handleSubagentStop } = await Promise.resolve().then(() => __importStar(require('../../hooks/subagent-hooks')));
100
+ await handleSubagentStop(input);
101
+ break;
102
+ }
93
103
  case 'bash-failure-watcher': {
94
104
  // Backward compat alias — routes to tool-outcome-watcher
95
105
  const { handleBashFailureWatcher } = await Promise.resolve().then(() => __importStar(require('../../hooks/tool-outcome-watcher')));
@@ -149,26 +149,36 @@ async function extractHindsightHint(failureDescription, context) {
149
149
  return null;
150
150
  }
151
151
  }
152
- const SESSION_EXTRACTION_PROMPT = `You are analyzing a coding session transcript to extract durable project knowledge.
152
+ const SESSION_EXTRACTION_PROMPT = `You are analyzing a coding session transcript to extract durable lessons.
153
153
 
154
- The transcript shows tool calls (Bash, Edit, Read, Grep, etc.) and their results, plus user and assistant messages.
154
+ The transcript shows tool calls (Bash, Edit, Read, Grep, etc.) and their results, plus user and assistant messages. Your primary job is to identify CAUSE-AND-EFFECT patterns — what failed, why, and what fixed it.
155
155
 
156
- Extract ONLY facts useful in FUTURE sessions:
157
- - Project conventions discovered (file structure, naming patterns, build tools, test frameworks)
158
- - Workflow patterns that worked or failed (e.g. "tests must be run from project root")
159
- - Technical constraints or gotchas encountered (e.g. "this project uses ESM, not CJS")
160
- - Environment requirements discovered (e.g. "needs Node 20+", "uses pnpm not npm")
156
+ PRIORITY 1 Failure Fix sequences:
157
+ Look for tool calls that failed (errors, timeouts, non-zero exits) followed by a different approach that succeeded. Extract the lesson as an imperative rule.
158
+ Examples:
159
+ - Command timed out because of interactive prompt → "scripts/upgrade-sandbox.sh requires interactive confirmation pipe 'y' to auto-confirm"
160
+ - Edit failed with old_string not found "File X uses tabs not spaces — match exact indentation when editing"
161
+ - Build failed after dependency change → "Run npm install after modifying package.json before building"
162
+
163
+ PRIORITY 2 — Project conventions discovered:
164
+ - File structure, naming patterns, build tools, test frameworks
165
+ - Workflow patterns (e.g. "tests must be run from project root")
166
+ - Technical constraints or gotchas (e.g. "this project uses ESM, not CJS")
167
+ - Environment requirements (e.g. "needs Node 20+", "uses pnpm not npm")
168
+
169
+ PRIORITY 3 — User corrections applied:
170
+ - When the user corrected the agent's approach mid-session
161
171
 
162
172
  Do NOT extract:
163
- - Task-specific details (what was built, which files changed this session)
164
- - Debugging steps unlikely to recur
165
- - Code patterns visible by reading the codebase
173
+ - Task-specific details (what was built, which files changed)
174
+ - One-off debugging steps unlikely to recur
175
+ - Code patterns derivable from reading the codebase
166
176
  - Anything in the EXISTING MEMORIES list below
167
177
 
168
178
  Respond with ONLY valid JSON (no markdown fences):
169
179
  [{"type":"project-knowledge|preference|devops|failure","content":"<imperative statement>","confidence":0.0-1.0}]
170
180
 
171
- Return [] if nothing durable was learned. Max 10 items. Each content should be a concise imperative statement (e.g. "Run tests with pnpm test, not npm test").`;
181
+ Return [] if nothing durable was learned. Max 10 items. Each content should be a concise, actionable rule (e.g. "Pipe 'y' to scripts/upgrade-sandbox.sh it has an interactive confirmation prompt").`;
172
182
  /**
173
183
  * Extract durable session learnings from a conversation summary using Haiku.
174
184
  * Returns null if no API key or on any failure.
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ /**
3
+ * Sub-agent hooks — fires on SubagentStart and SubagentStop events.
4
+ *
5
+ * SubagentStart: injects active recall rules into the sub-agent's context
6
+ * via additionalContext (CC adds this as a message the sub-agent sees).
7
+ *
8
+ * SubagentStop: captures the sub-agent's outcome as an outcome event.
9
+ *
10
+ * SubagentStart input: { hook_event_name, agent_id, agent_type, session_id, cwd }
11
+ * SubagentStop input: { hook_event_name, agent_id, agent_type, agent_transcript_path,
12
+ * last_assistant_message, stop_hook_active, session_id, cwd }
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.handleSubagentStart = handleSubagentStart;
16
+ exports.handleSubagentStop = handleSubagentStop;
17
+ const shared_1 = require("./shared");
18
+ const memory_1 = require("../services/memory");
19
+ const config_1 = require("../services/config");
20
+ const outcome_storage_1 = require("../services/outcome-storage");
21
+ function extractVal(value) {
22
+ if (typeof value === 'string')
23
+ return value;
24
+ if (typeof value === 'object' && value !== null) {
25
+ return value.content || value.value || JSON.stringify(value);
26
+ }
27
+ return String(value ?? '');
28
+ }
29
+ function formatRulesCompact(rules) {
30
+ const sections = [];
31
+ if (rules.preferences.length > 0) {
32
+ sections.push('Preferences:\n' + rules.preferences.map(m => `- ${extractVal(m.value)}`).join('\n'));
33
+ }
34
+ if (rules.corrections.length > 0) {
35
+ sections.push('Corrections:\n' + rules.corrections.map(m => `- ${extractVal(m.value)}`).join('\n'));
36
+ }
37
+ if (rules.failures.length > 0) {
38
+ sections.push('Failures:\n' + rules.failures.map(m => `- ${extractVal(m.value)}`).join('\n'));
39
+ }
40
+ if (rules.devops.length > 0) {
41
+ sections.push('DevOps:\n' + rules.devops.map(m => `- ${extractVal(m.value)}`).join('\n'));
42
+ }
43
+ return sections.join('\n\n');
44
+ }
45
+ /**
46
+ * SubagentStart — inject recall rules into the sub-agent's context.
47
+ * stdout JSON with additionalContext is injected as a message the sub-agent sees.
48
+ */
49
+ async function handleSubagentStart(input) {
50
+ try {
51
+ const agentType = input?.agent_type ?? 'unknown';
52
+ const projectId = config_1.ConfigService.getInstance().getProjectId();
53
+ const rules = memory_1.MemoryService.getInstance().loadActiveRules(projectId);
54
+ const totalRules = rules.preferences.length + rules.corrections.length +
55
+ rules.failures.length + rules.devops.length;
56
+ if (totalRules === 0)
57
+ return;
58
+ const body = formatRulesCompact(rules);
59
+ const context = `[Claude Recall] Apply these rules from the user's memory:\n\n${body}\n\n` +
60
+ 'Cite each rule at the point where it influences your action: (applied from memory: <rule>)';
61
+ // Structured output — CC reads additionalContext and injects it
62
+ console.log(JSON.stringify({
63
+ hookEventName: 'SubagentStart',
64
+ additionalContext: context,
65
+ }));
66
+ // User notification via stderr (stdout is structured hook output)
67
+ console.error(`🤖 Recall: ${totalRules} rules loaded for sub-agent (${agentType})`);
68
+ (0, shared_1.hookLog)('subagent', `SubagentStart: injected ${totalRules} rules for ${agentType} (${input?.agent_id ?? '?'})`);
69
+ }
70
+ catch (err) {
71
+ (0, shared_1.hookLog)('subagent', `SubagentStart error: ${(0, shared_1.safeErrorMessage)(err)}`);
72
+ }
73
+ }
74
+ /**
75
+ * SubagentStop — capture the sub-agent's outcome.
76
+ */
77
+ async function handleSubagentStop(input) {
78
+ try {
79
+ const agentType = input?.agent_type ?? 'unknown';
80
+ const agentId = input?.agent_id ?? 'unknown';
81
+ const lastMessage = input?.last_assistant_message ?? '';
82
+ // Record outcome event
83
+ try {
84
+ const outcomeStorage = outcome_storage_1.OutcomeStorage.getInstance();
85
+ outcomeStorage.createOutcomeEvent({
86
+ event_type: 'subagent_result',
87
+ actor: 'tool',
88
+ action_summary: `Sub-agent (${agentType}) completed`,
89
+ next_state_summary: lastMessage.substring(0, 300) || 'No final message',
90
+ tags: ['agent', 'subagent', agentType],
91
+ });
92
+ }
93
+ catch {
94
+ // Non-critical
95
+ }
96
+ console.error(`🤖 Recall: sub-agent (${agentType}) outcome captured`);
97
+ (0, shared_1.hookLog)('subagent', `SubagentStop: captured outcome for ${agentType} (${agentId})`);
98
+ }
99
+ catch (err) {
100
+ (0, shared_1.hookLog)('subagent', `SubagentStop error: ${(0, shared_1.safeErrorMessage)(err)}`);
101
+ }
102
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-recall",
3
- "version": "0.20.9",
3
+ "version": "0.20.11",
4
4
  "description": "Persistent memory for Claude Code and Pi with native Skills integration, automatic capture, failure learning, and project scoping",
5
5
  "main": "dist/index.js",
6
6
  "bin": {