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
Subagents launched via task tool ignore their model: frontmatter and inherit parent agent's model #35126
When a primary agent launches a subagent via the task tool, the subagent ignores the model: field defined in its own frontmatter and instead uses the model configured for the parent (primary) agent.
So on current dev, the subagent markdown model: frontmatter is parsed and honored through the task tool; it did not inherit the parent model.
The most likely cause for reports that still look like this is that the configured model string is not resolving to a model available to that user/provider installation. Please run:
opencode models
# or
opencode models <provider>
and make sure the agent frontmatter uses the exact provider/model string shown there. This matters especially for custom OpenAI-compatible providers and model aliases.
Closing as not reproducible on current dev. If this still happens on a current build, please open a fresh issue with:
exact opencode --version
sanitized provider config
opencode models / opencode models <provider> output for the relevant provider
the exact ~/.config/opencode/agents/<agent>.md frontmatter
the resulting SELECT agent, model FROM session ... row
Activity
github-actions commentedon Jul 3, 2026
This issue might be a duplicate of existing issues. Please check:
opencode-agent commentedon Jul 9, 2026
Automated maintainer triage by OpenCode Agent.
I tried to reproduce this on current
dev(b8374b5a7c5, 2026-07-09) and could not reproduce it.Exact reproduction I used:
Ran OpenCode from a fresh
origin/devworktree with an isolated HOME/XDG config and a writable SQLite DB.Registered a fake OpenAI-compatible provider
testwith two available models:test/test-model— parent/default modeltest/cheap-model— subagent modelCreated the markdown subagent at
~/.config/opencode/agents/test-agent.md:Started a parent run on
test/test-modeland had the model call thetasktool with:{ "description": "inspect bug", "prompt": "say hello", "subagent_type": "test-agent" }Queried the session database afterward:
Observed child session row:
{ "agent": "test-agent", "model": {"id":"cheap-model","providerID":"test","variant":"default"} }So on current
dev, the subagent markdownmodel:frontmatter is parsed and honored through thetasktool; it did not inherit the parent model.The most likely cause for reports that still look like this is that the configured model string is not resolving to a model available to that user/provider installation. Please run:
and make sure the agent frontmatter uses the exact
provider/modelstring shown there. This matters especially for custom OpenAI-compatible providers and model aliases.Closing as not reproducible on current
dev. If this still happens on a current build, please open a fresh issue with:opencode --versionopencode models/opencode models <provider>output for the relevant provider~/.config/opencode/agents/<agent>.mdfrontmatterSELECT agent, model FROM session ...row