Significant-Gravitas/AutoGPT · error · HTTPException

Failed to load default skill body

Error message

Failed to load default skill body

What it means

Skill-detail endpoint returns 500 when reading a built-in default skill's body from disk (`get_default_skill_with_body(slug)`) raises OSError — the packaged SKILL.md asset for that default skill is missing, unreadable, or the filesystem denies access. The handler deliberately hides the on-disk path from clients and logs the full traceback server-side ('[skills] failed to load default skill body').

Source

Thrown at autogpt_platform/backend/backend/api/features/v1.py:2731

    dependencies=[Security(requires_user)],
)
async def read_copilot_skill(
    user_id: Annotated[str, Security(get_user_id)],
    name: str = Path(..., description="Slug of the skill to read"),
) -> CopilotSkillDetail:
    """Return full SKILL.md content (name, description, triggers, body)
    for the library UI's expand-to-view dialog.

    Built-in default skills are returned with ``is_default=True`` so the
    UI can hide destructive affordances; missing user skills return 404.
    """
    slug = name.strip().lower()
    try:
        default = get_default_skill_with_body(slug)
    except OSError:
        # Don't leak the on-disk path; operators trace via server logs.
        logger.exception("[skills] failed to load default skill body for %s", slug)
        raise HTTPException(
            status_code=500,
            detail="Failed to load default skill body",
        )
    if default is not None:
        return CopilotSkillDetail(
            name=default.name,
            description=default.description,
            triggers=list(default.triggers),
            body=default.body,
            is_default=True,
        )

    parsed = await read_user_skill_with_body(user_id, slug)
    if parsed is None:
        raise HTTPException(
            status_code=HTTP_404_NOT_FOUND, detail=f"Skill '{slug}' not found"
        )
    sibling_files = await list_user_skill_sibling_paths(user_id, slug)

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Check server logs for the logged OSError — it names the actual path and I/O problem.
  2. Restore the default skill files (reinstall/redeploy the backend package or re-copy the defaults directory) and verify file permissions for the server process user.
  3. If a default skill is intentionally removed, also remove its registration so get_default_skill_with_body doesn't resolve it.
Defensive patterns

Strategy: retry

Try / catch

try {
  return await api.getSkillDetail(slug);
} catch (e) {
  if (e.status === 500) {
    // server-side asset problem — one retry after a short delay, then surface
    await sleep(1000);
    return api.getSkillDetail(slug);
  }
  throw e;
}

Prevention

When it happens

Trigger: GET /skills/{name} for a slug that resolves to a built-in default skill whose file was deleted, not shipped in the deployment image, or has broken permissions on the server.

Common situations: Deployment images built without copying the default-skills assets; partial installs/upgrades; volumes mounted read-only or with wrong ownership; local edits deleting a packaged skill file.

Related errors


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/8373d72064137aa5. Report an issue: GitHub.