Commit 12dbec3
committed
fix(kiro): stop proxy filler from preceding a mid-turn steer
Reported as issue #543: mid-turn steering messages typed in Claude Code
while the agent works were ignored on kiro/claude-opus-5, though the
reporter's own control showed them working on kiro/claude-opus-4.8 with
the same proxy build.
Claude Code delivers such a steer as text riding the same user turn as
the pending tool_result. The Kiro adapter merges adjacent user content,
and the tool-result branch pushed KIRO_TOOL_RESULT_CARRIER_MESSAGE first,
so the assembled current message read:
"The requested tool result is attached.
<the human's actual instruction>"
The carrier sentence exists to keep an otherwise EMPTY tool-result turn
from having blank content. It was never meant as a prefix, and putting it
ahead of the newest human intent buries that intent behind boilerplate.
Tool results now push empty content, and the carrier is backfilled only
for turns that still have no text. The backfill runs before the current
turn is popped: doing it after would ship an empty current content, which
validateKiroConversationState accepts because tool results count as
payload, so the mistake would fail silently.
This is a targeted mitigation, not a proven fix for #543. Request
construction is otherwise the same for both models — verified by invoking
buildKiroPayload directly for each — differing only in model identity and
opus-5's native output_config.effort, so any remaining divergence is
upstream. The new parity test pins that so a future model-conditional
regression on this path surfaces here instead of in a user's session.1 parent c7fe9e8 commit 12dbec3
2 files changed
Lines changed: 74 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
502 | 506 | | |
503 | 507 | | |
504 | 508 | | |
| |||
518 | 522 | | |
519 | 523 | | |
520 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
521 | 535 | | |
522 | 536 | | |
523 | 537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
843 | 902 | | |
844 | 903 | | |
845 | 904 | | |
| |||
0 commit comments