Commit 6c4e035
committed
Keep tool errors in the tool channel
Convert LangGraph tool failures into TOOL_RESULT events so downstream consumers treat them as tool outcomes instead of run-level errors.
Constraint: preserve existing non-tool error handling.
Rejected: keep emitting EventType.ERROR for on_tool_error | that escalates tool failures into run failures.
Confidence: high
Scope-risk: narrow
Directive: future tool-error handling should stay aligned with TOOL_RESULT unless the protocol contract changes.
Tested: uv run pytest -q tests/unittests/integration/test_langgraph_events.py tests/unittests/integration/test_langgraph_to_agent_event.py; git diff --check
Not-tested: full repository test suite
Change-Id: Ie7c4a6264afcbb7613b5382075978e82f9c7ef30
Co-developed-by: Codex <noreply@openai.com>1 parent 0490828 commit 6c4e035
3 files changed
Lines changed: 28 additions & 27 deletions
File tree
- agentrun/integration/langgraph
- tests/unittests/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
928 | | - | |
| 928 | + | |
929 | 929 | | |
930 | | - | |
| 930 | + | |
931 | 931 | | |
932 | | - | |
| 932 | + | |
| 933 | + | |
933 | 934 | | |
934 | 935 | | |
935 | 936 | | |
936 | 937 | | |
937 | | - | |
938 | | - | |
939 | 938 | | |
940 | 939 | | |
941 | 940 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
749 | | - | |
| 749 | + | |
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
769 | 768 | | |
770 | 769 | | |
771 | 770 | | |
| |||
786 | 785 | | |
787 | 786 | | |
788 | 787 | | |
789 | | - | |
| 788 | + | |
| 789 | + | |
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
806 | | - | |
| 806 | + | |
| 807 | + | |
807 | 808 | | |
808 | 809 | | |
809 | 810 | | |
| |||
878 | 879 | | |
879 | 880 | | |
880 | 881 | | |
881 | | - | |
| 882 | + | |
882 | 883 | | |
883 | 884 | | |
884 | 885 | | |
| |||
903 | 904 | | |
904 | 905 | | |
905 | 906 | | |
906 | | - | |
| 907 | + | |
907 | 908 | | |
908 | 909 | | |
909 | 910 | | |
910 | 911 | | |
911 | | - | |
| 912 | + | |
Lines changed: 12 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
767 | 766 | | |
768 | 767 | | |
769 | 768 | | |
| |||
784 | 783 | | |
785 | 784 | | |
786 | 785 | | |
787 | | - | |
| 786 | + | |
| 787 | + | |
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
| |||
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
804 | | - | |
| 804 | + | |
| 805 | + | |
805 | 806 | | |
806 | 807 | | |
807 | 808 | | |
| |||
876 | 877 | | |
877 | 878 | | |
878 | 879 | | |
879 | | - | |
| 880 | + | |
880 | 881 | | |
881 | 882 | | |
882 | 883 | | |
| |||
901 | 902 | | |
902 | 903 | | |
903 | 904 | | |
904 | | - | |
| 905 | + | |
905 | 906 | | |
906 | 907 | | |
907 | 908 | | |
908 | 909 | | |
909 | | - | |
| 910 | + | |
0 commit comments