Skip to content

Preserve load_skill as a direct tool in Code Mode #13415

In review

Description

@jamadeo

Describe the bug

With Code Mode (code_execution) enabled, load_skill is not advertised as a direct tool and a direct call is rejected. Skills remain accessible through list_functions and execute_javascript, but models must discover that indirect path; the reporter observed that smaller models often fail to do so.

To Reproduce

  1. Create a skill in .agents/skills/.
  2. Start a session with skills, developer, and code_execution enabled, for example: goose run --no-profile --with-builtin skills,developer,code_execution.
  3. Inspect the tools advertised to the model or attempt a direct load_skill call. It is absent, and a direct call is rejected with Tool 'load_skill' is not available.
  4. Compare with the same session without code_execution, where load_skill is advertised directly.

Expected behavior

load_skill remains advertised and callable as a direct tool in Code Mode, while the existing JavaScript path continues to work.

Screenshots

Not applicable.

Please provide the following information

  • OS & Arch: Not specified for the latest reproduction
  • Interface: CLI; the original report was on Desktop
  • Version: Current main at the time of the linked investigation
  • Extensions enabled: skills, developer, code_execution
  • Provider & Model: Discovery failures reported with IBM Granite 4B and Qwen 3.5 4B

Additional context

The investigation in #12696 identifies the Code Mode filtering path and includes a reproduction and a test of the JavaScript workaround. This is related to #12996, which concerned recipe__final_output under Code Mode.

Verification should cover direct advertisement and successful invocation with Code Mode enabled, continued direct availability without Code Mode, and the existing JavaScript path. The existing unadvertised_load_skill_is_neither_approved_nor_loaded test will need to reflect the intended behavior without weakening the rule that unadvertised tools cannot execute.

Do not begin implementation until the issue reaches Ready on the Goose Issues board.

Activity

  1. added theissue type on Nov 10, 2026
  2. salim-b commented on Nov 12, 2026

    @salim-b

    Related to #13430 (its approach A would fix this issue).

    What further exacerbates the issue:

    1. The skills section in the default system prompt says "Load one when it can help…" but never names load_skill, so the model can't disambiguate it from load.
    2. When load fails, its error message ("Use load() to see available sources") and its listing output (recipes only) push the model back onto the wrong path instead of pointing to load_skill.
  3. moved this from Inbox to Accepted / design in Goose Issueson Nov 18, 2026
  4. yajo commented on Dec 2, 2026

    @yajo

    I'm an AI agent (Goose + Claude Sonnet 5.5) working on behalf of @yajo. He asked me to post this account of a reproduction I went through, written from the LLM's point of view.

    +1, and a data point that this is not only a small-model problem: I hit it with Claude Sonnet 5.5 (Goose, Code Mode on, skills builtin).

    • I called load(source: "<skill>") (summon), got Source '<skill>' not found, then load() returned No sources available for load/delegate. So with no recipes the listing is completely empty, with no hint that skills exist elsewhere.
    • The failure was silent: I proceeded without the skill and produced output that violated it (a commit trailer in a made-up format), instead of stopping or reporting that I could not load it.
    • When the user asked "don't you have a load_skill?", I answered that no such tool existed, because I had not checked list_functions. Skills.loadSkill was available the whole time inside execute_typescript.

    This supports advertising load_skill directly in Code Mode, as proposed here and in #13430.

    Assisted-by: Goose + Claude Sonnet 5.5

  5. salim-b commented on Dec 2, 2026

    @salim-b

    The behavior reported here was fixed by #13574 and shipped in v1.60.0 (2026-11-17). It will close on merge of #13995 — this comment just records the resolution state.

    What happened (from tracing the code and history):
    • Root cause: skills were implemented twice — the Skills platform extension (SkillsClient) and SkillOperation in the agent loop. The loop hid the extension's load_skill and special-cased the operation's copy, and since Code Mode filters tools by extension ownership, the operation's ownerless load_skill was dropped from the advertised set. The only remaining path was the extension's copy via list_functions → tools.call(...) inside the JS runtime, which models frequently failed to discover. Same bug class as Subagent can never terminate under Code Mode: recipe__final_output is neither a tool nor an execute_typescript callback (regression in 1.54.0) #12996 (recipe__final_output under Code Mode).
    • Fix (feat(oi-kit): add SkillOperation and drop the Skills extension #13574 — closing oi-kit: Add SkillOperation #13481, which resolves Skills: remove the duplicate load_skill implementation #13430): the Skills extension and its special cases were removed, SkillOperation became the single implementation, and the Code Mode filter (prepare_inference_tools in crates/goose/src/agents/reply_parts.rs) now explicitly retains ownerless load_skill alongside recipe__final_output. So load_skill is advertised and callable directly with Code Mode enabled — exactly what this issue asked for.
    • Verification per this issue's criteria: unadvertised_load_skill_is_not_confirmed_or_loaded was replaced by load_skill_stays_a_direct_tool_in_code_mode (asserts advertisement plus a successful direct call with code_execution enabled). Without Code Mode it stays direct too, since skills can no longer be disabled via the removed extension. The dedicated Skills.loadSkill JS binding is gone, but load_skill still appears in the Code Mode catalog, so the tools.call path keeps working as well.

    Status of the two aggravating factors I listed above:

    1. Skills prompt section doesn't name load_skill — still present on main: the skills section says "Load one when it can help…" and never names the tool. Mitigated in practice, since load_skill is now advertised on every request with a description pointing to the skill list in the system instructions — but the load vs. load_skill confusability in the prompt text itself remains.
    2. load() pushes models down the wrong path — unchanged on main: discovery still lists only subrecipes/recipes/agents, and the not-found error still says "Use load() to see available sources." (crates/goose/src/agents/platform_extensions/summon.rs). Skills are not mentioned there.

    If maintainers are open to altering those prompts/messages, I'm happy to submit small PRs for (1) and (2) — e.g. naming load_skill in the skills prompt section, and having load()'s listing and error point to load_skill for skills.


    @yajo — thanks for the data point; it confirms this was never only a small-model problem. That reproduction almost certainly ran goose ≤ v1.59.x, though: it saw Skills.loadSkill inside the JS runtime and used the skills builtin, both of which #13574 removed. On v1.60.0 or later (latest is v1.61.1), load_skill should be advertised directly even with Code Mode on — please report if that doesn't hold for you after updating!

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions