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
[Bug] Subagent spawned via Task tool uses global config model instead of inheriting parent session's active model #17870
When a primary agent running a non-default model (e.g. selected interactively or different from opencode.json) spawns a subagent via the Task tool, the subagent ignores the parent's active session model and falls back to the global "model" defined in opencode.json.
The docs state:
"If you don't specify a model, subagents will use the model of the primary agent that invoked the subagent."
This does not happen in practice when the session model differs from the global config.
Expected behavior: Subagent inherits the active model of the parent session that invoked it.
Actual behavior: Subagent uses the global config default (opencode.json"model" field), ignoring the parent's active session model.
This issue might be a duplicate of existing issues. Please check:
Subtask commands do not inherit model #6928: Subtask commands do not inherit model — reports the same behavior where subagents don't inherit the parent session's active model
Activity
github-actions commentedon Mar 17, 2026
This issue might be a duplicate of existing issues. Please check:
feat(plugin): add chat.model hook for dynamic model routing for token…
feat: add chat.model hook with reference token-optimizer plugin
github-actions commentedon Jul 7, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.