Skip to content

Subtask commands do not inherit model #6928

Closed as not planned
Closed as not planned

Description

@JUVOJustin

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

Activity

  1. github-actions commented on Jan 5, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Both issues describe problems with model configuration not being properly inherited or maintained when using subagents/task commands. Feel free to ignore if this doesn't address your specific case.

  2. github-actions commented on Mar 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  3. removed
    bugSomething isn't working
    on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions