Repository navigation
Conversation
…nt#1193) A workflow step with agent: on OpenCode launched opencode run --format json <prompt> --agent <name> and nothing else, while pull deploys every OpenCode agent as mode: subagent. On OpenCode 1 a subagent is not a primary agent, so run falls back to the default agent - the definition's prompt and model never run. On OpenCode 2 the definition's prompt applies but its model and variant are ignored. The model half: the driver now passes the step agent's mapped model explicitly, the way the codex family in the same invocation already does. The report's request-body table shows both majors honor an explicit --model even in fallback. The mapped effort rides with it: --variant on OpenCode 1, inside the model id (prov#effort) on OpenCode 2, where run has no separate variant flag; the major is probed once per executable and cached, reading as 1 (the pinned devDependency) when the probe fails. The driver reads the effort off the deployed file's variant field (reverseFromOpencode already collects it into tool_extras.opencode). The mode half - whether pull should keep writing subagent and document tool_extras.opencode.mode as the escape, or write a primary-mode copy for workflow-destined agents - is a design call left on the issue.
|
No confident findings in the three-file head-commit diff inspected. The PR description includes a post-build real-CLI verification record; no missing-testing finding is warranted. Review limitation: The checkout is shallow, and the requested three-dot diff fails with No PR code was run, built, or installed. |
|
Closing — superseded by #1192, which landed both halves. I missed the pointer posted 23 minutes after my claim and opened this before re-reading the thread; sorry for the duplicate. The independent run did converge: the model half here is the same shape #1192 shipped — Thanks for the careful-repro note on the issue — glad the forensics held up. |
What
A workflow step with
agent:on OpenCode launchedopencode run --format json <prompt> --agent <name>and nothing else, while pull deploys every OpenCode agent asmode: subagent. The report's request-body forensics (#1193) show:run --agent—! agent "reviewer" is a subagent, not a primary agent. Falling back to default agent— so the definition's prompt and model never run.model:andvariant:, running on the configured default.Change (the model half)
--modelexplicitly — the codex family in the same invocation already did. Per the report's table, both majors honor an explicit--modeleven in fallback.--varianton OpenCode 1, inside the model id (prov#effort) on OpenCode 2, whererunhas no separate variant flag. The major is probed once per executable (--version) and cached; a failed probe reads as 1, the pinned devDependency's major.local-driverreads the effort off the deployed file'svariantfield (reverseFromOpencodealready collects it intotool_extras.opencode) and passes it through to the adapter.The mode half — whether pull keeps writing
subagentand documentstool_extras.opencode.modeas the escape, or writes a primary-mode copy for workflow-destined agents — is a design call I've left on the issue rather than picking unilaterally.Verification
Red tests first, both shapes pinned (
workflow-local-tool-adapter.test.ts):runargs contain--model anthropic/claude-sonnet-4-5and--variant high, no#highrunargs contain--model anthropic/claude-sonnet-4-5#high, no--variantReal CLI, after
npm run build, against the pinned devDependency (OpenCode 1.18.23), agent file exactly as pull deploys it:The second command shows the emitted shape is accepted by OpenCode 1's CLI; whether the model is honored is the report's table (row 2: explicit
--model→ model sent, even in fallback). I did not re-run their request-body capture.Suites: 132/132 (adapter + driver + agent-format), e2e 2/2, tsc and lint clean.
Closes the model half of #1193.