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

Open
opened 2026-02-16 17:44:29 -05:00 by yindo · 2 comments
Owner

Originally created by @altendky on GitHub (Jan 9, 2026).

Originally assigned to: @rekram1-node on GitHub.

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

Originally created by @altendky on GitHub (Jan 9, 2026). Originally assigned to: @rekram1-node on GitHub. ### 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
yindo added the bug label 2026-02-16 17:44:29 -05:00
Author
Owner

@altendky commented on GitHub (Jan 9, 2026):

fyi that this triggered a failure in check-duplicates in case you want to rerun

https://github.com/anomalyco/opencode/actions/runs/20854826826

@altendky commented on GitHub (Jan 9, 2026): fyi that this triggered a failure in check-duplicates in case you want to rerun https://github.com/anomalyco/opencode/actions/runs/20854826826
Author
Owner

@altendky commented on GitHub (Feb 16, 2026):

i just updated and manually reconfirmed the fix works.

@altendky commented on GitHub (Feb 16, 2026): i just updated and manually reconfirmed the fix works.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4525