Skip to content

fix(opencode): refuse model launches on OpenCode 2.x releases that drop the startup prompt - #33436

Merged
nwparker merged 2 commits into
mainfrom
nwparker/agint-opencode-2x-model-prompt-floor
Oct 25, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/agint-opencode-2x-model-prompt-floor

Conversation

@nwparker

@nwparker nwparker commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​8 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7

Summary (ELI5)

If you picked a model and started an OpenCode worker with a first message, OpenCode 2.0.14, 2.0.15, 2.0.17 and 2.0.18 opened with the message typed into the box but never sent it, so the worker just sat idle. #33307 started allowing model picks on those versions. This PR refuses model picks on them again, with the same clear "cannot verify" error they showed before #33307. OpenCode 2.0.16 and 2.0.19+ (including 2.1.x) still work.

Root cause

Change

isVerifiedOpenCodeConfigModelVersion now also requires a working startup-prompt path: a stable 2.x release >= 2.0.19 (OpenCode's own submit works), or a version in OPENCODE_NATIVE_PROMPT_VERSIONS (Orca's plugin). In practice the accepted set is 2.0.16 plus >=2.0.19 <3. This is a superset of what was accepted before #33307, so no version that worked before #33307 is refused now.

Verification (real binaries, isolated HOME/XDG under /tmp/verify-oc2-*, @opencode/cli-darwin-arm64 npm tarballs)

A temporary harness (not committed) ran the real buildExecutionHostAgentStartupPlan / planExecutionHostStartupWithPromptCandidate and then prepareOpenCodePtyLaunch, and ran the resulting command in a real PTY. A prompt counts as delivered when OpenCode's DB has a user row in session_message with the prompt text.

version model picked, origin/main model picked, this PR no model (unchanged)
2.0.14 admitted, prompt never submitted (0 messages) refused capability_unsupported prompt never submitted (pre-existing)
2.0.16 (plugin) delivered delivered (picked model used) delivered
2.0.18 (same as 2.0.14 by source) refused prompt never submitted (pre-existing)
2.0.19 — delivered, picked model used delivered
2.0.32 delivered, picked model used delivered delivered
2.1.4 delivered (force-line and candidate paths) delivered delivered

Replies hit free-tier/auth 429/401 errors. That doesn't matter for this check: the user message was recorded and the assistant turn ran on the picked model.

pnpm tc:node, pnpm test src/main/opencode/opencode-model-startup-plan.test.ts, pnpm run check:code-quality:changed: pass.

Risk / notes

  • People on 2.0.14/15/17/18 lose model selection, even for launches without a prompt. They get the same clear refusal they had before fix(opencode): accept OpenCode release ranges for launch-time model selection #33307. Updating OpenCode fixes it.
  • Pre-existing and not changed here: launches without a model on 2.0.13–2.0.18 (except 2.0.16) also drop the first message, because they also fall back to bare --prompt. Fixing that needs paste/plugin delivery for those releases and is a separate decision.
  • No change for remote, WSL, or mobile: model launches are already refused there before this check runs.

…op the startup prompt

OpenCode 2.0.14-2.0.18 auto-submit --prompt before the agent/model list loads, so the first
message is lost (upstream anomalyco/opencode#51938, fixed in 2.0.19). #33307 admitted those
releases for model-selected launches; keep them refused unless Orca's startup-prompt plugin
covers the release (2.0.16).
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3548f199-cd21-47c1-b1cc-fe1d21212bef
Commits

Reviewing files that changed from the base of the PR and between 51134e3 and e7262dd.

Files selected for processing: 2
  • src/main/opencode/opencode-model-startup-plan.test.ts
  • src/main/opencode/opencode-model-version-policy.ts

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4c55bfe5-e2b2-4b4c-bad4-569160615ec4
Commits

Reviewing files that changed from the base of the PR and between e4bbbe0 and 51134e3.

Files selected for processing: 2
  • src/main/opencode/opencode-model-startup-plan.test.ts
  • src/main/opencode/opencode-model-version-policy.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Walkthrough

The OpenCode config-model version check now requires a same-major stable release at or above 2.0.14, plus either a same-major stable release at or above 2.0.19 or an exact match in the native prompt version list. Launch tests update the verified and unverified version cases.

Priority: Normal

Merge Risk: Minimal · up to 51134

The reviewed version-policy change has no established merge-blocking risk.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description gives a detailed ELI5 summary, root cause, behavior change, verification results, and risk notes. It does not provide the required Linked Issue/Fixes # entry or the required Visual Pro… Add an actual issue link under Linked Issue using Fixes #. Add before/after visual proof, or write N/A with a reason if there is no visual or interaction change. Complete the Agent skill upstream boundary and relevant checklist sections.
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: refusing OpenCode 2.x model launches when the startup prompt cannot be delivered.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description gives a detailed ELI5 summary, root cause, behavior change, verification results, and risk notes. It does not provide the required Linked Issue/Fixes # entry or the required Visual Proof section with attachments or an explicit N/A explanation. The template checklist and Agent skill upstream boundary section are also missing.

Resolution

Add an actual issue link under Linked Issue using Fixes #. Add before/after visual proof, or write N/A with a reason if there is no visual or interaction change. Complete the Agent skill upstream boundary and relevant checklist sections.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit e575cc1 into main Oct 25, 2026
33 checks passed
LuweiLiao pushed a commit to LuweiLiao/orca that referenced this pull request Oct 25, 2026
…op the startup prompt (stablyai#33436)

OpenCode 2.x model-selection launches require 2.0.19+ (upstream stablyai#51938 waits for agent/model before auto-submitting --prompt) or a native-prompt version (2.0.12, 2.0.16), fixing a regression from stablyai#33307 where 2.0.14/15/17/18 accepted a picked model but silently dropped the first prompt.

(cherry picked from commit e575cc1)
@brennanb2025 brennanb2025 mentioned this pull request Nov 8, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant