feat: memory_drill_down tool and tiered recall depth config#322
Merged
win4r merged 2 commits intoCortexReach:masterfrom Mar 23, 2026
Merged
feat: memory_drill_down tool and tiered recall depth config#322win4r merged 2 commits intoCortexReach:masterfrom
win4r merged 2 commits intoCortexReach:masterfrom
Conversation
…lt config Enables L0/L1/L2 lazy loading for auto-recall: - L0 (abstract): one-line summary, ~100 tokens - L1 (overview): structured summary, ~500 tokens - L2 (full): complete text (existing behavior) Storage layer already has L0/L1/L2 in metadata (smart-metadata.ts). This PR adds the READ side: 1. New `memory_drill_down` tool: agent calls this to get L1 overview or L2 full content for a specific memory after seeing compact summaries 2. New `recallDepthDefault` config: "l0" | "l1" | "full" (default: "full" for backward compat). When set to "l0", auto-recall uses L0 abstracts from metadata, saving significant context budget 3. 11 tests (parsing, level selection, config, format constraints) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. [High] Add scope check to memory_drill_down — agent must have access to the memory's scope before reading deeper content 2. [High] Fix L2 content: use metadata.l2_content (true full text), not entry.text (which stores L0 abstract for smart-extracted memories) 3. [Medium] Wire recallDepthDefault into auto-recall — now controls whether L0/L1/full text is injected (was dead config before) 4. [Medium] Include short memory ID in auto-recall prefix format (e.g. [preference:global|a1b2c3d4]) so agent can call memory_drill_down Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enables L0/L1/L2 lazy loading — auto-recall injects compact summaries, agent drills down on demand.
memory_drill_down(id, level)— get L1 overview or L2 full contentrecallDepthDefault: "l0" | "l1" | "full"(default: "full" for backward compat)Token savings
With
recallDepthDefault: "l0", auto-recall injects ~100 tokens per memory instead of ~500+. Agent callsmemory_drill_downonly when it needs details.Test plan
🤖 Generated with Claude Code