Skip to content

fix: set required Type field in BetaManagedAgentsEventParams helpers#316

Open
ryanlitalien wants to merge 1 commit intoanthropics:mainfrom
ryanlitalien:fix/set-type-in-event-helpers
Open

fix: set required Type field in BetaManagedAgentsEventParams helpers#316
ryanlitalien wants to merge 1 commit intoanthropics:mainfrom
ryanlitalien:fix/set-type-in-event-helpers

Conversation

@ryanlitalien
Copy link
Copy Markdown

Summary

  • BetaManagedAgentsEventParamsOfUserMessage and BetaManagedAgentsEventParamsOfUserCustomToolResult helper functions omit the required Type field, causing 400 Bad Request when calling POST /v1/sessions/{id}/events
  • Sets Type automatically in both helpers, matching the pattern used by OfUserInterrupt and OfUserToolConfirmation
  • Adds unit tests verifying the type field is present in marshaled JSON

Fixes #315

Test plan

🤖 Generated with Claude Code

BetaManagedAgentsEventParamsOfUserMessage and
BetaManagedAgentsEventParamsOfUserCustomToolResult omitted the required
Type field, causing 400 Bad Request when sending session events.

Fixes anthropics#315

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ryanlitalien ryanlitalien requested a review from a team as a code owner April 11, 2026 16:28
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.

BetaManagedAgentsEventParamsOfUserMessage helper omits required Type field

1 participant