You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
session: interrupted assistant tool-call turn loses reasoning_content on next request #55104
Interrupting a running prompt with double Escape leaves the session in a state where the next request fails with:
Upstream request failed: [missing_required_parameter] Missing required parameter:
'messages[152].reasoning_content'. This model needs the reasoning of every
earlier assistant message: send back the 'reasoning_content' returned with that
message.
The interrupted assistant turn contained reasoning + an aborted tool call. On the
following turn OpenCode serializes that earlier assistant message without reasoning_content, so a reasoning model rejects the whole request and the
session becomes unusable.
Active plugins: none found in config (opencode.jsonc is empty; no plugins configured)
Model: opencode/cat-jam-free (a reasoning model requiring reasoning_content)
Reproduction
Use opencode/cat-jam-free in a session with several assistant turns that include reasoning + tool calls.
Start another prompt that executes tools (or streams reasoning).
Press Escape twice while that turn is running to interrupt it. The aborted
assistant message is retained (reasoning + a tool call whose status becomes error/aborted).
Send a new user message.
The request fails with missing_required_parameter: messages[...].reasoning_content.
Expected Behavior
OpenCode should preserve and resend the reasoning for the interrupted assistant
turn (as the model requires for every earlier assistant message), allowing the
session to continue after an interrupt.
Actual Behavior
The request omits reasoning_content for that earlier assistant message and the
provider returns HTTP 400. The session is then stuck: every subsequent turn hits
the same error unless the user switches models/sessions.
Additional Context
The offending message in the recorded session is an assistant message with finish: "error", rawFinish: "tool_calls", error.type: "aborted" ("Step interrupted"), containing a reasoning part
(state.reasoningField = "reasoning_content") plus a single shell tool call
with status: "error" / error.type: "aborted".
The error index (messages[152]) maps exactly to that assistant message when
the assistant+tool history is flattened for the upstream request.
Thanks for the detailed report! I think this is a duplicate of #55096. That issue has been reproduced on 2.0.28 and on current dev. The trigger is an interrupted assistant turn that has reasoning plus a tool call: on the next request that message is sent without its reasoning_content, so the provider rejects every request after it. That matches what you saw.
Possible duplicates and related issues, ordered from most to least likely:
Starting a new session is still the workaround for now. The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
Closing this as a duplicate of #55096, since there's been no reply in the last day. That issue covers the same problem: an interrupted assistant turn with reasoning and a tool call is sent without its reasoning_content on the next request. It has been reproduced on 2.0.28 and current dev. Please follow #55096 for updates; #38620 and its open PR #54693 cover the same root cause. Starting a new session is still the workaround. If your case turns out to be different, reply here and we can reopen. Thanks for the detailed report!
Activity
opencode-agent commentedon Oct 13, 2026
Thanks for the detailed report! I think this is a duplicate of #55096. That issue has been reproduced on 2.0.28 and on current
dev. The trigger is an interrupted assistant turn that has reasoning plus a tool call: on the next request that message is sent without itsreasoning_content, so the provider rejects every request after it. That matches what you saw.Possible duplicates and related issues, ordered from most to least likely:
missing_required_parameter ... reasoning_contenterror after an interrupted tool call. It has been reproduced, and the reproduction shows the interrupt alone causes it.Starting a new session is still the workaround for now. The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencode-agent commentedon Oct 14, 2026
Closing this as a duplicate of #55096, since there's been no reply in the last day. That issue covers the same problem: an interrupted assistant turn with reasoning and a tool call is sent without its
reasoning_contenton the next request. It has been reproduced on 2.0.28 and currentdev. Please follow #55096 for updates; #38620 and its open PR #54693 cover the same root cause. Starting a new session is still the workaround. If your case turns out to be different, reply here and we can reopen. Thanks for the detailed report!