opencode icon indicating copy to clipboard operation
opencode copied to clipboard

TUI: treat interrupted streams as clean aborts

Open paulbettner opened this issue 3 months ago • 0 comments

  • Handle ESC interrupts as user aborts instead of unknown errors.
  • Detect abort signal and OpenAI “reasoning … required following item” error; store MessageAbortedError (“Request was aborted”).
  • Clean up open reasoning parts; preserve tool input; mark tools “Tool execution aborted”.
  • Add unit test and interactive scripts; typecheck passes.

Files

  • packages/opencode/src/session/prompt.ts
  • packages/opencode/test/interrupt-handling.test.ts
  • test-interrupt-*.sh

paulbettner avatar Sep 27 '25 18:09 paulbettner