Are interrupted messages lost from the context? #1443

Closed
opened 2026-02-16 17:30:59 -05:00 by yindo · 3 comments
Owner

Originally created by @remorses on GitHub (Aug 22, 2025).

Originally assigned to: @thdxr on GitHub.

I think currently opencode will not add the interrupted assistant messages in the conversation, meaning that any action taken by opencode in the aborted message will not be in context. Is this the case?

If this is a limitation of the ai sdk I have a PR open that should fix issues like these. My PR will make sure that onFinish is called on aborted requests and that you can use convertToModelMessages on interrupted messages

https://github.com/vercel/ai/pull/7902

Originally created by @remorses on GitHub (Aug 22, 2025). Originally assigned to: @thdxr on GitHub. I think currently opencode will not add the interrupted assistant messages in the conversation, meaning that any action taken by opencode in the aborted message will not be in context. Is this the case? If this is a limitation of the ai sdk I have a PR open that should fix issues like these. My PR will make sure that `onFinish` is called on aborted requests and that you can use `convertToModelMessages` on interrupted messages https://github.com/vercel/ai/pull/7902
yindo closed this issue 2026-02-16 17:30:59 -05:00
Author
Owner

@rekram1-node commented on GitHub (Aug 22, 2025):

I think this is a limitation of ai sdk

@rekram1-node commented on GitHub (Aug 22, 2025): I think this is a limitation of ai sdk
Author
Owner

@thdxr commented on GitHub (Aug 27, 2025):

hm this shouldn't be the case, we're saving history as stuff comes in

@thdxr commented on GitHub (Aug 27, 2025): hm this shouldn't be the case, we're saving history as stuff comes in
Author
Owner

@remorses commented on GitHub (Aug 27, 2025):

Yes I tried just now and it was remembering the previous messages. When I opened this issue it looked like it was not remembering anything, not sure why, maybe related to tool calls. If i reproduce this again will reopen

@remorses commented on GitHub (Aug 27, 2025): Yes I tried just now and it was remembering the previous messages. When I opened this issue it looked like it was not remembering anything, not sure why, maybe related to tool calls. If i reproduce this again will reopen
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1443