You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Calling use_skill tool switches agent to default_agent unexpectedly #9067
Problem
When any agent calls the use_skill tool, it gets reset to the global model setting instead of keeping the agent's own configured model.
Evidence
Before use_skill:
▣ Orchestrator · claude-opus-4-5-thinking-high
After use_skill:
▣ Orchestrator · gemini-3-flash
Impact
Agents lose their model configuration after loading skills
Subagents spawned in parallel get stuck when their model changes mid-task
Skills become unusable for agents with custom model configurations
Expected Behavior
use_skill should load the skill content without changing the agent's model. Each agent should retain its configured model throughout its lifecycle.
Plugins
oh-my-opencode, oh-my-opencode-slim
OpenCode version
1.1.25
Steps to reproduce
Configure global model: "google/gemini-3-flash" in opencode.json
Configure an agent with a different model:
orchestrator: {
model: anthropic/claude-opus-4-5
}
Use that agent and call use_skill("some-skill")
Observed: Agent switches to global default model (gemini-3-flash)
Expected: Agent stays on its configured model (claude-opus-4-5)
Activity
github-actions commentedon Jan 17, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
fancydirty commentedon Jan 19, 2026
修复方案
这个问题的根本原因是在
use_skill工具调用client.session.prompt()时没有传递agent参数,导致 OpenCode 使用默认的 agent 配置。问题代码
在
superpowers.js的use_skill工具中:修复后代码
添加
agent: context.agent参数来保留当前 agent 的配置:修改文件位置
文件路径:
~/.config/opencode/plugin/superpowers.js(或项目内的.opencode/plugin/superpowers.js)代码行: 约第 120 行附近
修复原理
context.agent包含了当前会话的 agent 配置信息。当调用session.prompt()时传递这个参数,OpenCode 会使用当前的 agent 设置而不是全局默认配置。验证步骤
use_skill("some-skill")相关参考
obra/superpowers仓库的 PR Azure Model o4-mini error Invalid schema edit #290: fix use_skill agent context obra/superpowers#290这个修复确保
use_skill加载 skill 内容时不会改变 agent 的模型配置。