claude-recall 0.20.11 → 0.20.13
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.
- package/.claude/skills/auto-corrections/SKILL.md +11 -1
- package/.claude/skills/auto-corrections/manifest.json +16 -6
- package/.claude/skills/auto-failure-lessons/SKILL.md +79 -1
- package/.claude/skills/auto-failure-lessons/manifest.json +80 -3
- package/.claude/skills/auto-preferences/SKILL.md +5 -20
- package/.claude/skills/auto-preferences/manifest.json +8 -23
- package/README.md +2 -2
- package/dist/cli/claude-recall-cli.js +16 -15
- package/dist/hooks/correction-detector.js +2 -2
- package/dist/hooks/llm-classifier.js +2 -2
- package/dist/hooks/memory-stop-hook.js +2 -2
- package/dist/hooks/tool-outcome-watcher.js +4 -1
- package/dist/mcp/prompts-handler.js +3 -3
- package/dist/mcp/resources-handler.js +5 -4
- package/dist/memory/pattern-store.js +4 -2
- package/dist/memory/storage.js +8 -0
- package/dist/services/config.js +10 -6
- package/dist/services/memory.js +39 -5
- package/dist/services/skill-generator.js +4 -0
- package/dist/shared/event-processors.js +6 -3
- package/package.json +1 -1
|
@@ -8,14 +8,24 @@ source: claude-recall
|
|
|
8
8
|
|
|
9
9
|
# Corrections
|
|
10
10
|
|
|
11
|
-
Auto-generated from
|
|
11
|
+
Auto-generated from 14 memories. Last updated: 2026-04-09.
|
|
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: Never delete claude-recall memories without asking the user first. Show what you plan to delete and get explicit approval before running delete_memory.
|
|
22
|
+
- CORRECTION: Memory with complex metadata
|
|
23
|
+
- CORRECTION: wait until next system performnce review
|
|
24
|
+
- CORRECTION: [PreCompact] i just want you tellme what you observe claude recall has done lately
|
|
25
|
+
- CORRECTION: i just want you tellme what you observe claude recall has done lately
|
|
18
26
|
- CORRECTION: Use true agentic design where agents decide when to run, not cron jobs
|
|
27
|
+
- CORRECTION: [PreCompact] delete without asking first
|
|
28
|
+
- CORRECTION: delete without asking first
|
|
19
29
|
|
|
20
30
|
---
|
|
21
31
|
*Auto-generated by Claude Recall. Regenerate: `npx claude-recall skills generate`*
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"topicId": "corrections",
|
|
3
|
-
"sourceHash": "
|
|
4
|
-
"memoryCount":
|
|
5
|
-
"generatedAt": "2026-04-
|
|
3
|
+
"sourceHash": "c32cc0fe5f8e375075a893c5c677945df13798f9aeda6763e5ee0a4b8de91a47",
|
|
4
|
+
"memoryCount": 14,
|
|
5
|
+
"generatedAt": "2026-04-09T20:39:45.990Z",
|
|
6
6
|
"memoryKeys": [
|
|
7
|
+
"memory_1775767185973_5h07cll2t",
|
|
8
|
+
"memory_1775766122931_keod4qo79",
|
|
9
|
+
"memory_1775766107107_jh925r7qo",
|
|
10
|
+
"memory_1775766089878_07ouaa5vy",
|
|
11
|
+
"memory_1775766072071_snw3h6dke",
|
|
12
|
+
"memory_1775511843079_fzzjymikj",
|
|
13
|
+
"memory_1775511566528_2zqlbeiyy",
|
|
7
14
|
"memory_1775500740471_dp5hmdxaf",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
15
|
+
"hook_correction_1775554504739_geen26iio",
|
|
16
|
+
"hook_correction_1775543706749_u29qqfmdd",
|
|
17
|
+
"hook_correction_1775511596163_oj20xa10q",
|
|
18
|
+
"hook_correction_1775498361284_9amjuw4le",
|
|
19
|
+
"hook_correction_1775543706706_eqk8p0lm1",
|
|
20
|
+
"hook_correction_1775511572913_yq1y9tvlo"
|
|
11
21
|
]
|
|
12
22
|
}
|
|
@@ -8,13 +8,44 @@ source: claude-recall
|
|
|
8
8
|
|
|
9
9
|
# Failure Lessons
|
|
10
10
|
|
|
11
|
-
Auto-generated from
|
|
11
|
+
Auto-generated from 117 memories. Last updated: 2026-04-09.
|
|
12
12
|
|
|
13
13
|
## Rules
|
|
14
14
|
|
|
15
15
|
- Check command syntax, file paths, and prerequisites before running
|
|
16
16
|
- Check inputs and prerequisites before retrying
|
|
17
|
+
- Multiple ssh tunnels + python processes writing same output file causes interleaved corruption and duplicate events. Root cause: nohup orphans from previous session not cleaned before restart.
|
|
18
|
+
- OpenClaw gateway websocket connection fails from root user context in sandbox; this is a known pairing regression. CLI cannot communicate with gateway from inside the container.
|
|
17
19
|
- SQLite query syntax error: LIKE clause requires single quotes around string literal, not double quotes
|
|
20
|
+
- Fault injection into mock-eiap/world-state.json on host will not be visible to sandbox agents until collect.sh runs and pushes updated signals.json into the sandbox. Verify data propagation by checking signals.json inside sandbox, not just host files.
|
|
21
|
+
- Session extraction prompt design flaw: fix pairing relies on string similarity between commands, but problem fixes often look structurally different from the failing command (e.g. bash script vs echo piped to bash); causes failure→fix patterns to not be recognized
|
|
22
|
+
- nemoclaw's SSRF guard rejects all private/loopback IPs — cannot use ericai-on-host locally without infrastructure patching at three layers; prefer public HTTPS API endpoints instead.
|
|
23
|
+
- Migrating a 'messy and complicated application' as-is risks baking in workarounds, race conditions (e.g., two-writer reload-on-tick), and stale cache patterns (e.g., 5s cache) that no longer make sense in the new architecture — pause to identify and remove technical debt before migration
|
|
24
|
+
- remediate-cell.js still uses legacy direct file mutation (path.join to mock-eiap/world-state.json). When run in sandbox, this fails — must refactor to call worldState.save() + strategic logging at caller boundaries, same pattern as remediate-backhaul.js.
|
|
25
|
+
- Missing shared tool files in sandbox caused SENTINEL's full chain to fail silently — always verify all tool dependencies (check-delta.js, post-comms.js, self-assess.js, update-run-state.js) are deployed before running agent cycles
|
|
26
|
+
- When collect.sh fails with 'EIAP endpoint unreachable' inside sandbox, check if EIAP_URL env var is set. If empty, the script should auto-detect sandbox environment and default to http://host.openshell.internal:8090 instead of localhost.
|
|
27
|
+
- Browser-SSO tokens are a fundamental impedance mismatch with headless workloads in K8s — do not attempt to make Kiro (browser-token-based auth) work in containerized environments; use API tokens or service accounts instead
|
|
28
|
+
- Avoid: Command failed: openshell --help 2>&1 | grep -iE "gateway|stop|start|down" | head -15; echo ---gateway-list---; o... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
29
|
+
- Avoid: Command failed: echo ---kill-everything---; pkill -f "stream-sessions.sh" 2>/dev/null; pkill -f "stream-watcher.p... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
30
|
+
- Avoid: Command failed: docker exec openshell-cluster-nemoclaw kubectl exec -n openshell nka-telco -- sh -c "ls -la /sand... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
31
|
+
- Avoid: Command failed: cd /home/ebiarao/.claude/projects/-home-ebiarao-repos-wsl-personal-projects-openclaw-autonomous-t... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
32
|
+
- Avoid: Command failed: B64=$(base64 -w0 < agents/nka/scripts/remediate-backhaul.js); docker exec openshell-cluster-nemoc... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
33
|
+
- Avoid: Command failed: git commit -m "$(cat <<'EOF'
|
|
34
|
+
Event-driven agent cascade + direct EIAP polling — two breakthroughs... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
35
|
+
- Avoid: Command failed: docker exec openshell-cluster-nemoclaw kubectl exec -n openshell nka-telco -- ls -la /sandbox/.op... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
36
|
+
- Avoid: Command failed: cat /tmp/claude-1000/-home-ebiarao-repos-wsl-personal-projects-openclaw-autonomous-telco-agents/5... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
37
|
+
- Avoid: Command failed: openshell sandbox list 2>/dev/null; curl -s http://localhost:3000/api/service-health 2>&1 → Instead: Check command syntax, file paths, and prerequisites before running
|
|
38
|
+
- When agent tasks complete but downstream verifications report missing output files, check if required shared tools were uploaded during sandbox initialization — re-push missing files with 'docker exec ... kubectl cp' rather than restarting the sandbox.
|
|
39
|
+
- Exit code 7 from Bash commands in this project context often indicates timing issues (services not fully up) or missing sandboxes during rebuild — retry after confirming 'openshell sandbox list' shows 'Ready' state.
|
|
40
|
+
- Background command 'Verify services and cron message' failed with exit code 7
|
|
41
|
+
- Background command 'Verify services and cron message' failed with exit code 7
|
|
42
|
+
- Avoid: Command failed: openshell status 2>/dev/null | head -5; openshell sandbox list 2>/dev/null → Instead: Check command syntax, file paths, and prerequisites before running
|
|
43
|
+
- SENTINEL verify task failed - collect.sh not running after rebuild (exit code 1)
|
|
44
|
+
- When tool outputs succeed but dependent processes don't trigger, check for stale state like file offsets — trigger-watcher set initial offset from old pre-rebuild state, causing it to miss new entries after rebuild+resync
|
|
45
|
+
- Avoid: Command failed: curl -s http://localhost:3000/api/service-health 2>&1; echo ""; docker exec openshell-cluster-nem... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
46
|
+
- Avoid: Command failed: bash scripts/upgrade-sandbox.sh 2>&1 → Instead: Check command syntax, file paths, and prerequisites before running
|
|
47
|
+
- Avoid: Command failed: echo "Waiting 2 min for next SENTINEL cron tick to fire with delivery:silent..." && sleep 120 && ... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
48
|
+
- Avoid: Command failed: kill $(pgrep -f "trigger-watcher.js") 2>/dev/null; sleep 1; rm -f artifacts/.trigger-watcher-offs... → Instead: Check command syntax, file paths, and prerequisites before running
|
|
18
49
|
- 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
50
|
- 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
51
|
- Avoid: Command failed: ls artifacts/urgent-trigger-ORACLE.json 2>&1 → Instead: Check command syntax, file paths, and prerequisites before running
|
|
@@ -29,6 +60,45 @@ Auto-generated from 40 memories. Last updated: 2026-04-06.
|
|
|
29
60
|
- Avoid: Command failed: npx jest tests/unit/failure-detectors.test.ts 2>&1 → Instead: Check command syntax, file paths, and prerequisites before running
|
|
30
61
|
- SQLite query error: LIKE clause needs proper string literal syntax with single quotes in better-sqlite3
|
|
31
62
|
- Node.js syntax error: multiline strings in -e flag not properly escaped; newlines break the command parsing
|
|
63
|
+
- {"what_failed":"Bash command failed: sqlite3 ~/.claude-recall/claude-recall.db \"SELECT DISTINCT content FROM memories WHERE content LI...","why_failed":"Exit code 1","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
64
|
+
- {"what_failed":"Read failed","why_failed":"File content (17014 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 (17014 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"]}
|
|
65
|
+
- {"what_failed":"Grep failed","why_failed":"spawn /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg ENOENT","what_should_do":"Check inputs and prerequisites before retrying","context":"Error: spawn /home/ebiarao/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg ENOENT","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
66
|
+
- {"what_failed":"Read failed","why_failed":"File content (17014 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 (17014 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"]}
|
|
67
|
+
- {"what_failed":"Bash command failed: tail -30 ~/.claude-recall/hook-logs/event-processor.log ~/.claude-recall/hook-logs/memory-stop.lo...","why_failed":"Exit code 1\ntail: option used in invalid context -- 3","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\ntail: option used in invalid context -- 3","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
68
|
+
- {"what_failed":"Bash command failed: npx claude-recall outcomes 2>&1","why_failed":"Exit code 1\nerror: unknown command 'outcomes'","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\nerror: unknown command 'outcomes'","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
69
|
+
- Read/ToolSearch hook errors in claude-recall indicate search_enforcer.py rule-load failures — check python3 syntax and MCP tool availability (mcp__claude-recall__mcp__claude-recall__load_rules must be registered).
|
|
70
|
+
- Pre-tool-use hook errors (e.g., '[python3 search_enforcer.py]' load failures) indicate stale or misconfigured rule state. Call mcp__claude-recall__load_rules {} before retrying the tool to refresh rule context.
|
|
71
|
+
- {"what_failed":"Read failed","why_failed":"File content (11705 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 (11705 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"]}
|
|
72
|
+
- git mv may not fully track deletion of nested files — after moving directories, verify with git status that all expected deletes are staged; 'git mv mock-eiap/ sandbox/mock-eiap/' leaves orphaned nested files (data.js, world/build-ireland.js, world/config.js) that must be explicitly deleted
|
|
73
|
+
- {"what_failed":"Bash command failed: echo ---kill-smoke-eiap---; pkill -f \"mock-eiap/server.js\" 2>/dev/null; sleep 1; echo ---try-even...","why_failed":"Exit code 144\n---kill-smoke-eiap---","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 144\n---kill-smoke-eiap---","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
74
|
+
- {"what_failed":"Bash command failed: openshell --help 2>&1 | grep -iE \"gateway|stop|start|down\" | head -15; echo ---gateway-list---; o...","why_failed":"Exit code 2\nGATEWAY COMMANDS\n gateway: Manage the gateway lifecycle\n status: Show gateway status and information\n doctor: Diagnose gateway issues\n -g, --gateway <GATEWAY>\n ...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 2\nGATEWAY COMMANDS\n gateway: Manage the gateway lifecycle\n status: Show gateway status and information\n doctor: Diagnose gateway issues\n -g, --gateway <GATEWAY>\n ...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
75
|
+
- {"what_failed":"Bash command failed: echo ---kill-everything---; pkill -f \"stream-sessions.sh\" 2>/dev/null; pkill -f \"stream-watcher.p...","why_failed":"Exit code 144\n---kill-everything---","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 144\n---kill-everything---","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
76
|
+
- {"what_failed":"Bash command failed: docker exec openshell-cluster-nemoclaw kubectl exec -n openshell nka-telco -- sh -c \"ls -la /sand...","why_failed":"Exit code 2\nls: cannot access '/sandbox/.openclaw-data/workspace/artifacts/rebuild-status.json': No such file or directory\ncat: /sandbox/.openclaw-data/workspace/artifacts/rebuild-status.json: No s...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 2\nls: cannot access '/sandbox/.openclaw-data/workspace/artifacts/rebuild-status.json': No such file or directory\ncat: /sandbox/.openclaw-data/workspace/artifacts/rebuild-status.json: No s...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
77
|
+
- {"what_failed":"Bash command failed: cd /home/ebiarao/.claude/projects/-home-ebiarao-repos-wsl-personal-projects-openclaw-autonomous-t...","why_failed":"Exit code 2\nls: cannot access 'project_open_remediate_cell_rewrite.md': No such file or directory\nproject_openclaw_egress_filter.md","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 2\nls: cannot access 'project_open_remediate_cell_rewrite.md': No such file or directory\nproject_openclaw_egress_filter.md","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
78
|
+
- {"what_failed":"Bash command failed: B64=$(base64 -w0 < agents/nka/scripts/remediate-backhaul.js); docker exec openshell-cluster-nemoc...","why_failed":"Exit code 2\nsh: 1: cannot create /sandbox/agents/nka/scripts/remediate-backhaul.js: Directory nonexistent\ncommand terminated with exit code 2","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 2\nsh: 1: cannot create /sandbox/agents/nka/scripts/remediate-backhaul.js: Directory nonexistent\ncommand terminated with exit code 2","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
79
|
+
- {"what_failed":"Bash command failed: git commit -m \"$(cat <<'EOF'\nEvent-driven agent cascade + direct EIAP polling — two breakthroughs...","why_failed":"Exit code 128\nerror: gpg failed to sign the data:\n[GNUPG:] KEY_CONSIDERED F3CE7255442A2E7886375262B810E846921AD84F 2\n[GNUPG:] BEGIN_SIGNING H10\n[GNUPG:] USERID_HINT B810E846921AD84F Raoul Biagioni ...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 128\nerror: gpg failed to sign the data:\n[GNUPG:] KEY_CONSIDERED F3CE7255442A2E7886375262B810E846921AD84F 2\n[GNUPG:] BEGIN_SIGNING H10\n[GNUPG:] USERID_HINT B810E846921AD84F Raoul Biagioni ...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
80
|
+
- {"what_failed":"Bash command failed: docker exec openshell-cluster-nemoclaw kubectl exec -n openshell nka-telco -- ls -la /sandbox/.op...","why_failed":"Exit code 1\nfile missing","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\nfile missing","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
81
|
+
- {"what_failed":"Bash command failed: cat /tmp/claude-1000/-home-ebiarao-repos-wsl-personal-projects-openclaw-autonomous-telco-agents/5...","why_failed":"Exit code 7\n\u001b[1mNAME \u001b[0m \u001b[1mNAMESPACE\u001b[0m \u001b[1mCREATED \u001b[0m \u001b[1mPHASE\u001b[0m\nnka-telco openshell 2026-04-06 21:16:26 \u001b[32mReady\u001b[39m\n\u001b[1mNAME \u001b[0m \u001b[1mNAMESPACE\u001b[0m \u001b[1mCRE...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 7\n\u001b[1mNAME \u001b[0m \u001b[1mNAMESPACE\u001b[0m \u001b[1mCREATED \u001b[0m \u001b[1mPHASE\u001b[0m\nnka-telco openshell 2026-04-06 21:16:26 \u001b[32mReady\u001b[39m\n\u001b[1mNAME \u001b[0m \u001b[1mNAMESPACE\u001b[0m \u001b[1mCRE...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
82
|
+
- {"what_failed":"Bash command failed: openshell sandbox list 2>/dev/null; curl -s http://localhost:3000/api/service-health 2>&1","why_failed":"Exit code 7\nNo sandboxes found.","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 7\nNo sandboxes found.","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
83
|
+
- {"what_failed":"Bash command failed: docker exec openshell-cluster-nemoclaw kubectl exec -n openshell nka-telco -- bash -c 'echo $EIAP...","why_failed":"Exit code 1\n\n---\n[collect] fetching EIAP endpoints at 2026-04-06T20:58:54Z\ncommand terminated with exit code 1","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\n\n---\n[collect] fetching EIAP endpoints at 2026-04-06T20:58:54Z\ncommand terminated with exit code 1","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
84
|
+
- {"what_failed":"Bash command failed: openshell status 2>/dev/null | head -5; openshell sandbox list 2>/dev/null","why_failed":"Exit code 1\n\u001b[1m\u001b[36mGateway Status\u001b[39m\u001b[0m\n\n \u001b[2mStatus:\u001b[0m No gateway configured.\n\nDeploy a gateway with: \u001b[2mopenshell gateway start\u001b[0m","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\n\u001b[1m\u001b[36mGateway Status\u001b[39m\u001b[0m\n\n \u001b[2mStatus:\u001b[0m No gateway configured.\n\nDeploy a gateway with: \u001b[2mopenshell gateway start\u001b[0m","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
85
|
+
- {"what_failed":"Read failed","why_failed":"File content (12314 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 (12314 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"]}
|
|
86
|
+
- {"what_failed":"Bash command failed: B64=$(base64 -w0 < agents/shared/tools/post-comms.js) && ssh -q -o StrictHostKeyChecking=no -o Us...","why_failed":"Exit code 1","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
87
|
+
- {"what_failed":"Read failed","why_failed":"File does not exist. Note: your current working directory is /home/ebiarao/repos-wsl/personal-projects/openclaw-autonomous-telco-agents.","what_should_do":"Check inputs and prerequisites before retrying","context":"Error: File does not exist. Note: your current working directory is /home/ebiarao/repos-wsl/personal-projects/openclaw-autonomous-telco-agents.","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
88
|
+
- {"what_failed":"Bash command failed: docker exec openshell-cluster-nemoclaw kubectl exec -n openshell nka-telco -- tail -10 /sandbox/....","why_failed":"Exit code 1\nTraceback (most recent call last):\n File \"<string>\", line 6, in <module>\n d=json.loads(line)\n File \"/home/ebiarao/miniconda3/lib/python3.13/json/__init__.py\", line 346, in loads\n ...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\nTraceback (most recent call last):\n File \"<string>\", line 6, in <module>\n d=json.loads(line)\n File \"/home/ebiarao/miniconda3/lib/python3.13/json/__init__.py\", line 346, in loads\n ...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
89
|
+
- {"what_failed":"Bash command failed: pgrep -af trigger-watcher; echo \"---\"; cat artifacts/trigger-log.jsonl 2>/dev/null || echo \"no tr...","why_failed":"Exit code 1\n3180787 node /home/ebiarao/repos-wsl/personal-projects/openclaw-autonomous-telco-agents/scripts/trigger-watcher.js\n3233721 /bin/bash -c source /home/ebiarao/.claude/shell-snapshots/snap...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\n3180787 node /home/ebiarao/repos-wsl/personal-projects/openclaw-autonomous-telco-agents/scripts/trigger-watcher.js\n3233721 /bin/bash -c source /home/ebiarao/.claude/shell-snapshots/snap...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
90
|
+
- {"what_failed":"Bash command failed: cat artifacts/trigger-log.jsonl 2>/dev/null || echo \"(no triggers yet)\"; echo \"===\"; tail -5 arti...","why_failed":"Exit code 1\n(no triggers yet)\n===","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\n(no triggers yet)\n===","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
91
|
+
- {"what_failed":"Bash command failed: pwd; ls agents/nka/scripts/collect.sh 2>/dev/null","why_failed":"Exit code 2\n/home/ebiarao/repos-wsl/personal-projects/openclaw-autonomous-telco-agents/webui/client","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 2\n/home/ebiarao/repos-wsl/personal-projects/openclaw-autonomous-telco-agents/webui/client","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
92
|
+
- {"what_failed":"Bash command failed: ls artifacts/ 2>/dev/null; mkdir -p artifacts && EIAP_URL=http://127.0.0.1:8090 bash agents/nka/s...","why_failed":"Exit code 127\nbash: agents/nka/scripts/collect.sh: No such file or directory","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 127\nbash: agents/nka/scripts/collect.sh: No such file or directory","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
93
|
+
- {"what_failed":"Bash command failed: cat artifacts/state.json","why_failed":"Exit code 1\ncat: artifacts/state.json: No such file or directory","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\ncat: artifacts/state.json: No such file or directory","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
94
|
+
- {"what_failed":"Bash command failed: sleep 3 && curl -s http://localhost:3000/api/service-health","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"]}
|
|
95
|
+
- {"what_failed":"Bash command failed: cd /home/ebiarao/repos-wsl/personal-projects/openclaw-autonomous-telco-agents && kill $(pgrep -f ...","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"]}
|
|
96
|
+
- {"what_failed":"Bash command failed: node -e \"\nconst fs = require('fs');\nconst wsFile = 'mock-eiap/world/world-state.json';\nconst ws =...","why_failed":"Exit code 1\nnode:fs:449\n return binding.readFileUtf8(path, stringToFlags(options.flag));\n ^\n\nError: ENOENT: no such file or directory, open 'mock-eiap/world/world-state.json'\n ...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\nnode:fs:449\n return binding.readFileUtf8(path, stringToFlags(options.flag));\n ^\n\nError: ENOENT: no such file or directory, open 'mock-eiap/world/world-state.json'\n ...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
97
|
+
- {"what_failed":"Bash command failed: curl -s http://localhost:3000/api/service-health 2>&1; echo \"\"; docker exec openshell-cluster-nem...","why_failed":"Exit code 1\n{\"eiap\":true,\"dataStale\":false,\"signalsAge\":3,\"checkedAt\":\"2026-04-06T18:54:08.040Z\"}\nTraceback (most recent call last):\n File \"<string>\", line 6, in <module>\n print(f\"{j['name']:12...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\n{\"eiap\":true,\"dataStale\":false,\"signalsAge\":3,\"checkedAt\":\"2026-04-06T18:54:08.040Z\"}\nTraceback (most recent call last):\n File \"<string>\", line 6, in <module>\n print(f\"{j['name']:12...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
98
|
+
- {"what_failed":"Bash command failed: docker exec openshell-cluster-nemoclaw kubectl exec -n openshell nka-telco -- bash -c 'openclaw c...","why_failed":"Exit code 1\nError: gateway closed (1006 abnormal closure (no close frame)): no close reason\nGateway target: ws://127.0.0.1:18789\nSource: local loopback\nConfig: /root/.openclaw/openclaw.json\nBind: l...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\nError: gateway closed (1006 abnormal closure (no close frame)): no close reason\nGateway target: ws://127.0.0.1:18789\nSource: local loopback\nConfig: /root/.openclaw/openclaw.json\nBind: l...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
99
|
+
- {"what_failed":"Bash command failed: docker exec openshell-cluster-nemoclaw kubectl exec -n openshell nka-telco -- bash -c 'ps aux | g...","why_failed":"Exit code 1\nbash: line 1: ps: command not found\ncommand terminated with exit code 1","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\nbash: line 1: ps: command not found\ncommand terminated with exit code 1","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
100
|
+
- {"what_failed":"Bash command failed: docker exec openshell-cluster-nemoclaw kubectl exec -n openshell nka-telco -- bash -c 'openclaw c...","why_failed":"Exit code 1\nError: gateway closed (1006 abnormal closure (no close frame)): no close reason\nGateway target: ws://127.0.0.1:18789\nSource: local loopback\nConfig: /root/.openclaw/openclaw.json\nBind: l...","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\nError: gateway closed (1006 abnormal closure (no close frame)): no close reason\nGateway target: ws://127.0.0.1:18789\nSource: local loopback\nConfig: /root/.openclaw/openclaw.json\nBind: l...","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
101
|
+
- {"what_failed":"Bash command failed: docker exec openshell-cluster-nemoclaw kubectl exec -n openshell nka-telco -- bash -c 'openclaw c...","why_failed":"Exit code 1\ncommand terminated with exit code 1","what_should_do":"Check inputs and prerequisites before retrying","context":"Bash error: Exit code 1\ncommand terminated with exit code 1","preventative_checks":["Verify tool inputs are correct","Check preconditions"]}
|
|
32
102
|
- 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
103
|
- {"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
104
|
- {"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"]}
|
|
@@ -47,10 +117,18 @@ Auto-generated from 40 memories. Last updated: 2026-04-06.
|
|
|
47
117
|
- {"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"]}
|
|
48
118
|
- 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
|
|
49
119
|
- Node.js -e flag cannot parse multiline strings with unescaped newlines in single quotes
|
|
120
|
+
- 'npx claude-recall stats' can fail with 'PreToolUse:Bash hook error' — indicates a disconnect between hook registration and execution. When stats fails, verify search results separately as they may disagree; at least one is silently wrong.
|
|
121
|
+
- Grep with escaped quotes (pattern="SESSION_EXTRACTION_PROMPT\"") returns no matches — use unescaped pattern="SESSION_EXTRACTION_PROMPT" instead
|
|
122
|
+
- Gateway token mismatch error — requires verifying token in Control UI settings via dashboard URL
|
|
50
123
|
- claude-recall reconnection failed after reinstall
|
|
51
124
|
- claude-recall reconnection failed after reinstall attempt
|
|
52
125
|
- Output is showing '>' instead of expected response
|
|
53
126
|
- Code output returns '>' instead of expected response
|
|
127
|
+
- Bash command base64 encoding long file content failed silently — use base64 -w0 to disable line wrapping and pipe directly into kubectl exec without intermediate variables
|
|
128
|
+
- Read hook error on .gitignore — search_enforcer.py failed to load rules; retry Read with mcp__claude-recall__load_rules first to populate rules before file operations
|
|
129
|
+
- Avoid: Claude backtracked: "Going back to" → Instead: Consider the problem more carefully before starting. Check for similar past failures.
|
|
130
|
+
- Background command 'Wait one more SENTINEL cycle' failed with exit code 1
|
|
131
|
+
- Avoid: Claude backtracked: "Let me try another" → Instead: Consider the problem more carefully before starting. Check for similar past failures.
|
|
54
132
|
- Avoid: Claude backtracked: "let me try a different approach" → Instead: Consider the problem more carefully before starting. Check for similar past failures.
|
|
55
133
|
|
|
56
134
|
---
|
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"topicId": "failure-lessons",
|
|
3
|
-
"sourceHash": "
|
|
4
|
-
"memoryCount":
|
|
5
|
-
"generatedAt": "2026-04-
|
|
3
|
+
"sourceHash": "f5b6a2ae08e9e7fbfe9f9d678b1068fa5eaad0d81bf30ef2e3d065bfcf873626",
|
|
4
|
+
"memoryCount": 117,
|
|
5
|
+
"generatedAt": "2026-04-09T20:21:12.032Z",
|
|
6
6
|
"memoryKeys": [
|
|
7
7
|
"promoted_1775498319002_awwrsovw6",
|
|
8
8
|
"promoted_1775499579486_bxvgjc80r",
|
|
9
|
+
"hook_failure_1775567919637_ado9z7i52",
|
|
10
|
+
"hook_failure_1775502039213_k4yusuan1",
|
|
9
11
|
"hook_failure_1772637584921_0tj4rrxnt",
|
|
12
|
+
"hook_failure_1775503464385_vz5vdzxvs",
|
|
13
|
+
"hook_failure_1775500959351_j74owpvko",
|
|
14
|
+
"hook_failure_1775637261359_prhnbz9gp",
|
|
15
|
+
"hook_failure_1775571333207_b0jxc7wg9",
|
|
16
|
+
"hook_failure_1775554467902_vefk0wqnx",
|
|
17
|
+
"hook_failure_1775511109813_ly4cjtde6",
|
|
18
|
+
"hook_failure_1775509498191_f79imbrs4",
|
|
19
|
+
"hook_failure_1775645996326_0mz9beu5u",
|
|
20
|
+
"hook_failure_non-zero-exit_1775568947522_v9v3s4rcq",
|
|
21
|
+
"hook_failure_non-zero-exit_1775567518525_sa9trys9z",
|
|
22
|
+
"hook_failure_non-zero-exit_1775566023853_x9yadg72p",
|
|
23
|
+
"hook_failure_non-zero-exit_1775564413767_rjg38weet",
|
|
24
|
+
"hook_failure_non-zero-exit_1775546352476_ifdye1dp6",
|
|
25
|
+
"hook_failure_non-zero-exit_1775511575363_nen5eyl3b",
|
|
26
|
+
"hook_failure_non-zero-exit_1775510785418_2xm52g5q8",
|
|
27
|
+
"hook_failure_non-zero-exit_1775510309712_olv4egt1g",
|
|
28
|
+
"hook_failure_non-zero-exit_1775510309694_1cipsasft",
|
|
29
|
+
"hook_failure_1775510785331_kxr1uoozx",
|
|
30
|
+
"hook_failure_1775510309605_z58f30w5t",
|
|
31
|
+
"hook_failure_1775510305548_qq8hdyk12",
|
|
32
|
+
"hook_failure_1775510298887_aoeh4m2cl",
|
|
33
|
+
"hook_failure_non-zero-exit_1775508193513_ms20rhkf1",
|
|
34
|
+
"hook_failure_1775509104206_lg9fvtipb",
|
|
35
|
+
"hook_failure_1775504451387_fmycaea7m",
|
|
36
|
+
"hook_failure_non-zero-exit_1775503134951_mq2x1hj77",
|
|
37
|
+
"hook_failure_non-zero-exit_1775502651250_4ah16usm4",
|
|
38
|
+
"hook_failure_non-zero-exit_1775502651238_l0c5dkykp",
|
|
39
|
+
"hook_failure_non-zero-exit_1775501919378_s3j17tkr3",
|
|
10
40
|
"hook_failure_1775500665745_zl6zsp7jw",
|
|
11
41
|
"hook_failure_non-zero-exit_1775499579462_n5xb6rr8r",
|
|
12
42
|
"hook_failure_non-zero-exit_1775499579440_2tv110hs9",
|
|
@@ -21,6 +51,45 @@
|
|
|
21
51
|
"hook_failure_non-zero-exit_1772640279977_g3gwlfoqi",
|
|
22
52
|
"hook_failure_1772637570984_yxs8zmurp",
|
|
23
53
|
"hook_failure_1772637485532_djep8eysa",
|
|
54
|
+
"hook_failure_1775764137796_nt2gy4gn4",
|
|
55
|
+
"hook_failure_1775764050725_qexdbw5km",
|
|
56
|
+
"hook_failure_1775764035582_dbcp1mjyw",
|
|
57
|
+
"hook_failure_1775764006133_rszt1zn54",
|
|
58
|
+
"hook_failure_1775763649047_jnx0je5mk",
|
|
59
|
+
"hook_failure_1775763633851_mga29nvnf",
|
|
60
|
+
"hook_failure_1775760197556_7kmkzjbph",
|
|
61
|
+
"hook_failure_1775759374123_6l7pw3gqs",
|
|
62
|
+
"hook_failure_1775759306394_fm3fhkc35",
|
|
63
|
+
"hook_failure_1775571478609_zua292iy0",
|
|
64
|
+
"hook_failure_1775570162971_5ii1j8sw3",
|
|
65
|
+
"hook_failure_1775568820718_1d7pfm9s1",
|
|
66
|
+
"hook_failure_1775566682561_jfbkzxzvt",
|
|
67
|
+
"hook_failure_1775565590990_g2pab28yu",
|
|
68
|
+
"hook_failure_1775563474928_wqww7caqd",
|
|
69
|
+
"hook_failure_1775544637722_0vkaiyddz",
|
|
70
|
+
"hook_failure_1775511332509_3mxf5vtg3",
|
|
71
|
+
"hook_failure_1775510710817_sn23160zp",
|
|
72
|
+
"hook_failure_1775510222535_o2t7vm7qp",
|
|
73
|
+
"hook_failure_1775510141049_oo7v7htpv",
|
|
74
|
+
"hook_failure_1775509134627_wu9wz6w1p",
|
|
75
|
+
"hook_failure_1775508183011_gy3nzxwiy",
|
|
76
|
+
"hook_failure_1775505258754_l50o6be33",
|
|
77
|
+
"hook_failure_1775503921254_zyjka5vj9",
|
|
78
|
+
"hook_failure_1775503659141_1fh62brao",
|
|
79
|
+
"hook_failure_1775503198240_qzmm07ves",
|
|
80
|
+
"hook_failure_1775503190006_k5mdxukzl",
|
|
81
|
+
"hook_failure_1775503183507_rs20xzomb",
|
|
82
|
+
"hook_failure_1775503035650_efta0k28k",
|
|
83
|
+
"hook_failure_1775503031427_e9070twhb",
|
|
84
|
+
"hook_failure_1775503009947_ea2euap40",
|
|
85
|
+
"hook_failure_1775502961298_snolsqnu9",
|
|
86
|
+
"hook_failure_1775502951488_hyvabjgp1",
|
|
87
|
+
"hook_failure_1775502809370_icsa9nxsy",
|
|
88
|
+
"hook_failure_1775501648406_78lsvrrb1",
|
|
89
|
+
"hook_failure_1775501136927_v2zesbrwh",
|
|
90
|
+
"hook_failure_1775501122267_ejvqdr0id",
|
|
91
|
+
"hook_failure_1775501085124_c92qa38u7",
|
|
92
|
+
"hook_failure_1775501078345_pryhog20w",
|
|
24
93
|
"hook_failure_1775500618695_6grbwpm3t",
|
|
25
94
|
"hook_failure_1775500273633_yrw798ahh",
|
|
26
95
|
"hook_failure_1775500125145_ad65bw8rs",
|
|
@@ -39,10 +108,18 @@
|
|
|
39
108
|
"hook_failure_1775498542480_wc23ux8gt",
|
|
40
109
|
"hook_failure_silent-test-failure_1772640279996_m8f3ks8fw",
|
|
41
110
|
"hook_failure_1772637495154_i21dho3dv",
|
|
111
|
+
"hook_failure_1775760542139_lm1nf043v",
|
|
112
|
+
"hook_failure_1775511713477_psti3hr7y",
|
|
113
|
+
"hook_failure_1775502085189_pnbd0kkg1",
|
|
42
114
|
"hook_failure_1773410663873_oegccxk83",
|
|
43
115
|
"hook_failure_1773410656672_kno1aw8wf",
|
|
44
116
|
"hook_failure_1772637391602_cjj3esg33",
|
|
45
117
|
"hook_failure_1772637376157_hvco6jbm4",
|
|
118
|
+
"hook_failure_1775546352399_1znn01j7o",
|
|
119
|
+
"hook_failure_1775759908170_k8yreza2o",
|
|
120
|
+
"hook_failure_backtracking_1775564413782_4qgh3envk",
|
|
121
|
+
"hook_failure_1775509857057_847nm61ld",
|
|
122
|
+
"hook_failure_backtracking_1775508193524_54wn8o688",
|
|
46
123
|
"hook_failure_backtracking_1772640280006_snb0x5cgg"
|
|
47
124
|
]
|
|
48
125
|
}
|
|
@@ -8,30 +8,15 @@ source: claude-recall
|
|
|
8
8
|
|
|
9
9
|
# Preferences
|
|
10
10
|
|
|
11
|
-
Auto-generated from
|
|
11
|
+
Auto-generated from 5 memories. Last updated: 2026-04-09.
|
|
12
12
|
|
|
13
13
|
## Rules
|
|
14
14
|
|
|
15
|
-
- Session test preference
|
|
16
|
-
- Test preference
|
|
17
|
-
- Test preference
|
|
18
|
-
- Test preference
|
|
15
|
+
- Session test preference 1775768726677
|
|
16
|
+
- Test preference 1775768726629-2
|
|
17
|
+
- Test preference 1775768726629-1
|
|
18
|
+
- Test preference 1775768726629-0
|
|
19
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
|
|
25
|
-
- Session test preference 1775496241643
|
|
26
|
-
- Test preference 1775496241514-2
|
|
27
|
-
- Test preference 1775496241514-1
|
|
28
|
-
- Test preference 1775496241514-0
|
|
29
|
-
- Test memory content
|
|
30
|
-
- Session test preference 1775494279149
|
|
31
|
-
- After each refactoring, document the changes made. Don't batch documentation to the end — write it as you go.
|
|
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.
|
|
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.
|
|
34
|
-
- For agentic design, agents should decide when to run rather than using cron jobs for scheduling
|
|
35
20
|
|
|
36
21
|
---
|
|
37
22
|
*Auto-generated by Claude Recall. Regenerate: `npx claude-recall skills generate`*
|
|
@@ -1,28 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"topicId": "preferences",
|
|
3
|
-
"sourceHash": "
|
|
4
|
-
"memoryCount":
|
|
5
|
-
"generatedAt": "2026-04-
|
|
3
|
+
"sourceHash": "6deab3a85a84a13804c09fd95225d54f4d11e646d8109ec83cd968d1b7af771e",
|
|
4
|
+
"memoryCount": 5,
|
|
5
|
+
"generatedAt": "2026-04-09T21:05:26.692Z",
|
|
6
6
|
"memoryKeys": [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"memory_1775499328561_9m7ao3h8s",
|
|
13
|
-
"memory_1775499328480_e2zx9g5ly",
|
|
14
|
-
"memory_1775499328425_plvaaxd69",
|
|
15
|
-
"memory_1775499328386_dqcav3itu",
|
|
16
|
-
"memory_1775499328258_cilhe1owj",
|
|
17
|
-
"memory_1775496241645_xtz7cwan4",
|
|
18
|
-
"memory_1775496241576_j7sxxuge3",
|
|
19
|
-
"memory_1775496241542_rg3hj24ud",
|
|
20
|
-
"memory_1775496241516_y3inz8rlf",
|
|
21
|
-
"memory_1775496241411_vwdz6igrm",
|
|
22
|
-
"memory_1775494279150_n4pq7zy11",
|
|
23
|
-
"memory_1775208934902_2kovciriy",
|
|
24
|
-
"memory_1775208477621_fqa3w21j1",
|
|
25
|
-
"memory_1775168901303_o8o0i4952",
|
|
26
|
-
"hook_preference_1775498374200_6d21qj14y"
|
|
7
|
+
"memory_1775768726678_aa8631cqc",
|
|
8
|
+
"memory_1775768726653_3tkihcis0",
|
|
9
|
+
"memory_1775768726640_ii27bz2av",
|
|
10
|
+
"memory_1775768726630_p95bn61ba",
|
|
11
|
+
"memory_1775768726593_fb0syx1bo"
|
|
27
12
|
]
|
|
28
13
|
}
|
package/README.md
CHANGED
|
@@ -84,11 +84,11 @@ Once installed, Claude Recall works automatically in the background:
|
|
|
84
84
|
1. **Session start** — active rules are loaded before the first action. In Claude Code, this happens via the `search_enforcer` hook; in Pi, rules are injected into the system prompt automatically
|
|
85
85
|
2. **As you work** — every prompt is classified for corrections and preferences. Natural statements like *"we use tabs here"* or *"no, put tests in `__tests__/`"* are detected and stored
|
|
86
86
|
3. **Tool outcomes** — results from all tools (Bash, Edit, Write, and more) are captured. Failures are stored as memories; Bash failures are paired with successful fixes
|
|
87
|
-
4. **End of session** — session episodes are created, candidate lessons extracted from failures, and a promotion cycle graduates validated patterns into active rules. A session extraction pass sends the last 50 transcript entries to Haiku to
|
|
87
|
+
4. **End of session** — session episodes are created, candidate lessons extracted from failures, and a promotion cycle graduates validated patterns into active rules. A session extraction pass sends the last 50 transcript entries to Haiku to identify cause-and-effect patterns: what failed, why, and what fixed it
|
|
88
88
|
5. **Reask detection** — frustration signals ("still broken", "that didn't work") are recorded as outcome events
|
|
89
89
|
6. **Before context compression** — aggressive memory sweep captures important context before the window shrinks
|
|
90
90
|
7. **After context compression** (Claude Code only) — rules are automatically re-injected into context so they're not lost when the window shrinks
|
|
91
|
-
8. **
|
|
91
|
+
8. **Sub-agent recall** (Claude Code only) — when sub-agents are spawned, active rules are injected into their context automatically. Sub-agent outcomes (completed/failed/killed) are captured as events
|
|
92
92
|
9. **Rules sync** (Claude Code only) — top 30 rules are exported as typed `.md` files to Claude Code's native memory directory
|
|
93
93
|
|
|
94
94
|
Classification uses Claude Haiku (via `ANTHROPIC_API_KEY`) with silent regex fallback. No configuration needed.
|
|
@@ -117,10 +117,9 @@ class ClaudeRecallCLI {
|
|
|
117
117
|
* Get stats for a specific project (includes universal and unscoped memories)
|
|
118
118
|
*/
|
|
119
119
|
getProjectStats(projectId) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
m.project_id === null);
|
|
120
|
+
// Use getAllByProject for true enumeration. search() pre-ranks and caps
|
|
121
|
+
// at top-5, which silently masks most memories from stats.
|
|
122
|
+
const projectMemories = this.memoryService.getAllByProject(projectId);
|
|
124
123
|
// Calculate byType breakdown
|
|
125
124
|
const byType = {};
|
|
126
125
|
for (const mem of projectMemories) {
|
|
@@ -135,7 +134,8 @@ class ClaudeRecallCLI {
|
|
|
135
134
|
* Show skills evolution breakdown
|
|
136
135
|
*/
|
|
137
136
|
showSkillsEvolution() {
|
|
138
|
-
const
|
|
137
|
+
const projectId = config_1.ConfigService.getInstance().getProjectId();
|
|
138
|
+
const allMemories = this.memoryService.getAllByProject(projectId);
|
|
139
139
|
const devopsMemories = allMemories.filter(m => m.type === 'devops');
|
|
140
140
|
if (devopsMemories.length === 0) {
|
|
141
141
|
return;
|
|
@@ -182,7 +182,8 @@ class ClaudeRecallCLI {
|
|
|
182
182
|
// Rough estimation:
|
|
183
183
|
// - Each memory saves ~200 tokens (vs repeating to LLM)
|
|
184
184
|
// - DevOps memories save ~1,500 tokens each (vs loading reference files)
|
|
185
|
-
const
|
|
185
|
+
const projectId = config_1.ConfigService.getInstance().getProjectId();
|
|
186
|
+
const allMemories = this.memoryService.getAllByProject(projectId);
|
|
186
187
|
const devopsCount = allMemories.filter(m => m.type === 'devops').length;
|
|
187
188
|
const otherCount = stats.total - devopsCount;
|
|
188
189
|
const devopsSavings = devopsCount * 1500;
|
|
@@ -224,11 +225,9 @@ class ClaudeRecallCLI {
|
|
|
224
225
|
* Show failure memories (v0.7.0)
|
|
225
226
|
*/
|
|
226
227
|
showFailures(options) {
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
failures = failures.filter(m => m.project_id === options.project);
|
|
231
|
-
}
|
|
228
|
+
const projectId = options.project || config_1.ConfigService.getInstance().getProjectId();
|
|
229
|
+
const allMemories = this.memoryService.getAllByProject(projectId);
|
|
230
|
+
const failures = allMemories.filter(m => m.type === 'failure');
|
|
232
231
|
// Sort by timestamp (newest first)
|
|
233
232
|
failures.sort((a, b) => (b.timestamp || 0) - (a.timestamp || 0));
|
|
234
233
|
// Limit results
|
|
@@ -354,8 +353,8 @@ class ClaudeRecallCLI {
|
|
|
354
353
|
// Determine search scope
|
|
355
354
|
let results;
|
|
356
355
|
if (options.global) {
|
|
357
|
-
// Global search:
|
|
358
|
-
results = this.memoryService.search(query);
|
|
356
|
+
// Global search: explicit cross-project opt-in
|
|
357
|
+
results = this.memoryService.search(query, { includeAllProjects: true });
|
|
359
358
|
}
|
|
360
359
|
else if (options.project) {
|
|
361
360
|
// Project-specific search: project + universal
|
|
@@ -408,8 +407,10 @@ class ClaudeRecallCLI {
|
|
|
408
407
|
async export(outputPath, options) {
|
|
409
408
|
const format = options.format || 'json';
|
|
410
409
|
try {
|
|
411
|
-
//
|
|
412
|
-
|
|
410
|
+
// Export all memories from the current project (+ universal). For a
|
|
411
|
+
// true cross-project dump, the user can run `--project` per project.
|
|
412
|
+
const projectId = config_1.ConfigService.getInstance().getProjectId();
|
|
413
|
+
const memories = this.memoryService.getAllByProject(projectId);
|
|
413
414
|
if (format === 'json') {
|
|
414
415
|
const exportData = {
|
|
415
416
|
version: '0.2.0',
|
|
@@ -48,8 +48,8 @@ async function handleCorrectionDetector(input) {
|
|
|
48
48
|
// Reject short/garbage extracts and raw dumps (not clean rules)
|
|
49
49
|
if (result.extract.length < 10 || result.extract.length > 200)
|
|
50
50
|
return;
|
|
51
|
-
// Corrections and
|
|
52
|
-
if ((result.type === 'correction' || result.type === 'preference') && result.confidence < 0.
|
|
51
|
+
// Corrections, preferences, and devops need high confidence to prevent noise
|
|
52
|
+
if ((result.type === 'correction' || result.type === 'preference' || result.type === 'devops') && result.confidence < 0.75)
|
|
53
53
|
return;
|
|
54
54
|
if (result.confidence < 0.6)
|
|
55
55
|
return;
|
|
@@ -18,7 +18,7 @@ const SYSTEM_PROMPT = `You are a memory classifier for a developer tool. Classif
|
|
|
18
18
|
- correction: User correcting a mistake ("no, use X not Y", "wrong, it should be...")
|
|
19
19
|
- preference: User stating a clear, reusable directive about how they want things done going forward ("we use tabs", "always use TypeScript", "I prefer X"). Must be a rule that applies beyond this conversation. NOT observations, complaints, questions, debugging statements, or one-off instructions like "fix this" or "tell me about X"
|
|
20
20
|
- failure: Something broke or failed ("build failed", "error in deployment")
|
|
21
|
-
- devops: CI/CD, deployment, Docker, git workflow patterns
|
|
21
|
+
- devops: CI/CD, deployment, Docker, git workflow patterns. ONLY durable rules — not transient operational events like "sandbox rebuilt" or "background task exited"
|
|
22
22
|
- project-knowledge: Architecture, stack, database, API patterns
|
|
23
23
|
- none: Casual conversation, questions, code snippets, or anything not worth remembering
|
|
24
24
|
|
|
@@ -39,7 +39,7 @@ const BATCH_SYSTEM_PROMPT = `You are a memory classifier for a developer tool. Y
|
|
|
39
39
|
- correction: User correcting a mistake ("no, use X not Y", "wrong, it should be...")
|
|
40
40
|
- preference: User stating a clear, reusable directive about how they want things done going forward ("we use tabs", "always use TypeScript", "I prefer X"). Must be a rule that applies beyond this conversation. NOT observations, complaints, questions, debugging statements, or one-off instructions like "fix this" or "tell me about X"
|
|
41
41
|
- failure: Something broke or failed ("build failed", "error in deployment")
|
|
42
|
-
- devops: CI/CD, deployment, Docker, git workflow patterns
|
|
42
|
+
- devops: CI/CD, deployment, Docker, git workflow patterns. ONLY durable rules — not transient operational events like "sandbox rebuilt" or "background task exited"
|
|
43
43
|
- project-knowledge: Architecture, stack, database, API patterns
|
|
44
44
|
- none: Casual conversation, questions, code snippets, or anything not worth remembering
|
|
45
45
|
|
|
@@ -94,8 +94,8 @@ async function handleMemoryStop(input) {
|
|
|
94
94
|
// Reject extracts that are too short or too long (not clean rules)
|
|
95
95
|
if (result.extract.length < 10 || result.extract.length > 200)
|
|
96
96
|
continue;
|
|
97
|
-
// Corrections and
|
|
98
|
-
if ((result.type === 'correction' || result.type === 'preference') && result.confidence < 0.
|
|
97
|
+
// Corrections, preferences, and devops need higher confidence to prevent noise
|
|
98
|
+
if ((result.type === 'correction' || result.type === 'preference' || result.type === 'devops') && result.confidence < 0.75)
|
|
99
99
|
continue;
|
|
100
100
|
if (result.confidence < 0.6)
|
|
101
101
|
continue;
|
|
@@ -235,7 +235,10 @@ async function handleBashFailure(command, exitCode, output, sessionId) {
|
|
|
235
235
|
const memoryService = memory_1.MemoryService.getInstance();
|
|
236
236
|
memoryService.store({
|
|
237
237
|
key,
|
|
238
|
-
value:
|
|
238
|
+
value: {
|
|
239
|
+
content: `${failureContent.what_failed}. ${failureContent.why_failed}`,
|
|
240
|
+
...failureContent,
|
|
241
|
+
},
|
|
239
242
|
type: 'failure',
|
|
240
243
|
context: { timestamp: Date.now() },
|
|
241
244
|
relevanceScore: 0.85,
|
|
@@ -161,7 +161,7 @@ class PromptsHandler {
|
|
|
161
161
|
* Injects all user preferences into context
|
|
162
162
|
*/
|
|
163
163
|
async getPreferencesPrompt() {
|
|
164
|
-
const preferences = this.memoryStorage.searchByContext({ type: 'preference' });
|
|
164
|
+
const preferences = this.memoryStorage.searchByContext({ type: 'preference', project_id: config_1.ConfigService.getInstance().getProjectId() });
|
|
165
165
|
const preferencesText = this.formatPreferencesForPrompt(preferences);
|
|
166
166
|
return {
|
|
167
167
|
description: 'User coding preferences automatically injected',
|
|
@@ -182,7 +182,7 @@ Apply these preferences when generating code or making suggestions.`
|
|
|
182
182
|
* Injects relevant project knowledge
|
|
183
183
|
*/
|
|
184
184
|
async getProjectContextPrompt(topic) {
|
|
185
|
-
let knowledge = this.memoryStorage.searchByContext({ type: 'project-knowledge' });
|
|
185
|
+
let knowledge = this.memoryStorage.searchByContext({ type: 'project-knowledge', project_id: config_1.ConfigService.getInstance().getProjectId() });
|
|
186
186
|
// Filter by topic if provided
|
|
187
187
|
if (topic) {
|
|
188
188
|
const results = this.memoryService.search(topic);
|
|
@@ -211,7 +211,7 @@ Use this information when working with the project.`
|
|
|
211
211
|
* Injects recent correction patterns
|
|
212
212
|
*/
|
|
213
213
|
async getCorrectionsPrompt() {
|
|
214
|
-
const corrections = this.memoryStorage.searchByContext({ type: 'correction' });
|
|
214
|
+
const corrections = this.memoryStorage.searchByContext({ type: 'correction', project_id: config_1.ConfigService.getInstance().getProjectId() });
|
|
215
215
|
// Get most recent 10
|
|
216
216
|
const recentCorrections = corrections
|
|
217
217
|
.sort((a, b) => (b.timestamp || 0) - (a.timestamp || 0))
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ResourcesHandler = void 0;
|
|
4
4
|
const memory_1 = require("../services/memory");
|
|
5
5
|
const logging_1 = require("../services/logging");
|
|
6
|
+
const config_1 = require("../services/config");
|
|
6
7
|
/**
|
|
7
8
|
* Handles MCP Resources protocol
|
|
8
9
|
* Resources are static/semi-static context that Claude Code can subscribe to
|
|
@@ -141,7 +142,7 @@ class ResourcesHandler {
|
|
|
141
142
|
* Get preferences resource content
|
|
142
143
|
*/
|
|
143
144
|
async getPreferencesResource(uri) {
|
|
144
|
-
const memories = this.memoryStorage.searchByContext({ type: 'preference' });
|
|
145
|
+
const memories = this.memoryStorage.searchByContext({ type: 'preference', project_id: config_1.ConfigService.getInstance().getProjectId() });
|
|
145
146
|
// Format preferences for easy consumption
|
|
146
147
|
const preferences = memories.map(m => ({
|
|
147
148
|
key: m.key,
|
|
@@ -163,7 +164,7 @@ class ResourcesHandler {
|
|
|
163
164
|
* Get project knowledge resource content
|
|
164
165
|
*/
|
|
165
166
|
async getProjectKnowledgeResource(uri) {
|
|
166
|
-
const memories = this.memoryStorage.searchByContext({ type: 'project-knowledge' });
|
|
167
|
+
const memories = this.memoryStorage.searchByContext({ type: 'project-knowledge', project_id: config_1.ConfigService.getInstance().getProjectId() });
|
|
167
168
|
const knowledge = memories.map(m => ({
|
|
168
169
|
key: m.key,
|
|
169
170
|
content: m.value,
|
|
@@ -182,7 +183,7 @@ class ResourcesHandler {
|
|
|
182
183
|
* Get recent corrections resource content
|
|
183
184
|
*/
|
|
184
185
|
async getCorrectionsResource(uri) {
|
|
185
|
-
const memories = this.memoryStorage.searchByContext({ type: 'correction' });
|
|
186
|
+
const memories = this.memoryStorage.searchByContext({ type: 'correction', project_id: config_1.ConfigService.getInstance().getProjectId() });
|
|
186
187
|
// Get most recent 10 corrections
|
|
187
188
|
const recentCorrections = memories
|
|
188
189
|
.sort((a, b) => (b.timestamp || 0) - (a.timestamp || 0))
|
|
@@ -206,7 +207,7 @@ class ResourcesHandler {
|
|
|
206
207
|
async getActiveContextResource(uri) {
|
|
207
208
|
// Get top 5 most accessed memories from last 24 hours
|
|
208
209
|
const oneDayAgo = Date.now() - (24 * 60 * 60 * 1000);
|
|
209
|
-
const allMemories = this.memoryStorage.searchByContext({});
|
|
210
|
+
const allMemories = this.memoryStorage.searchByContext({ project_id: config_1.ConfigService.getInstance().getProjectId() });
|
|
210
211
|
const recentMemories = allMemories
|
|
211
212
|
.filter(m => (m.timestamp || 0) > oneDayAgo)
|
|
212
213
|
.sort((a, b) => (b.access_count || 0) - (a.access_count || 0))
|
|
@@ -36,7 +36,8 @@ class PatternStore {
|
|
|
36
36
|
const memories = this.storage.searchByContext({
|
|
37
37
|
type: 'correction-pattern',
|
|
38
38
|
project_id: process.env.CLAUDE_PROJECT_DIR,
|
|
39
|
-
file_path: undefined
|
|
39
|
+
file_path: undefined,
|
|
40
|
+
includeAllProjects: !process.env.CLAUDE_PROJECT_DIR,
|
|
40
41
|
});
|
|
41
42
|
for (const memory of memories) {
|
|
42
43
|
const stored = memory.value;
|
|
@@ -55,7 +56,8 @@ class PatternStore {
|
|
|
55
56
|
const patterns = this.storage.searchByContext({
|
|
56
57
|
type: 'correction-pattern',
|
|
57
58
|
project_id: process.env.CLAUDE_PROJECT_DIR,
|
|
58
|
-
file_path: undefined
|
|
59
|
+
file_path: undefined,
|
|
60
|
+
includeAllProjects: !process.env.CLAUDE_PROJECT_DIR,
|
|
59
61
|
});
|
|
60
62
|
return patterns
|
|
61
63
|
.map(m => m.value)
|
package/dist/memory/storage.js
CHANGED
|
@@ -296,6 +296,13 @@ class MemoryStorage {
|
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
298
|
searchByContext(context) {
|
|
299
|
+
// Fail loud when called without scope. This prevents silent cross-project
|
|
300
|
+
// leakage that the previous default-allow behaviour caused. Callers that
|
|
301
|
+
// genuinely want all projects must opt in with includeAllProjects: true.
|
|
302
|
+
if (!context.project_id && !context.includeAllProjects) {
|
|
303
|
+
throw new Error('searchByContext requires context.project_id or context.includeAllProjects=true. ' +
|
|
304
|
+
'Calling without either would silently return memories from all projects.');
|
|
305
|
+
}
|
|
299
306
|
let query = 'SELECT * FROM memories WHERE 1=1';
|
|
300
307
|
const params = [];
|
|
301
308
|
if (context.project_id) {
|
|
@@ -303,6 +310,7 @@ class MemoryStorage {
|
|
|
303
310
|
query += ' AND (project_id = ? OR scope = ? OR project_id IS NULL)';
|
|
304
311
|
params.push(context.project_id, 'universal');
|
|
305
312
|
}
|
|
313
|
+
// includeAllProjects: no project filter — caller explicitly asked for everything.
|
|
306
314
|
if (context.file_path) {
|
|
307
315
|
query += ' AND file_path = ?';
|
|
308
316
|
params.push(context.file_path);
|
package/dist/services/config.js
CHANGED
|
@@ -134,12 +134,16 @@ class ConfigService {
|
|
|
134
134
|
return { ...this.config };
|
|
135
135
|
}
|
|
136
136
|
getDatabasePath() {
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
//
|
|
142
|
-
|
|
137
|
+
// Honor CLAUDE_RECALL_DB_PATH / CLAUDE_RECALL_DB_NAME via the loaded
|
|
138
|
+
// config (loadConfig already reads them with sensible defaults). The
|
|
139
|
+
// previous "always use ~/.claude-recall" behaviour broke test isolation:
|
|
140
|
+
// tests setting CLAUDE_RECALL_DB_PATH silently wrote to the production
|
|
141
|
+
// DB and polluted it with fixture rows.
|
|
142
|
+
const dbDir = this.config.database.path;
|
|
143
|
+
const dbPath = path.join(dbDir, this.config.database.name);
|
|
144
|
+
// Ensure database directory exists. Skip for in-memory DBs (`:memory:`)
|
|
145
|
+
// and any path that doesn't look like a real filesystem location.
|
|
146
|
+
if (dbDir && dbDir !== ':memory:' && !fs.existsSync(dbDir)) {
|
|
143
147
|
fs.mkdirSync(dbDir, { recursive: true });
|
|
144
148
|
}
|
|
145
149
|
return dbPath;
|
package/dist/services/memory.js
CHANGED
|
@@ -109,19 +109,35 @@ class MemoryService {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
|
-
* Search memories by keyword
|
|
112
|
+
* Search memories by keyword.
|
|
113
|
+
*
|
|
114
|
+
* Scope rules (post-Fix-2):
|
|
115
|
+
* - Default: scoped to current project (projectId from ConfigService) +
|
|
116
|
+
* universal/unscoped memories.
|
|
117
|
+
* - Pass opts.projectId to scope to a specific project.
|
|
118
|
+
* - Pass opts.includeAllProjects=true to opt into a true global search
|
|
119
|
+
* (used by `claude-recall search --global`).
|
|
113
120
|
*/
|
|
114
|
-
search(query,
|
|
121
|
+
search(query, optsOrSortBy = 'relevance') {
|
|
122
|
+
const opts = typeof optsOrSortBy === 'string' ? { sortBy: optsOrSortBy } : optsOrSortBy;
|
|
123
|
+
const sortBy = opts.sortBy || 'relevance';
|
|
115
124
|
try {
|
|
116
|
-
// Use findRelevant with query context for better semantic matching
|
|
117
125
|
const context = {
|
|
118
126
|
query: query,
|
|
119
|
-
timestamp: Date.now()
|
|
127
|
+
timestamp: Date.now(),
|
|
120
128
|
};
|
|
129
|
+
if (opts.includeAllProjects) {
|
|
130
|
+
context.includeAllProjects = true;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
context.project_id = opts.projectId || this.config.getProjectId();
|
|
134
|
+
}
|
|
121
135
|
const results = this.retrieval.findRelevant(context, sortBy);
|
|
122
136
|
this.logger.logRetrieval(query, results.length, {
|
|
123
137
|
searchType: 'contextual',
|
|
124
|
-
sortBy
|
|
138
|
+
sortBy,
|
|
139
|
+
projectId: context.project_id,
|
|
140
|
+
includeAllProjects: !!opts.includeAllProjects,
|
|
125
141
|
});
|
|
126
142
|
return results;
|
|
127
143
|
}
|
|
@@ -130,6 +146,24 @@ class MemoryService {
|
|
|
130
146
|
throw error;
|
|
131
147
|
}
|
|
132
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Enumerate ALL memories scoped to a project (project + universal + unscoped),
|
|
151
|
+
* with NO ranking and NO result cap.
|
|
152
|
+
*
|
|
153
|
+
* Use this for stats, exports, and any other "give me everything in scope"
|
|
154
|
+
* operation. Do NOT use search() / findRelevant() for enumeration — those
|
|
155
|
+
* pre-rank by type priority and cap at top-5, which silently hides most
|
|
156
|
+
* memories from callers that wanted a complete list.
|
|
157
|
+
*/
|
|
158
|
+
getAllByProject(projectId) {
|
|
159
|
+
try {
|
|
160
|
+
return this.storage.searchByContext({ project_id: projectId });
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
this.logger.logServiceError('MemoryService', 'getAllByProject', error, { projectId });
|
|
164
|
+
throw error;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
133
167
|
/**
|
|
134
168
|
* Get memory storage statistics
|
|
135
169
|
*/
|
|
@@ -288,6 +288,10 @@ class SkillGenerator {
|
|
|
288
288
|
if (projectId) {
|
|
289
289
|
searchContext.project_id = projectId;
|
|
290
290
|
}
|
|
291
|
+
else {
|
|
292
|
+
// Skill generation runs across all projects for global skill discovery.
|
|
293
|
+
searchContext.includeAllProjects = true;
|
|
294
|
+
}
|
|
291
295
|
let memories = this.storage.searchByContext(searchContext);
|
|
292
296
|
// Filter by devops category if specified
|
|
293
297
|
if (topic.devopsCategory) {
|
|
@@ -206,7 +206,10 @@ function storeToolFailure(toolName, toolInput, output, sessionId) {
|
|
|
206
206
|
const key = `hook_failure_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
207
207
|
memory_1.MemoryService.getInstance().store({
|
|
208
208
|
key,
|
|
209
|
-
value:
|
|
209
|
+
value: {
|
|
210
|
+
content: `${failureContent.what_failed}. ${failureContent.why_failed}`,
|
|
211
|
+
...failureContent,
|
|
212
|
+
},
|
|
210
213
|
type: 'failure',
|
|
211
214
|
context: { timestamp: Date.now() },
|
|
212
215
|
relevanceScore: 0.75,
|
|
@@ -278,7 +281,7 @@ async function processUserInput(text, sessionId) {
|
|
|
278
281
|
return null;
|
|
279
282
|
if (result.extract.length < 10 || result.extract.length > 200)
|
|
280
283
|
return null;
|
|
281
|
-
if ((result.type === 'correction' || result.type === 'preference') && result.confidence < 0.
|
|
284
|
+
if ((result.type === 'correction' || result.type === 'preference' || result.type === 'devops') && result.confidence < 0.75)
|
|
282
285
|
return null;
|
|
283
286
|
if (result.confidence < 0.6)
|
|
284
287
|
return null;
|
|
@@ -325,7 +328,7 @@ async function processSessionEnd(userTexts, sessionId, projectId, maxStore = 3)
|
|
|
325
328
|
continue;
|
|
326
329
|
if (result.extract.length < 10 || result.extract.length > 200)
|
|
327
330
|
continue;
|
|
328
|
-
if ((result.type === 'correction' || result.type === 'preference') && result.confidence < 0.
|
|
331
|
+
if ((result.type === 'correction' || result.type === 'preference' || result.type === 'devops') && result.confidence < 0.75)
|
|
329
332
|
continue;
|
|
330
333
|
if (result.confidence < 0.6)
|
|
331
334
|
continue;
|
package/package.json
CHANGED