mastra-ai/mastra · error · HTTPException
Mount "${requestedMount}" not found. Available mounts: ${fil
Error message
Mount "${requestedMount}" not found. Available mounts: ${filesystem.mountPaths.join(', ')} What it means
Thrown by buildSkillInstallPath when installing a skill from skills.sh into a composite workspace filesystem and the requested mount path does not exist in the CompositeFilesystem's mounts map. The server rejects the request with HTTP 400 and lists the mounts that actually exist so the caller can correct the path. It prevents silently installing a skill to a path derived from a nonexistent mount.
Source
Thrown at packages/server/src/server/handlers/workspace.ts:210
/**
* Build the install path for a skill from skills.sh.
*
* For CompositeFilesystem: resolves the requested mount (or first writable),
* validates it is writable, and returns `<mount>/.agents/skills/<skillId>`.
* For non-composite: returns `.agents/skills/<skillId>` (unchanged behavior).
*/
/** Strip a single trailing slash (leaves `/` alone). */
function stripTrailingSlash(p: string): string {
return p.length > 1 && p.endsWith('/') ? p.slice(0, -1) : p;
}
function buildSkillInstallPath(filesystem: WorkspaceFilesystem, safeSkillId: string, requestedMount?: string): string {
if (isCompositeFilesystem(filesystem)) {
if (requestedMount) {
// Validate the requested mount exists
const mountFs = filesystem.mounts.get(requestedMount);
if (!mountFs) {
throw new HTTPException(400, {
message: `Mount "${requestedMount}" not found. Available mounts: ${filesystem.mountPaths.join(', ')}`,
});
}
if (mountFs.readOnly) {
throw new HTTPException(403, { message: `Mount "${requestedMount}" is read-only` });
}
return `${stripTrailingSlash(requestedMount)}/${SKILLS_SH_DIR}/${safeSkillId}`;
}
// Default: use first writable mount
for (const [mountPath, mountFs] of filesystem.mounts) {
if (!mountFs.readOnly) {
return `${stripTrailingSlash(mountPath)}/${SKILLS_SH_DIR}/${safeSkillId}`;
}
}
throw new HTTPException(403, { message: 'No writable mount available for skill installation' });
}View on GitHub (pinned to 75dd419e61)
Solutions
- Read the 'Available mounts' list in the error message and retry with one of those exact mount paths.
- Check the CompositeFilesystem configuration in your Mastra workspace setup to confirm the mount keys (filesystem.mountPaths).
- If the mount was removed intentionally, drop the mount parameter and let the server pick the first writable mount.
- If mounts are supplied dynamically, fix the client config/env that passes the wrong mount name.
Example fix
// before
await installSkill({ workspaceId: 'w1', skillId: 'code-review', mount: '/workspace/data' });
// after (mount that actually exists in CompositeFilesystem)
await installSkill({ workspaceId: 'w1', skillId: 'code-review', mount: '/workspace' }); Defensive patterns
Strategy: validation
Validate before calling
const mounts = await getWorkspaceMountPaths(workspaceId); // e.g. from workspace filesystem.mountPaths
if (mount && !mounts.includes(mount)) {
throw new Error(`Unknown mount "${mount}". Available: ${mounts.join(', ')}`);
} Type guard
function isValidMount(mount: string, mountPaths: readonly string[]): boolean {
return mountPaths.includes(mount);
} Try / catch
try {
await installSkill({ workspaceId, skillId, mount });
} catch (e) {
if (isHttpException(e, 400) && /Mount .* not found/.test(e.message)) {
const available = e.message.match(/Available mounts: (.*)$/)?.[1]?.split(', ') ?? [];
return installSkill({ workspaceId, skillId, mount: available[0] });
}
throw e;
} Prevention
- Fetch the workspace's mount list dynamically instead of hardcoding mount names.
- Keep a single shared constant of mount paths between workspace config and clients.
- Log available mounts on failure before retrying.
When it happens
Trigger: Calling the skill install/skill path endpoints (installPath, skillPath handlers) with a mount query/body parameter that is not a registered mount key of the workspace's CompositeFilesystem — e.g. a typo'd mount name, a mount from a different workspace, or a mount removed after configuration changed.
Common situations: Hardcoded mount names in automation scripts, renamed workspace mounts without updating the client, using an absolute OS path instead of the mount path registered in CompositeFilesystem, or hitting a workspace whose mounts differ from the one documented.
Related errors
- No writable mount available for skill installation
- No mount for path: ${path}
- Mount "${requestedMount}" is read-only
- CompositeFilesystem requires at least one mount
- Nested mount paths are not supported: "${b}" is nested under
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/43948b1f9d6144cc.
Report an issue: GitHub.