Skill tool can be re-invoked after being loaded in same session #8015

Open
opened 2026-02-16 18:08:55 -05:00 by yindo · 1 comment
Owner

Originally created by @HyunggyuJang on GitHub (Jan 30, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

The skill tool can be invoked multiple times in the same session even after the skill has already been loaded. This causes redundant tool calls and extra context usage.

Steps to reproduce

  1. Start a session.
  2. Trigger a skill load via /skill NAME or via automatic tool invocation.
  3. Continue the same session without compaction.
  4. Observe the model invoking the same skill tool again for the same task.

Expected

Once a skill is loaded in the session, the model should not re-invoke it unless explicitly requested, or the system should provide a loaded-skill signal to avoid duplicate calls.

Actual

Model re-invokes the same skill tool in the same session, producing duplicate tool output.

Notes

Skill execution always parses the skill file without checking for an already-loaded state (packages/opencode/src/tool/skill.ts), and skill state only caches metadata, not content (packages/opencode/src/skill/skill.ts).

Originally created by @HyunggyuJang on GitHub (Jan 30, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description The skill tool can be invoked multiple times in the same session even after the skill has already been loaded. This causes redundant tool calls and extra context usage. ### Steps to reproduce 1. Start a session. 2. Trigger a skill load via `/skill NAME` or via automatic tool invocation. 3. Continue the same session without compaction. 4. Observe the model invoking the same skill tool again for the same task. ### Expected Once a skill is loaded in the session, the model should not re-invoke it unless explicitly requested, or the system should provide a loaded-skill signal to avoid duplicate calls. ### Actual Model re-invokes the same skill tool in the same session, producing duplicate tool output. ### Notes Skill execution always parses the skill file without checking for an already-loaded state (`packages/opencode/src/tool/skill.ts`), and skill state only caches metadata, not content (`packages/opencode/src/skill/skill.ts`).
Author
Owner

@github-actions[bot] commented on GitHub (Jan 30, 2026):

This issue might be related to broader tool optimization concerns. Please check:

  • #10761: [Discussion] Agent Performance Optimization, Improvements & Pain Points for opencode - discusses performance optimization strategies that may address redundant tool calls

While not a direct duplicate, this issue aligns with the performance optimization discussion in #10761.

@github-actions[bot] commented on GitHub (Jan 30, 2026): This issue might be related to broader tool optimization concerns. Please check: - #10761: [Discussion] Agent Performance Optimization, Improvements & Pain Points for opencode - discusses performance optimization strategies that may address redundant tool calls While not a direct duplicate, this issue aligns with the performance optimization discussion in #10761.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8015