Skip to content

fix: Claude Code provider captures response via subtype='success'#286

Merged
AbirAbbas merged 1 commit intomainfrom
fix/claude-provider-subtype-success
Mar 18, 2026
Merged

fix: Claude Code provider captures response via subtype='success'#286
AbirAbbas merged 1 commit intomainfrom
fix/claude-provider-subtype-success

Conversation

@AbirAbbas
Copy link
Contributor

Summary

  • Fix HarnessResult.result always being None when using the Claude Code provider
  • The Claude Agent SDK sends the final result message with subtype: "success" (not type: "result"), so the provider never matched it
  • Added test covering the actual SDK message format

Fixes #252

Test plan

  • Existing tests still pass (legacy type: "result" format)
  • New test test_execute_extracts_result_from_subtype_success verifies the real SDK format
  • Manual verification with claude-agent-sdk installed

🤖 Generated with Claude Code

The Claude Code provider checked for type=='result' to extract the response
text, but the Claude Agent SDK sends the final message with subtype=='success'
(no type field). This caused HarnessResult.result to always be None.

Fixes #252

Co-Authored-By: Claude <noreply@anthropic.com>
@AbirAbbas AbirAbbas requested a review from a team as a code owner March 18, 2026 14:59
@github-actions
Copy link
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Python 9.3 KB +4% 0.33 µs -6%

✓ No regressions detected

@AbirAbbas AbirAbbas merged commit a698c32 into main Mar 18, 2026
27 checks passed
@AbirAbbas AbirAbbas deleted the fix/claude-provider-subtype-success branch March 18, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Code Provider Does Not Capture Response Text — HarnessResult.result is always 'None' due to Incorrect Message Type Check

1 participant