Cancelling causes context loss #1539

Closed
opened 2026-02-16 17:31:26 -05:00 by yindo · 2 comments
Owner

Originally created by @pbjorklund on GitHub (Aug 30, 2025).

Originally assigned to: @thdxr on GitHub.

If the model decides to for instance run something that opens with $editor or tail -f or in general enter something interactive we either have to try to escape out with multiple escapes or worse do the spam ctrl c and go back with opencode -c.

My feeling is that before it could include the "cancelled out" context. For instance the log output that was displayed on the screen during the tail session or similar.

Now if I cancel out and re-send the last message it seems that the previous message/response is totally ignored.

Check end of https://opencode.ai/s/1CJMP6HC to see what I mean.

0.5.29, archbtw, copilot-sonnet-4

Originally created by @pbjorklund on GitHub (Aug 30, 2025). Originally assigned to: @thdxr on GitHub. If the model decides to for instance run something that opens with $editor or tail -f or in general enter something interactive we either have to try to escape out with multiple escapes or worse do the spam ctrl c and go back with opencode -c. My feeling is that before it could include the "cancelled out" context. For instance the log output that was displayed on the screen during the tail session or similar. Now if I cancel out and re-send the last message it seems that the previous message/response is totally ignored. Check end of https://opencode.ai/s/1CJMP6HC to see what I mean. 0.5.29, archbtw, copilot-sonnet-4
yindo closed this issue 2026-02-16 17:31:26 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 30, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1637: Linked files are broken when using history - describes similar context loss issues when using Ctrl+C to cancel, where history entries become corrupted
  • #888: Press ESC again to interrupt does not work - describes the exact same issue where ESC doesn't properly interrupt interactive commands, requiring Ctrl+C
  • #606: /compact is not interruptible - similar issue where escape sequences don't work to interrupt running commands
  • #1561: When opencode enters an interactive session, it will be in working... mode indefinitely - describes the same problem where interactive commands cause sessions to become stuck
  • #184: Can't continue session after closing opencode while working - related issue about context loss after cancelling operations
  • #1418: Working getting stuck and double esc not exiting - describes similar escape/cancellation issues

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 30, 2025): This issue might be a duplicate of existing issues. Please check: - #1637: Linked files are broken when using history - describes similar context loss issues when using Ctrl+C to cancel, where history entries become corrupted - #888: Press ESC again to interrupt does not work - describes the exact same issue where ESC doesn't properly interrupt interactive commands, requiring Ctrl+C - #606: /compact is not interruptible - similar issue where escape sequences don't work to interrupt running commands - #1561: When opencode enters an interactive session, it will be in working... mode indefinitely - describes the same problem where interactive commands cause sessions to become stuck - #184: Can't continue session after closing opencode while working - related issue about context loss after cancelling operations - #1418: Working getting stuck and double esc not exiting - describes similar escape/cancellation issues Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Sep 13, 2025):

this should be fixed in next release

@rekram1-node commented on GitHub (Sep 13, 2025): this should be fixed in next release
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1539