Repository navigation
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
The skill tool collapsed every load failure into the same opaque message, so a model invoking it with a subagent's name got "Unable to load skill" and wandered into a manual debugging loop. When the id resolves in the agent registry, fail with a hint that it is an agent and should be prompted as a subagent; unknown-skill and permission failures stay distinct.
f0f2858 to
3131e26
Compare
|
Gentle bump — open since the 9th with green checks and no review yet. It's the small one for the skill tool: naming an agent that isn't there currently surfaces an opaque error instead of saying what's wrong. Happy to rework it if this isn't the shape you'd want. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Fixes #46568
Type of change
What does this PR do?
When a model invokes the
skilltool with a subagent's name, the tool failed with the same opaque "Unable to load skill" message as an unknown skill, sending the conversation into a manual debugging loop. Now the tool resolves the id against the agent registry on a miss: if it matches an agent, the failure says so and points the model at prompting the subagent instead. Unknown-skill and permission failures stay distinct (permission rejections keep their existingpermission.rejectedclassification from the tool boundary).How did you verify your code works?
test/tool-skill.test.ts: invoking the skill tool with an agent id now fails with the agent hint, while the unknown-skill and permission-denied cases keep their existing behaviorbun typecheckinpackages/coreandpackages/aibun testinpackages/core(no new failures; 3 pre-existing environment-dependent failures in git-worktree/pty tests reproduce on a clean baseline)Checklist
Supersedes #46940 — the PR head fork was accidentally deleted on 2026-09-09 (not intentional, see the notification comment there); re-filing so the review can continue. Original conversation: #46940