opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Experimental plan mode handover -> build uses plan agent's model

Open stevoland opened this issue 2 days ago • 1 comments

Description

Planned with configured GTP-5.2, handover to build errored with GPT-5.2 rather than the configured opus-4.5

Plugins

No response

OpenCode version

1.1.25

Steps to reproduce

{
  "$schema": "https://opencode.ai/config.json",
  "agent": {
    "plan": {
      "model": "github-copilot/gpt-5.2"
    },
    "build": {
      "model": "github-copilot/claude-opus-4.5"
    },
  },
}
OPENCODE_EXPERIMENTAL_PLAN_MODE=1 opencode

Plan and handover to build -> Errors with bad tool calls

⚙ functions.glob [pattern=packages/opencode/src/**/__tests__/**/*, path=/Users/stevoland/workspace/github.com/sst/opencode]
Tool 'functions.glob' not in registry. External tools (MCP, environment) cannot be batched - call them directly. Available tools: question, bash, read, glob, grep, edit, write, task, webfetch, todowrite, todoread, skill, lsp, plan_exit, plan_enter, repo-explorer, repo-explorer_repo_ast, repo-explorer_repo_cleanup, repo-explorer_repo_clone, repo-explorer_repo_deps, repo-explorer_repo_exports, repo-explorer_repo_file, repo-explorer_repo_find, repo-explorer_repo_hotspots, repo-explorer_repo_search, repo-explorer_repo_structure, github-triage, github-pr-search
Invalid 'messages[15].tool_calls[1].function.name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_-]+$'.
▣  Build · gpt-5.2

### Screenshot and/or share link

_No response_

### Operating System

_No response_

### Terminal

_No response_

stevoland avatar Jan 18 '26 22:01 stevoland

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

  • #6636: Subagent with specific model results in model change in build and plan mode
  • #7099: Server API ignores agent's configured model when only agent parameter is passed
  • #9067: Calling use_skill tool switches agent to default_agent unexpectedly (same version 1.1.25)
  • #8432: partial fix: Issues in the new experimental Planning mode
  • #8435: Build agent can't find plan file
  • #8537: "Switching from Plan mode" doesn't switch from plan mode
  • #9055: switching from plan mode to build agent

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Jan 18 '26 22:01 github-actions[bot]