anomalyco / anomalyco/opencode
ACP session creation ignores the default agent's assigned model
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.