So both when rejecting a plan and when rejecting a tool call, Claude is sending refusal as the stop reason for the prompt turn. This is quite confusing as it says in the protocol that the reason is: The Agent refuses to continue. This is not actually the case.
I do not know what Claude was sending before, but this does not seem right. I think it should probably send a cancelled, if I had to choose. Perhaps you could even think about creating a new stop reason for cases like this.
This is also creating confusion in the Zed editor, see: zed-industries/zed#42152.
Also, Claude is sending weird user chunk messages after rejections, like this: [Request interrupted by user for tool use]. I guess we can ignore/filter them out, but it started at about the same time as the refusal stop reasons, so they might be connected.
Thanks!