memory_recall
Search Forge's stored patterns to find previously learned conventions, failure modes, and successful approaches for project guidance and debugging.
Instructions
Search forge's learned-pattern memory for entries relevant to a query. Memory is a simple JSONL store (not a vector index) — forge keeps it deliberately primitive so the format is human-readable, git-friendly, and cheap to grep. Each entry has a category (convention, failure_pattern, success_pattern, test_command, architecture, dependency, tool_usage), a free-text pattern, a confidence in [0,1], and a timestamp. Results are keyword-matched against pattern text, category name, and any included tags.
Behaviour:
READ-ONLY, idempotent. No telemetry side effects, no access counters bumped, no state mutated.
No authentication, no network, no rate limits.
Reads
.forge/memory/project.jsonland/or.forge/memory/global.jsonldepending onscope.Returns an informative empty result if the query has no matches — never throws.
Use when:
The planner agent is about to decompose an objective and wants to check whether forge has already learned conventions for this project (test commands, style rules, known failure modes).
The debugger agent is analysing a failure and wants to check whether the same pattern has been seen and resolved before.
A worker agent is deciding between two approaches and wants to bias towards one that previously worked.
Do NOT use for:
Saving new patterns — use
memory_save.Looking up per-module retry history — use
iteration_state.Querying structured run events — use
forge_logs.Full-text search across commit history or codebase — this is learned patterns only, not source code.
Returns: A text block listing matching entries, each showing category, pattern, confidence, and timestamp. Grouped by scope (project first, then global) and sorted by confidence descending within each group.
Example: memory_recall({ query: "test command", scope: "project" }) → "Found 2 matches in project memory: [test_command] 0.9 — pnpm vitest --run (watch mode hangs in CI) [test_command] 0.8 — avoid npm test, use pnpm test instead"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Keywords to search for (e.g. 'test conventions', 'auth patterns', 'python') | |
| scope | No | Which memory store to search (default: all) |