Skip to content

Empty model responses after load_skill with Gemini (skill system instruction) #6225

Description

@lwangverizon

Empty model responses after load_skill with Gemini (skill system instruction)

Summary

When an agent uses the skill tools (SkillToolset), ADK appends a skill system
instruction
to the prompt. With Gemini models we observed a significant rate of
empty model responses immediately after a load_skill tool call: the model
loads the skill, then ends its turn with no visible output to the user.

We observed this as a spike in empty responses in a Verizon production environment
running ADK + Gemini. The empty turns were most frequent for tool-heavy skills,
where the correct next action after loading is to call more tools rather than to
reply.

Affected component

src/google/adk/tools/skill_toolset.py_build_skill_system_instruction(),
which produces DEFAULT_SKILL_SYSTEM_INSTRUCTION.

Root cause

The skill system instruction never states what the model should do after a
load_skill call returns. There is no rule telling the model that load_skill is a
non-terminal step, so some models (notably Gemini) treat the load_skill tool call
as the entire turn — they load the skill and stop, emitting no content.

(The existing rule 2 says to follow loaded instructions "before replying to the
user", which reinforces this reading, but the core gap is the missing
"continue after load" guidance.)

Impact

  • User-visible empty responses (the model appears to "do nothing").
  • For deployments with an empty-response retry backstop, each occurrence costs an
    extra LLM pass.

Proposed fix

Add a rule 7 to the skill system instruction that explicitly states load_skill
only retrieves instructions and does not complete the turn — the model should
continue in the same turn (calling whatever tools the skill's steps require) and
never end with an empty response right after loading a skill. Rules 1–6 are left
unchanged.

We deployed exactly this guidance (appended rule 7, rules 1–6 untouched) in
production and saw the empty-response rate for Gemini after skill loading drop
substantially.

A PR implementing this is attached.

Environment

  • ADK: current main
  • Model: Gemini (observed with Gemini 3.5 Flash)

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions