Skip to content

fix: drain pending stream output after interrupt in ClaudeCodeSdk#11

Merged
zxyao145 merged 1 commit intomainfrom
fix/interrupt-ClaudeCodeSdk
Feb 6, 2026
Merged

fix: drain pending stream output after interrupt in ClaudeCodeSdk#11
zxyao145 merged 1 commit intomainfrom
fix/interrupt-ClaudeCodeSdk

Conversation

@zxyao145
Copy link
Owner

@zxyao145 zxyao145 commented Feb 6, 2026

  • keep reading ReceiveResponseAsync during cancellation to flush buffered messages
  • trigger InterruptAsync from cancellation callback instead of aborting the reader token
  • stop disposing the client inside ClaudeSdkClient.InterruptAsync so buffered output is not lost to the next query

(cherry picked from commit 2f1d4ec9a0cc27ce5741a10d6ff6afd3ae277485)

  - keep reading ReceiveResponseAsync during cancellation to flush buffered messages
  - trigger InterruptAsync from cancellation callback instead of aborting the reader token
  - stop disposing the client inside ClaudeSdkClient.InterruptAsync so buffered output is not lost to the next query

(cherry picked from commit 2f1d4ec9a0cc27ce5741a10d6ff6afd3ae277485)
Signed-off-by: zxyao145 <zxyao145@gmail.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d312d81a6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@zxyao145 zxyao145 merged commit 4fcff47 into main Feb 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments