Skip to content

fix(opencode): strip unused location from skill system prompt - #39360

Open
aakankshaduggal wants to merge 1 commit into
anomalyco:devfrom
aakankshaduggal:skill-prompt-location
Open

fix(opencode): strip unused location from skill system prompt#39360
aakankshaduggal wants to merge 1 commit into
anomalyco:devfrom
aakankshaduggal:skill-prompt-location

Conversation

@aakankshaduggal

@aakankshaduggal aakankshaduggal commented Jul 28, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #39294

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Removes the <location> tag from the verbose skill system prompt. The location is never consumed by the model—skills are invoked by name, not by filesystem path—so emitting it wastes ~3K tokens/turn when many skills are loaded.

Also removes the now-unused escapeHtml import and updates the existing test to assert that <location> is no longer present.

How did you verify your code works?

  • Confirmed bun typecheck in packages/opencode passes (pre-existing MCP module errors only, unrelated)
  • Updated the "verbose format omits location tags" test to assert <location> is absent and name/description tags remain

Screenshots / recordings

N/A — no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The <location> tag in the verbose skill listing adds ~3K tokens/turn
but is never consumed by the model—skills are invoked by name, not
path.

Closes anomalyco#39294

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jul 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Remove or truncate <location> path in system prompt available_skills — wastes ~3.3K tokens/turn

1 participant