Skip to content

SkillToolset exposes run_skill_script tool causing hallucination loop when skill has no scripts/ directory #6281

Description

@deepakbatham572

When a skill loaded by [SkillToolset] has no scripts/ directory, run_skill_script is still exposed as a callable tool. When confirmtool (or any expected next-step tool) is unavailable, adk hallucinates a reason to call run_skill_script repeatedly, entering a new infinite loop.

To reproduce:

Same setup as Issue 1. After load_skill_resource successfully loads all 4 reference files, the LLM attempts confirmtool, fails to find it, then calls run_skill_script in a loop with fabricated arguments.

Expected behavior:

run_skill_script should only be included in the tool list if the activated skill actually has a scripts/ directory with at least one file.

Actual behavior:
[ADK_EVENT] content=[FunctionCall: load_skill_resource] (×4) ← success
[ADK_EVENT] content=[FunctionCall: run_skill_script] ← hallucinated
[ADK_EVENT] content=[FunctionCall: run_skill_script] ← loop
[ADK_EVENT] content=[FunctionCall: run_skill_script]
... repeats indefinitely

Metadata

Metadata

Assignees

No one assigned

    Labels

    tools[Component] This issue is related to tools

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions