Skip to content

using --prompt should wait for prompt configuration loading #7485

@altendky

Description

@altendky

Description

when running opencode --prompt "heya", a different model may be used than running opencode and waiting a couple seconds and typing heya\n. the prompt submission triggered by the --prompt cli flag can happen before the full config processing has happened potentially resulting on usage of the wrong model.

Plugins

No response

OpenCode version

dev

Steps to reproduce

  1. you may need to change your model in the tui depending on what is the default elsewhere. i had this issue with a preference for opus
  2. run opencode --prompt "heya" and note the model used. it is a gemini for me
  3. run opencode, wait for it to load, type heya and submit and note the model used. claude-opus-4-5 for me, as i intend.

Screenshot and/or share link

No response

Operating System

Linux p1 6.8.0-90-generic #91~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 15:20:45 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Terminal

konsole

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions