Skip to content

[Bug]: Skills marketplace returns empty against the current extensions manifest layout #4665

Description

@enyst

Bug Description

The skills marketplace loader checks for marketplaces/default.json and returns [] if it is absent before attempting manifest discovery (openhands-agent-server/openhands/agent_server/skills_service.py:706-738).

The current OpenHands/extensions repository uses .plugin/marketplace.json; its marketplaces/ directory contains large-codebase.json and openhands-extensions.json, not default.json. The plugin marketplace loader already handles this correctly by calling Marketplace.load(repo_path) first (plugins_service.py:331-357).

As a result, a cold /skills/marketplace load can be blank while /plugins/marketplace loads the same repository successfully. The skills path also caches empty failures for the full TTL, while the plugin path deliberately does not.

Expected Behavior

Skills and plugins should derive their views from the same successfully fetched and parsed marketplace snapshot, using manifest discovery first and the explicit path only as fallback.

Actual Behavior

An independent, self-contained reproducer is posted in the issue comments. Save
it as /tmp/repro_4665.py, then run:

git clone --depth 1 https://github.com/OpenHands/extensions.git /tmp/openhands-extensions-repro-4665
uv run python /tmp/repro_4665.py

On SDK commit bc5dfc50d, it exercises a fresh real OpenHands/extensions clone at 39fc25a, the actual Git cache, Marketplace loader, skills service, and filesystem; no mocks and prints:

manifest_plugins=64
default_marketplace_exists=False
service_catalog_entries=0

Suggested Implementation

Add one small shared marketplace snapshot loader/cache backed by Marketplace.load. Fetch/parse once, cache only successful snapshots, and let skills/plugins derive their distinct response shapes while computing installation state fresh.

Acceptance Criteria

  • Skills load from the real .plugin/marketplace.json layout when marketplaces/default.json is absent.
  • Custom explicit marketplace paths remain supported as fallback.
  • Skills and plugins within the TTL use the same fetched/parsed snapshot.
  • Transient fetch/parse failures do not cache an empty catalog.
  • Existing plugin-over-skill name precedence, plugin filtering, installed-state freshness, and REST schemas remain unchanged.

Version

Current main at 6d3881035. Repository layout was independently verified through the GitHub API on 2026-08-27; existing issue search found no duplicate.

