Skip to content

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

Closed

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

Activity

  1. altendky commented on Jan 9, 2026

    @altendky
    ContributorAuthor

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

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

  2. altendky commented on Feb 16, 2026

    @altendky
    ContributorAuthor

    i just updated and manually reconfirmed the fix works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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