Skip to content

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

Closed

Description

@stevoland

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_

Activity

  1. github-actions commented on Jan 18, 2026

    @github-actions
    Contributor

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

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

  2. dymoo commented on Feb 27, 2026

    @dymoo
    Image

    seems to switch but continues using plan model, quite annoying as I have to pres esc twice and continue with correct build model

  3. filipeandre commented on Mar 19, 2026

    @filipeandre

    ok #18163 ?

  4. MessiasLima commented on Apr 30, 2026

    @MessiasLima

    Same issue here. Im using GLM and Kimi from OpenCode Go

  5. removed
    bugSomething isn't working
    on May 3, 2026
  6. MessiasLima commented on May 5, 2026

    @MessiasLima

    @thdxr is this not a bug? Could you please explain whats the Team vision about this behaviour?

  7. Tuxie commented on Jun 18, 2026

    @Tuxie

    This is super annoying and still a problem in 1.17.8.

  8. mrstruijk commented on Jul 20, 2026

    @mrstruijk

    This is still happening.

  9. stevoland commented on Aug 19, 2026

    @stevoland
    ContributorAuthor

    I'm closing cos v2 and it makes me seem whiny

  10. log0u7 commented on Sep 30, 2026

    @log0u7

    +1 - this still reproduces on dev, as noted in #50609 (which fixes the root cause: the plan agent's model no longer leaks into the build agent after plan_exit). Earlier attempts #23971 and #29457 were closed unmerged, but this one is small, tested and mergeable - it just needs a maintainer review. Pinging the thread here so it gets picked up.

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