Repository navigation
auto-review: reviewer calls omit x-opencode-session, so every tool call fails closed on OpenCode Go routes #9972
Replies: 2 comments
|
Confirmed on The call
const options: GenerateOptions = deepFreeze({
provider: snapshot.provider,
model: snapshot.model,
system: REVIEW_POLICY,
messages: [{ role: 'user', content: [{ type: 'text', text: reviewUserText(snapshot) }] }],
temperature: 0,
signal,
})
return readDecision(ctx.llm.stream(options))No The field exists and is already plumbed
So the harness never writes that header; it hands Fail-closed is confirmed too
One design consideration before wiring it
There is a second report on that consequence: the missing On ordering If you want a minimal patch: add |
|
Is it possible to patch and bypass this ourselves? |
Uh oh!
There was an error while loading. Please reload this page.
Summary
With the experimental Auto review layer enabled, every reviewed tool call fails while the session's model route is
opencode/opencode-go:It is not only the review that is lost: no tool call can execute at all while the session is on an OpenCode route (observed for
bash,readandglobinside one session).Root cause
@deepseek-ai/dsh-experimental-auto-reviewbuilds the reviewer request inclassifyRisk()and calls:No
sessionIdis passed — the string does not occur anywhere in the shipped package. OpenCode's relay requires the per-conversation routing header, and the pi-ai provider attaches it only when the call carries a session id:providers/opencode.jsandproviders/opencode-go.jswrap their APIs withwithOpenCodeSessionHeader(...), so ordinary turns are fine; the reviewer's hand-built call is the one that loses the header.The community plugin
dsh-opencode-sessioncannot compensate either: it only coversllm/streamcalls that already carry asessionId— exactly the same condition as the built-in wrapper.Impact
Repro
@deepseek-ai/dsh-experimental-auto-reviewbundle enabled.opencode-go(here:deepseek-v4.1-flash,reasoningEffort: max).bash).Suggested fix
Pass the owning conversation's session id into the reviewer request (e.g.
sessionId: agent.session.idat thectx.llm.streamcall site), or let auxiliary LLM calls inherit session identity from the originating session so provider-level routing headers are attached uniformly. A distinct infrastructure-failure message for missing-header 400s would also make this easier to diagnose.Environment
0.2.1-rc.2(hostProtocolVersion 4, Node 24.21.0, pnpm 11.28.5)@earendil-works/pi-ai0.87.1@deepseek-ai/dsh-experimental-auto-reviewopencode-go, modeldeepseek-v4.1-flashWorkaround: disable the
@deepseek-ai/dsh-experimental-auto-reviewbundle, or keep sessions off OpenCode routes.All reactions