opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Skill tool returns `[object Promise]` instead of skill list

Open BearHuddleston opened this issue 1 week ago • 1 comments

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

BearHuddleston avatar Jan 06 '26 13:01 BearHuddleston