anomalyco / anomalyco/opencode

ACP session creation ignores the default agent's assigned model

Open
#42,835 1 comment 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 16, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

When using an ACP client (e.g. Zed) against opencode acp, new sessions are created with a model resolved from selectDefaultModel() (config model, last-used, or first provider model) — the default agent's assigned model is never consulted.

Impact

Configurations that assign per-agent models (e.g. oh-my-openagent style agent definitions where each agent declares model) start ACP sessions with the wrong model. The server-side resolution input.model ?? agent.model ?? currentModel (packages/opencode/src/session/prompt.ts) is bypassed because ACP always passes an explicit model to session.create/prompt.

Expected behavior

When the default agent (first primary, non-hidden agent) declares a model that resolves to a discovered provider model, new ACP sessions should default to that model. Client-explicit model selection must still win.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.