Skip to content

Commit a04bf5e

Browse files
declan-scaleclaude
andcommitted
test(harness): exercise ToolResponseContent.is_error in parallel-tools fixture
The field landed (AGX1-371), so the failing tool in the parallel-tools fixture now sets is_error=True instead of relying on the "Error: ..." string convention. The deriver threads it onto CloseSpan.is_error and the cross-channel span-signal equivalence covers the error status. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a6ee42d commit a04bf5e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/lib/core/harness/conformance/test_conformance.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,10 @@
174174
# an error. It guards against the two channels agreeing with each other while
175175
# both mishandling interleaved/parallel spans or a failing tool.
176176
#
177-
# The tool error is represented the way the harness encodes it today — an
178-
# "Error: ..." string in ToolResponseContent.content (see
179-
# claude_agents/hooks/hooks.py post_tool_use_failure_hook). Once the deferred
180-
# ToolResponseContent.is_error field lands (AGX1-371), extend this fixture to
181-
# assert the error status propagates onto the closed tool span.
177+
# The failing tool sets ToolResponseContent.is_error=True (AGX1-371), which
178+
# the span deriver threads onto the closed tool span's CloseSpan.is_error.
179+
# Both channels feed the same deriver, so the recorded span signals — error
180+
# status included — must match.
182181
Fixture(
183182
name="parallel-tools-with-error",
184183
events=[
@@ -217,6 +216,7 @@
217216
tool_call_id="p-ls",
218217
name="Bash",
219218
content="Error: ls: /nope: No such file or directory",
219+
is_error=True,
220220
),
221221
),
222222
# p-read succeeds and closes second.

0 commit comments

Comments
 (0)