can1357/oh-my-pi · error · ToolError
Cannot find internal URL without a backing file: ${memoryGlo
Error message
Cannot find internal URL without a backing file: ${memoryGlob.baseUrl} What it means
A memory:// glob needs a real backing directory on disk to translate the glob into a filesystem pattern. When InternalUrlRouter.resolve returns a resource with no sourcePath (the URL has no backing file/directory), the tool cannot proceed and throws.
Source
Thrown at packages/coding-agent/src/tools/glob.ts:233
`find cannot operate on a remote ssh:// path: ${rawPattern}. ssh:// has no local file to glob; use \`read ${rawPattern}\` to list or inspect the remote path.`,
);
}
if (hasGlobPathChars(rawPattern)) {
if (!/^memory:\/\//i.test(rawPattern)) {
throw new ToolError(`Glob patterns are not supported for internal URLs: ${rawPattern}`);
}
const memoryGlob = splitMemoryGlobPattern(rawPattern);
const resource = await internalRouter.resolve(memoryGlob.baseUrl, {
cwd: this.session.cwd,
settings: this.session.settings,
signal,
sessionFile: this.session.getSessionFile() ?? undefined,
localProtocolOptions: this.session.localProtocolOptions,
skills: this.session.skills,
pathOnly: true,
});
if (!resource.sourcePath) {
throw new ToolError(`Cannot find internal URL without a backing file: ${memoryGlob.baseUrl}`);
}
normalizedPatterns.push(
path.join(resource.sourcePath.replace(/[*?[{]/g, "[$&]"), memoryGlob.globPattern),
);
continue;
}
const resource = await internalRouter.resolve(rawPattern, {
cwd: this.session.cwd,
settings: this.session.settings,
signal,
sessionFile: this.session.getSessionFile() ?? undefined,
localProtocolOptions: this.session.localProtocolOptions,
skills: this.session.skills,
pathOnly: true,
});
if (!resource.sourcePath) {
throw new ToolError(`Cannot find internal URL without a backing file: ${rawPattern}`);
}View on GitHub (pinned to 9690622007)
Solutions
- Verify the memory base URL exists and is file-backed before globbing it
- Correct the base path spelling in the memory:// URL
- Create/initialize the memory resource first, or glob the underlying directory directly
Example fix
// before
await findTool({ path: "memory://notes/*.md" }); // notes not file-backed
// after
await findTool({ path: "memory://project/notes/*.md" }); // existing base Defensive patterns
Strategy: validation
Validate before calling
const resource = await internalRouter.resolve(base, { cwd, settings, signal, pathOnly: true });
if (!resource.sourcePath) throw new Error(`memory base not file-backed: ${base}`); Type guard
const isFileBacked = (r: { sourcePath?: string | null }): r is { sourcePath: string } =>
typeof r.sourcePath === "string" && r.sourcePath.length > 0; Try / catch
try {
await globTool({ path: memoryUrl });
} catch (err) {
if (err instanceof ToolError && /without a backing file/.test(err.message)) {
// create/initialize the memory resource or glob the local dir directly
} else throw err;
} Prevention
- Resolve the memory base with pathOnly first and check sourcePath before globbing
- Keep memory resource names consistent; validate base spelling
- Ensure the session has memory storage initialized
When it happens
Trigger: Calling find with 'memory://something/*.md' where resolve('memory://something', { pathOnly: true }) yields a resource lacking sourcePath — e.g. the memory base doesn't exist or isn't file-backed in this session.
Common situations: Typo in the memory base path; session without memory storage initialized; referencing a memory resource that was never created.
Related errors
- memory:// URL does not contain a glob pattern: ${input}
- err.to_string() (invalid glob pattern)
- err.to_string() (invalid exclude glob pattern)
- InvalidArg
- Managed skill "${name}" does not exist. Use action "create"
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/2813e83c0378f4a6.
Report an issue: GitHub.