Repository navigation
Commit b3eb880
fix(claude): safeguard refusals show their error once
Claude Code reports an API failure as an assistant frame with `error`
set and again as the turn's result. The adapter turned the frame into a
reply, so the refusal showed as an assistant message and as the turn's
failure. The frame now waits until the turn ends and is dropped when
the failure carries the same text.
Fixes #24171
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent d53873b commit b3eb880
2 files changed
Lines changed: 82 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3935 | 3935 | | |
3936 | 3936 | | |
3937 | 3937 | | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
| 3955 | + | |
| 3956 | + | |
| 3957 | + | |
| 3958 | + | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
| 3963 | + | |
| 3964 | + | |
| 3965 | + | |
| 3966 | + | |
| 3967 | + | |
| 3968 | + | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
| 3973 | + | |
| 3974 | + | |
| 3975 | + | |
| 3976 | + | |
| 3977 | + | |
| 3978 | + | |
| 3979 | + | |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
| 3989 | + | |
| 3990 | + | |
| 3991 | + | |
| 3992 | + | |
| 3993 | + | |
| 3994 | + | |
| 3995 | + | |
| 3996 | + | |
3938 | 3997 | | |
3939 | 3998 | | |
3940 | 3999 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3415 | 3415 | | |
3416 | 3416 | | |
3417 | 3417 | | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
3418 | 3422 | | |
3419 | 3423 | | |
3420 | 3424 | | |
| |||
6706 | 6710 | | |
6707 | 6711 | | |
6708 | 6712 | | |
| 6713 | + | |
| 6714 | + | |
| 6715 | + | |
| 6716 | + | |
| 6717 | + | |
| 6718 | + | |
| 6719 | + | |
| 6720 | + | |
| 6721 | + | |
6709 | 6722 | | |
6710 | 6723 | | |
6711 | 6724 | | |
| |||
8485 | 8498 | | |
8486 | 8499 | | |
8487 | 8500 | | |
| 8501 | + | |
| 8502 | + | |
| 8503 | + | |
| 8504 | + | |
| 8505 | + | |
| 8506 | + | |
| 8507 | + | |
| 8508 | + | |
| 8509 | + | |
8488 | 8510 | | |
8489 | 8511 | | |
8490 | 8512 | | |
| |||
9516 | 9538 | | |
9517 | 9539 | | |
9518 | 9540 | | |
| 9541 | + | |
9519 | 9542 | | |
9520 | 9543 | | |
9521 | 9544 | | |
| |||
0 commit comments