langchain-ai/deepagents · error · RuntimeError

skills.extra_allowed_dirs is missing from the configuration

Error message

skills.extra_allowed_dirs is missing from the configuration manifest

What it means

`discover_skills_and_roots` fetches the `skills.extra_allowed_dirs` option through the configuration manifest via `get_option`. If the option is absent (manifest does not declare it), the function raises `RuntimeError` with this message rather than proceeding with a `None` sentinel. This is an internal invariant check: a build/deploy where the config manifest is out of sync with the code that expects the option.

Source

Thrown at libs/code/deepagents_code/skills/invocation.py:101

    )
    roots = [
        path.resolve()
        for path in (
            get_built_in_skills_dir(),
            *plugin_skill_roots,
            get_user_skills_dir(assistant_id),
            get_project_skills_dir(credentials.project_root),
            get_user_agent_skills_dir(),
            get_project_agent_skills_dir(credentials.project_root),
            get_user_claude_skills_dir(),
            get_project_claude_skills_dir(credentials.project_root),
        )
        if path is not None
    ]
    option = get_option("skills.extra_allowed_dirs")
    if option is None:
        msg = "skills.extra_allowed_dirs is missing from the configuration manifest"
        raise RuntimeError(msg)
    with _use_extra_skills_path_base(path_base or Path.cwd()):
        resolved = get_config_resolver().get(option)
    _emit_ranked_diagnostics(option, resolved)
    extra_skills_dirs = cast("list[Path] | None", resolved.value)
    roots.extend(path.resolve() for path in extra_skills_dirs or ())
    # Persisted in-the-moment approvals extend the containment allowlist just
    # like the declarative `extra_allowed_dirs`, but are managed by the trust
    # store rather than hand-edited config. These entries are already the
    # canonical approved directories and are verified against post-approval
    # symlink swaps by `load_trusted_skill_dirs`, so they are added as-is
    # rather than re-resolved (re-resolving would follow an injected symlink to
    # a directory the user never approved).
    roots.extend(load_trusted_skill_dirs())
    return skills, roots


def build_skill_invocation_envelope(
    skill: ExtendedSkillMetadata,

View on GitHub (pinned to a1af029e6e)

Solutions

  1. Ensure the installed deepagents-code package and its config manifest are a consistent, current version (reinstall/upgrade the package)
  2. Check for custom overrides or stubs of the configuration manifest in your environment or test fixtures
  3. Report the mismatch if a supported release lacks the option; it indicates an internal packaging bug

Example fix

# before (stale install)
# RuntimeError: skills.extra_allowed_dirs is missing from the configuration manifest
// after
uv pip install --upgrade deepagents-code  # consistent package + manifest
Defensive patterns

Strategy: try-catch

Try / catch

try:
    roots = discover_skills_and_roots(...)
except RuntimeError as exc:
    if 'missing from the configuration manifest' in str(exc):
        reinstall_or_upgrade_package()  # fix manifest/code version mismatch
    raise

Prevention

When it happens

Trigger: Calling `discover_skills_and_roots` (directly or via `discover_all_skills`/`_discover_skills_and_roots`) in an environment where the configuration manifest does not register the `skills.extra_allowed_dirs` option — e.g. mismatched package versions or a stripped/custom manifest.

Common situations: Pinning `deepagents-code` against an older config manifest or custom build; monkeypatched or partial config initialization in tests; mixing versions of the SDK and the code agent package.

Related errors


AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29). Data as JSON: /api/errors/232c7862d6f5ca7b. Report an issue: GitHub.