copilot-sdk
copilot-sdk copied to clipboard
Handle empty Go tool names as failed tool results
Fixes #1540.
Summary
- return a structured failed pending-tool-call result when the Go broadcast path receives an empty tool name with a valid tool call id
- keep the missing-tool-call-id case unchanged, since a provider-visible tool result cannot be associated without an id
- add a regression test that verifies the JSON-RPC
session.tools.handlePendingToolCallpayload
Validation
gofmt -w go/session.go go/session_test.gogo test ./... -run TestSession_HandleBroadcastEventRespondsToMissingToolName -count=1go test $(go list ./... | grep -v '/internal/e2e')\n\nNot run locally:\n-golangci-lint run ./...(golangci-lintis not installed in this environment)\n- fullgo test ./...(theinternal/e2epackage run did not complete locally without the shared E2E setup)