GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(opencode): preserve agent and reasoning options when steering by nateEc · Pull Request #23981 · pingdotgg/t3code

Conversation

@nateEc

@nateEc nateEc commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Steering an OpenCode turn omits the selected agent and reasoning variant, so a thread using a custom agent can switch to OpenCode's default agent mid-turn. The steered prompt also loses the system instructions supplied at turn start.

Use the same prompt options for turn start and steering, retaining the explicit agent, plan-mode fallback, reasoning variant, and system instructions. This is a focused fix for an existing message-delivery path, with no new capability or product default.

Fixes #23508.

Validation on macOS arm64, Node 26.12.1:

  • Adapter regression cases for custom agent (including precedence over plan mode), plan fallback, and default options failed on main because the steered payload omitted those fields; all pass after the fix.
  • vp run check:changed passed format, lint, knip, affected-package typechecks, and all 34 adapter tests. Lint retains an existing unused layer warning.
  • Runtime transcript from the real adapter with a fake SDK transport: start agent=agent-b, variant=high → steer previously agent=undefined, variant=undefined; now agent=agent-b, variant=high, with identical system instructions and a fresh message ID.
  • A live authenticated OpenCode session was not run. The test exercises the adapter/SDK boundary; no UI changes.

Written with GPT-6 in the Codex desktop harness.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nateEc
fix(opencode): 保留追加消息的代理和推理配置
d46aa4c
统一普通消息与中途追加消息的 agent、推理强度和系统指令,保留计划模式回退。\n新增三种配置的适配器回归用例,确认修复前失败、修复后通过。\n通过 check:changed 和 34 个适配器测试。
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 23, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 23, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Oct 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 667fc87

Macroscope's review found this PR approvable — This focused OpenCode adapter fix preserves the existing agent, reasoning variant, plan fallback, and system instructions when steering an active turn. Production behavior changes only in that previously incomplete steering path, with targeted regression coverage and no product-default or static-analysis changes.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: be2ea30
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 676294de-d27c-46a1-b9dd-6f4e04b5303d
Commits

Reviewing files that changed from the base of the PR and between 667fc87 and 6877a55.

Files selected for processing: 2
  • packages/provider-opencode/src/server/adapter.test.ts
  • packages/provider-opencode/src/server/adapter.ts

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

Walkthrough

Turn submission and steering now use shared OpenCode prompt options. The options include the selected agent and variant, the plan-mode agent fallback, and the combined system prompt. Tests cover custom, plan, and default interaction modes.

Changes: OpenCode prompt options

Layer / File(s) Summary
Shared prompt options for turns and steering
packages/provider-opencode/src/server/adapter.ts, packages/provider-opencode/src/server/adapter.test.ts
A shared helper derives the agent, variant, and system prompt from model selection and runtime policy. Turn submission and steering use these options. Tests check custom, plan, and default modes, including system prompt retention and distinct message IDs.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

  • pingdotgg/t3code#23508 — The change supplies the selected agent, variant, plan-mode fallback, and system prompt to steering prompts.

Possibly related PRs

  • pingdotgg/t3code#24321 — Both changes use model selection to determine OpenCode agent behavior; this PR applies the selected agent’s permission rules.

Suggested reviewers: juliusmarminge, marcodotio

Merge Risk: Minimal · up to 6877a

Steering preserves the selected options. No merge-blocking issue was established.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title is concise, specific, and accurately describes preserving OpenCode agent and reasoning options during steering.
Description check Passed The description covers the problem, solution, scope, issue reference, verification results, limitations, and testing environment. It provides the required information, although it does not use the tem…
Linked Issues check Passed Issue [#23508] requires OpenCode steering to preserve the selected agent and reasoning variant, including the plan-mode fallback. promptOptions derives agent, variant, and the shared system inst…
Out of Scope Changes check Passed The changes remain within the OpenCode message-delivery path required by [#23508]. The helper removes duplicated prompt-option construction, and the tests verify the steering behavior. No unrelated ca…
Full details: Description check

Explanation

The description covers the problem, solution, scope, issue reference, verification results, limitations, and testing environment. It provides the required information, although it does not use the template's section headings.

Full details: Linked Issues check

Explanation

Issue [#23508] requires OpenCode steering to preserve the selected agent and reasoning variant, including the plan-mode fallback. promptOptions derives agent, variant, and the shared system instructions from the active turn. Both startTurn and steerTurn use this helper. The parameterized test covers custom-agent precedence, plan fallback, default options, system-prompt equality, and a fresh message ID.

Full details: Out of Scope Changes check

Explanation

The changes remain within the OpenCode message-delivery path required by [#23508]. The helper removes duplicated prompt-option construction, and the tests verify the steering behavior. No unrelated capability, product default, or UI change appears in the reviewed diff.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai coderabbitai Bot mentioned this pull request Oct 24, 2026
fix(opencode): full access keeps the selected agent's deny rules #24321
Closed
@only21mil only21mil mentioned this pull request Oct 25, 2026
fix(opencode): a failed steer no longer leaves the turn running forever #24701
Merged
@coderabbitai coderabbitai Bot mentioned this pull request Oct 25, 2026
feat(settings): follow-ups steer the running turn by default #24718
Merged
@nateEc
chore(opencode): 同步主线并整合追加消息回归测试
667fc87
保留追加消息的代理和推理配置,以及主线附件解析和停止竞态覆盖。

分开测试宿主与模型选项参数,避免丢失任一方测试能力。
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 26, 2026 04:10

Dismissing prior approval to re-evaluate 667fc87

@nateEc ChatGPT Codex Connector

nateEc commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Merged main c3888da in 667fc87. Preserved steering agent/variant/system options and main's extracted-attachment/stop-race tests. The harness now accepts host overrides and model selection separately so neither side's coverage is lost. All 35 adapter tests and check:changed scoped gates pass. No real provider request was sent.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot]
macroscopeapp Bot approved these changes Oct 26, 2026
View reviewed changes
@juliusmarminge juliusmarminge added bugfix Fix PR opened by an issue lead; enters the PR loop pr:needs-julius Needs Julius: route gate, unverifiable surface, or blocked labels Oct 27, 2026
@nateEc
chore(opencode): 整合主线权限刷新与追加消息测试
6877a55
保留追加消息的代理、推理和系统指令选项。
合并主线恢复会话及子任务权限更新的回归测试。
@nateEc ChatGPT Codex Connector

nateEc commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

Merged main be2ea30, preserving this PR's steering-options regression alongside main's new session/subagent permission-refresh tests. The production merge is unchanged in intent: initial and appended prompts share the selected agent, reasoning variant and system instructions.

vp run check:changed passed: all 37 OpenCode adapter tests, format, lint, both knip checks and all 10 affected-package typechecks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nateEc ChatGPT Codex Connector

nateEc commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Verified current main e455200 contains the same fix via merged #23270 (f14fa03). Both startTurn and steerTurn now spread turnPromptOptions from the active turn, preserving the explicit agent (or Plan fallback), variant, and T3/runtime system instructions. The merged PR includes a regression asserting the start and steer payloads retain those values. Closing this duplicate; no additional implementation needs to be merged from this branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nateEc nateEc closed this Nov 7, 2026
@juliusmarminge juliusmarminge removed the pr:needs-julius Needs Julius: route gate, unverifiable surface, or blocked label Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop size:M 30-99 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: OpenCode steer drops the thread's agent (and variant), so steered messages run on opencode's default_agent

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@nateEc @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.