opencode
opencode copied to clipboard
Skill tool returns `[object Promise]` instead of skill list
Description
When calling the skill tool for a skill that isn't in the session's discovered skills list, the error message shows [object Promise] instead of the actual available skills list.
Error: Skill "session-retrospective" not found. Available skills: [object Promise]
This appears to be an async/await issue where the Promise isn't being resolved before being interpolated into the error string.
Additional context
- Skills created before session start work correctly
- All skill files pass frontmatter validation (name, description present; name matches directory; regex pattern valid)
- Issue #6018 reported the same
[object Promise]error and was closed on Dec 23, 2025 - this may be a regression or incomplete fix - Separately, skills created mid-session aren't discoverable until a new session (which may be expected behavior), but the error message bug makes debugging confusing
Plugins
No response
OpenCode version
1.1.3
Steps to reproduce
- Start an OpenCode session
- Create a new skill mid-session:
mkdir -p ~/.config/opencode/skill/test-skill cat > ~/.config/opencode/skill/test-skill/SKILL.md << 'EOF' --- name: test-skill description: A test skill created mid-session --- ## Test content EOF - Try to load the skill:
skill({ name: "test-skill" }) - Observe error:
Error: Skill "test-skill" not found. Available skills: [object Promise]
Expected behavior
Error message should show the actual list of available skills:
Error: Skill "test-skill" not found. Available skills: github-cli, github-pr-review, senior-pr-review
Screenshot and/or share link
No response
Operating System
macOS (darwin)
Terminal
macOS Terminal