Activity

  1. added
    bug
    on Aug 27, 2026
  2. github-actions commented on Aug 27, 2026

    @github-actions
    Contributor

    ✅ ready-for-dev label applied

    This issue meets the readiness criteria and is ready for contribution.
    A contributor can now open a PR that links this issue (Fixes #<number>).

    This is an automated check — no AI was used to generate this comment.

  3. added
    plugins
    priority:medium
    on Aug 27, 2026
  4. Epochex commented on Aug 31, 2026

    @Epochex

    I have a tested draft patch in #4785. This issue is currently blocked by the repository''s ready-for-dev gate because the body predates the exact ### Actual Behavior heading requirement.

    Could the author or a maintainer add this section to the issue body?

    Actual Behavior

    On current main, run uv run pytest tests/agent_server/test_marketplace_snapshot.py::test_manifest_discovery_precedes_explicit_path -q (test included in #4785) against a checkout with .plugin/marketplace.json but no marketplaces/default.json. The skills service returns an empty catalog before attempting manifest discovery, while the plugins path can load the same marketplace.

    The existing Acceptance Criteria section already satisfies the other readiness requirement.

  5. enyst commented on Sep 9, 2026

    @enyst
    MemberAuthor

    Independent reproduction

    Verified on SDK commit bc5dfc50d using a fresh real OpenHands/extensions clone at 39fc25a, the actual Git cache, Marketplace loader, skills service, and filesystem; no mocks.
    This confirms the report is a bug rather than a prospective enhancement.

    Save this as /tmp/repro_4665.py:

    import os
    import tempfile
    from pathlib import Path
    
    
    extensions_repo = Path("/tmp/openhands-extensions-repro-4665")
    if not (extensions_repo / ".plugin" / "marketplace.json").exists():
        raise SystemExit("Clone OpenHands/extensions into the expected /tmp path first")
    
    with tempfile.TemporaryDirectory() as persistence_dir:
        os.environ["OH_PERSISTENCE_DIR"] = persistence_dir
    
        from openhands.agent_server import skills_service
        from openhands.sdk.marketplace import Marketplace
    
        manifest = Marketplace.load(extensions_repo)
        skills_service.PUBLIC_SKILLS_REPO = str(extensions_repo)
        skills_service.PUBLIC_SKILLS_REF = "main"
        skills_service._catalog_cache = None
    
        catalog = skills_service.service_get_marketplace_catalog(
            installed_dir=Path(persistence_dir) / "installed"
        )
    
        print(f"manifest_plugins={len(manifest.plugins)}")
        print(
            "default_marketplace_exists="
            f"{(extensions_repo / skills_service.DEFAULT_MARKETPLACE_PATH).exists()}"
        )
        print(f"service_catalog_entries={len(catalog)}")

    Run:

    git clone --depth 1 https://github.com/OpenHands/extensions.git /tmp/openhands-extensions-repro-4665
    uv run python /tmp/repro_4665.py

    Observed:

    manifest_plugins=64
    default_marketplace_exists=False
    service_catalog_entries=0
    
  6. added
    architecture
    on Sep 9, 2026
  7. added
    ready-for-dev
    on Sep 9, 2026
  8. added and removed
    priority:medium
    on Sep 24, 2026
  9. enyst commented on Oct 9, 2026

    @enyst
    MemberAuthor

    I'm an AI agent based on Opus 5.5, helping Engel Nyst (@enyst) with project maintenance.

    This still reproduces on main at 2804c12. The Agent Server feature map in #5621 drives it end to end on a fresh server and keeps it as a known-bug bullet (F25.marketplace-public), so once a fix lands the map reports an unexpected pass:

    control-agent-server map run --file F25 --only F25.marketplace-public --fresh

    What it observes:

    The route returns 200 with {"skills": []}. The server logs Marketplace file not found: <cache>/public-skills/marketplaces/default.json. Calls within the next 300 seconds return the cached empty list without reading the repository again.

    It is listed with the other bugs from the mapping pass in the umbrella issue, #5653.


    Generated by Claude Code

  10. enyst commented on Oct 11, 2026

    @enyst
    MemberAuthor

    Related cache case from #5653: F25.marketplace-stale-cache shows GET /api/skills/marketplace retaining its five-minute cached catalog, including an empty result, after POST /api/skills/sync has brought new entries into the clone.

    The earlier map comment here already mentions the cached empty catalog. The additional case is that sync does not invalidate that catalog, so correcting the manifest layout alone need not make new entries visible immediately. This is related to the empty-marketplace report here, but has a separate cache-invalidation cause.

    Posted by Codex on behalf of @enyst.

  11. enyst commented on Oct 13, 2026

    @enyst
    MemberAuthor

    I'm an AI agent (Claude Code) helping Engel Nyst (@enyst) with project maintenance.

    #5767 proposes a minimal fix for the manifest-layout part: _fetch_catalog_entries now tries Marketplace.load (which finds .plugin/marketplace.json) first and reads marketplaces/default.json only as a fallback, as the plugin catalog already does. Against a fresh clone of OpenHands/extensions, the map bullet F25.marketplace-public goes from xfail x2 on main to xpass x2 on the branch (73 catalog entries), and the PR drops its known-bug marker.

    On the acceptance criteria:

    • Skills load from .plugin/marketplace.json without default.json: done in the PR, with a unit test.
    • Custom explicit marketplace paths stay supported as fallback: done, with a unit test.
    • Existing precedence, filtering, installed-state freshness and REST schemas: unchanged.
    • Shared skills/plugins snapshot and not caching empty failures: not in this PR.

    A maintainer needs to decide the scope. I implemented the smaller loader-order fix because it fixes the empty Marketplace tab with no new shared state. The empty-result caching (and sync not clearing the catalog) is the separate F25.marketplace-stale-cache case noted above and will get its own fix. The alternative is the shared, success-only snapshot this issue suggests, which would also cover the two remaining criteria but touches both services. #4785 (another contributor) is linked here; I did not read it, to keep the fix independent, so a maintainer should choose between the two approaches or take this one and keep the shared snapshot as a follow-up.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    architecturebugpluginsready-for-devskills

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions