Skill tool returns [object Promise] instead of skill list #4300

Open
opened 2026-02-16 17:43:20 -05:00 by yindo · 1 comment
Owner

Originally created by @BearHuddleston on GitHub (Jan 6, 2026).

Originally assigned to: @rekram1-node on GitHub.

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

  1. Start an OpenCode session
  2. 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
    
  3. Try to load the skill: skill({ name: "test-skill" })
  4. 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

Originally created by @BearHuddleston on GitHub (Jan 6, 2026). Originally assigned to: @rekram1-node on GitHub. ### 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 1. Start an OpenCode session 2. Create a new skill mid-session: ```bash 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 ``` 3. Try to load the skill: `skill({ name: "test-skill" })` 4. 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
yindo added the bug label 2026-02-16 17:43:20 -05:00
Author
Owner

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

This issue might be a duplicate of existing issues. Please check:

  • #6018: [BUG] Skill loading returns "[object Promise]" instead of actual skill list (similar error message, closed Dec 23, 2025 - may be a regression)
  • #7069: Skill tool shows empty available_skills list (related to skill discovery issues)

Feel free to ignore if these don't address your specific case.

@github-actions[bot] commented on GitHub (Jan 6, 2026): This issue might be a duplicate of existing issues. Please check: - #6018: [BUG] Skill loading returns "[object Promise]" instead of actual skill list (similar error message, closed Dec 23, 2025 - may be a regression) - #7069: Skill tool shows empty available_skills list (related to skill discovery issues) Feel free to ignore if these don't address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4300