Skip to content

Studio: stop showing a cancelled tool request reply as finished - #16473

Merged
danielhanchen merged 4 commits into
unslothai:mainfrom
NilayYadav:server-side-cancelled-claude-code
Nov 4, 2026
Merged

danielhanchen merged 4 commits into
unslothai:mainfrom
NilayYadav:server-side-cancelled-claude-code

Conversation

@NilayYadav

@NilayYadav NilayYadav commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

When a streaming /v1/messages request with client tools was cancelled on the server while the client was still connected, the stream ended with stop_reason end_turn and message_stop. Coding agents using the Anthropic-compatible API read the cut-off text as a complete answer, with nothing to show the reply had been stopped.

A stopped stream now ends without message_delta or message_stop, the same way the no-tool stream and the in-process server-tool stream already end, on both the llama-server and in-process client-tool paths. Claude Code treats that ending as an interrupted stream and sends the request again, so a reply stopped by a model swap is retried instead of kept cut off. Replies that are not cancelled finish exactly as before.

@NilayYadav NilayYadav self-assigned this Nov 2, 2026
@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

1 similar comment
@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T18:52:04.886413Z 3b8f362 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 3b8f362a03

ℹ️ 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".

@danielhanchen danielhanchen self-assigned this Nov 4, 2026
@danielhanchen
danielhanchen merged commit 67e82c8 into unslothai:main Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants