Summary
The Claude Code plugin's auto-recall hook (scripts/recall.py) doesn't expose tag filtering to the client config (~/.hindsight/claude-code.json). When a bank defines entity_labels with tag: true, the LLM classification cost is paid at retain time but cannot be leveraged at recall time via the hook.
Motivation
The official client.recall(tags=..., tag_groups=..., tags_match=...) API supports rich tag filtering — and the best-practices §Filtering by Memory Shape docs explicitly recommend entity_labels with tag: true as the canonical pattern for separating semantically similar memories that serve different purposes (e.g. concise rules vs detailed procedures).
However the auto-recall hook in hindsight-memory/<v>/scripts/recall.py doesn't read any tag-related keys from client config and doesn't pass tags/tag_groups to client.recall():
$ grep -nE "tags|recall_tags|recallTags|tag_groups|tagGroups|tagsMatch" scripts/recall.py
(0 matches)
while lib/client.py does accept tag parameters in recall() (tags: Optional[list] = None around line 138).
Use case (the one we hit)
We maintain a single normative methodology bank that all project sessions read cross-bank via recallAdditionalBanks. We configured entity_labels:
{
"entity_labels": [
{"key": "memory_type", "type": "value", "tag": true, "values": [
{"value": "rule", "description": "concise operating rule"},
{"value": "procedure", "description": "step-by-step instruction"}
]},
{"key": "tech_stack", "type": "multi-values", "tag": true, "values": [
{"value": "supabase"}, {"value": "lovable"}, ...
]}
]
}
We wanted auto-recall to:
- Bias toward
memory_type:rule (durable axioms) over memory_type:procedure (runbooks) on planning-style turns
- Filter by the current project's
tech_stack:<name>
Today we either pay classification cost with zero recall benefit, or remove entity_labels entirely (our current workaround).
Proposal
Add optional config keys to ~/.hindsight/claude-code.json that map to the existing client.recall() parameters:
recallTags: list[str] — tags to pass to client.recall(tags=...)
tagsMatch: "any" | "all" | "any_strict" | "all_strict" (default "any" per best-practices)
tagGroups: <tree> — optional nested boolean tree per recall.md §tag_groups
If those keys are present, recall.py passes them through to client.recall(tags=..., tag_groups=..., tags_match=...). Otherwise behavior unchanged.
Per-bank overrides would be especially useful for our topology — something like recallTagsByBank: { "<bank_id>": [...] } so a normative bank read via recallAdditionalBanks can be filtered (e.g. memory_type:rule only) without affecting the project bank's own recall.
Version
- plugin: hindsight-memory 0.7.0 (also reviewed 0.7.1 changelog — no mention of tag filter support)
- platform: Windows 11
Happy to send a PR if this direction is welcome. Thanks for the great plugin.
Summary
The Claude Code plugin's auto-recall hook (
scripts/recall.py) doesn't expose tag filtering to the client config (~/.hindsight/claude-code.json). When a bank definesentity_labelswithtag: true, the LLM classification cost is paid at retain time but cannot be leveraged at recall time via the hook.Motivation
The official
client.recall(tags=..., tag_groups=..., tags_match=...)API supports rich tag filtering — and the best-practices §Filtering by Memory Shape docs explicitly recommendentity_labelswithtag: trueas the canonical pattern for separating semantically similar memories that serve different purposes (e.g. concise rules vs detailed procedures).However the auto-recall hook in
hindsight-memory/<v>/scripts/recall.pydoesn't read any tag-related keys from client config and doesn't passtags/tag_groupstoclient.recall():while
lib/client.pydoes accept tag parameters inrecall()(tags: Optional[list] = Nonearound line 138).Use case (the one we hit)
We maintain a single normative methodology bank that all project sessions read cross-bank via
recallAdditionalBanks. We configuredentity_labels:{ "entity_labels": [ {"key": "memory_type", "type": "value", "tag": true, "values": [ {"value": "rule", "description": "concise operating rule"}, {"value": "procedure", "description": "step-by-step instruction"} ]}, {"key": "tech_stack", "type": "multi-values", "tag": true, "values": [ {"value": "supabase"}, {"value": "lovable"}, ... ]} ] }We wanted auto-recall to:
memory_type:rule(durable axioms) overmemory_type:procedure(runbooks) on planning-style turnstech_stack:<name>Today we either pay classification cost with zero recall benefit, or remove
entity_labelsentirely (our current workaround).Proposal
Add optional config keys to
~/.hindsight/claude-code.jsonthat map to the existingclient.recall()parameters:recallTags: list[str]— tags to pass toclient.recall(tags=...)tagsMatch: "any" | "all" | "any_strict" | "all_strict"(default"any"per best-practices)tagGroups: <tree>— optional nested boolean tree per recall.md §tag_groupsIf those keys are present,
recall.pypasses them through toclient.recall(tags=..., tag_groups=..., tags_match=...). Otherwise behavior unchanged.Per-bank overrides would be especially useful for our topology — something like
recallTagsByBank: { "<bank_id>": [...] }so a normative bank read viarecallAdditionalBankscan be filtered (e.g.memory_type:ruleonly) without affecting the project bank's own recall.Version
Happy to send a PR if this direction is welcome. Thanks for the great plugin.