opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Subtask commands do not inherit model

Open JUVOJustin opened this issue 1 week ago • 1 comments

Description

If running a command as a subtask, the model is not inherited from the agent but from the config.

Config

{
    "$schema": "https://opencode.ai/config.json",
    "autoupdate": true,
    "model": "opencode/big-pickle",
    "agent": {
        "build": {
            "model": "github-copilot/claude-sonnet-4.5",
            "permission": {
                "external_directory": "deny",
                "context7*": "allow"
            }
        },
        "plan": {
            "model": "github-copilot/gpt-5.1",
            "permission": {
                "external_directory": "deny",
                "context7*": "allow"
            }
        },
        "explore": {
            "model": "opencode/big-pickle"
        }
    },
    "mcp": {
        "context7": {
            "type": "remote",
            "url": "https://mcp.context7.com/mcp"
        }
    }
}

Plugins

No response

OpenCode version

1.1.2

Steps to reproduce

  1. New session
  2. Switch to another model than the agents default model. e.g. GLM 4.7
  3. Run the command
  4. Switch in the session of the command and see that the default model is used despite the previous selection
  5. Be sad that your precious github copilot premium requests are used

Screenshot and/or share link

https://www.loom.com/share/3215afd3c9154a17b79b861b30c39cc8

https://opncd.ai/share/uzhsRzKm

Operating System

No response

Terminal

No response

JUVOJustin avatar Jan 05 '26 09:01 JUVOJustin