Description
When "OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true" is set and I manually select a non-default model in the picker, the model silently reverts to the agent's configured default (per "opencode.json") the moment the first background subagent notification is injected into the session.
The system prompt does not refresh after the revert; the agent continues reporting the old model as its identity because it has no way to detect the switch. Per session data from Tokscale (a CLI token-tracking dashboard), I was charged on both models sequentially -- the user-selected model handles messages before the notification; the config default handles messages after.
This does NOT happen with foreground subagent dispatch (multiple parallel task calls without background: true). It only triggers observably when background notifications are injected and I've manually selected a non-default model. When I stay on the config default model, any revert would be unobservable because the fallback target matches the active model.
Plugins
None
OpenCode version
OpenCode v1.18.4
Steps to reproduce
- Set "OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true" in environment variables
- In opencode.json, set a primary agent's model to Model A (e.g., opencode-go/deepseek-v4-pro)
- Open a fresh session, manually select a different Model B (e.g., opencode-go/minimax-m3)
- Send a message that causes the agent to dispatch subagents with "background: true"
- Observe: the model switches from Model B back to Model A as soon as the first background notification arrives
- The agent's system prompt still reports Model B (exported Markdown conversation + Tokscale confirms the responding model is actually Model A)
Screenshot and/or share link
No response
Operating System
Windows 10
Terminal
OpenChamber v1.16.3
Description
When "OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true" is set and I manually select a non-default model in the picker, the model silently reverts to the agent's configured default (per "opencode.json") the moment the first background subagent notification is injected into the session.
The system prompt does not refresh after the revert; the agent continues reporting the old model as its identity because it has no way to detect the switch. Per session data from Tokscale (a CLI token-tracking dashboard), I was charged on both models sequentially -- the user-selected model handles messages before the notification; the config default handles messages after.
This does NOT happen with foreground subagent dispatch (multiple parallel task calls without background: true). It only triggers observably when background notifications are injected and I've manually selected a non-default model. When I stay on the config default model, any revert would be unobservable because the fallback target matches the active model.
Plugins
None
OpenCode version
OpenCode v1.18.4
Steps to reproduce
Screenshot and/or share link
No response
Operating System
Windows 10
Terminal
OpenChamber v1.16.3