can1357/oh-my-pi · error
Hindsight memories are not addressable via memory://. Recall
Error message
Hindsight memories are not addressable via memory://. Recall results are final — use `recall` to search or `reflect` to synthesize. `read memory://<id>` is only available with memory.backend=mnemopi.
What it means
When the memory backend is Hindsight (or a Hindsight session state exists with no mnemopi state), memory ids found by recall are stored server-side and are deliberately not addressable via memory://. This corrective error exists (issue #7587) so an agent that reflexively issues `read memory://<id>` gets a one-turn self-correcting pointer to `recall`/`reflect` instead of a generic namespace error.
Source
Thrown at packages/coding-agent/src/internal-urls/memory-protocol.ts:322
// mnemopi memory id lookup. This is the read counterpart to
// `memory_edit update` and lets agents inspect the full content of a
// clipped recall preview before overwriting it (issue #4443).
if (namespace !== MEMORY_NAMESPACE) {
const mnemopiStates = mnemopiSessionStatesFromRegistry();
const hindsightActive =
backend === "hindsight" ||
(mnemopiStates.length === 0 &&
AgentRegistry.global()
.list()
.some(ref => ref.session?.getHindsightSessionState?.()));
if (hindsightActive) {
// Hindsight keeps memories server-side and exposes no
// `memory://<id>` addressing, yet the shared `recall` tool
// description still steers a follow-up `read memory://<id>`.
// Return a corrective pointer so that stray read self-corrects in
// one turn instead of derailing on the generic namespace error
// (issue #7587).
throw new Error(
"Hindsight memories are not addressable via memory://. Recall results are final — use `recall` to search or `reflect` to synthesize. `read memory://<id>` is only available with memory.backend=mnemopi.",
);
}
if (mnemopiStates.length === 0) {
throw new Error(
`Unknown memory namespace: ${namespace}. Supported: ${MEMORY_NAMESPACE} (file-backed memory summary), or a mnemopi memory id when memory.backend=mnemopi is active.`,
);
}
const hit = tryResolveMnemopiMemory(namespace);
if (hit) return renderMnemopiMemory(url, hit);
throw new Error(
`Mnemopi memory ${namespace} not found in any scoped bank. Use \`recall\` to list available ids.`,
);
}
const roots = memoryRootsForContext(context);
if (roots.length === 0) {
throw new Error(View on GitHub (pinned to 9690622007)
Solutions
- Use the `recall` tool to search memories and `reflect` to synthesize — recall results are final under Hindsight.
- Do not issue `read memory://<id>` when the backend is hindsight; update agent prompts/tool guidance accordingly.
- If per-id reads are required, switch memory.backend to mnemopi.
Example fix
// before
read(`memory://${recallResult.id}`) // hindsight backend
// after
recall({ query: "<topic>" }) // use recall output directly Defensive patterns
Strategy: try-catch
Validate before calling
if (settings.get("memory.backend") === "hindsight") {
// never construct memory://<id> reads; use recall/reflect instead
} Try / catch
try {
return await handler.resolve(url, ctx);
} catch (err) {
if (err instanceof Error && err.message.startsWith("Hindsight memories are not addressable")) {
return recall({ query: topic }); // self-correct to recall
}
throw err;
} Prevention
- Under hindsight, treat recall results as final — no per-id reads.
- Update shared tool descriptions/prompts when switching backends to hindsight.
- Use reflect for synthesis instead of reading raw memory rows.
When it happens
Trigger: Resolving memory://<something-not-root> while memory.backend=hindsight or a Hindsight session state is present and no mnemopi session state is registered — the host is treated as a memory id, which Hindsight does not support.
Common situations: Switching memory.backend from mnemopi to hindsight but agents still follow recall previews that suggest reading memory://<id>; shared tool descriptions that assume mnemopi semantics.
Related errors
- memory:// URL requires a namespace: memory://root
- Unknown memory namespace: ${namespace}. Supported: ${MEMORY_
- Invalid URL encoding in memory:// path: ${url.href}
- memory:// URL must resolve to a file or directory: ${url.hre
- Unknown protocol: memory://
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/c793aa3c0764c615.
Report an issue: GitHub.