copilot-sdk icon indicating copy to clipboard operation
copilot-sdk copied to clipboard

Handle empty Go tool names as failed tool results

Open slegarraga opened this issue 5 months ago • 0 comments

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.handlePendingToolCall payload

Validation

  • gofmt -w go/session.go go/session_test.go
  • go test ./... -run TestSession_HandleBroadcastEventRespondsToMissingToolName -count=1
  • go test $(go list ./... | grep -v '/internal/e2e')\n\nNot run locally:\n- golangci-lint run ./... (golangci-lint is not installed in this environment)\n- full go test ./... (the internal/e2e package run did not complete locally without the shared E2E setup)

slegarraga avatar Jun 10 '26 13:06 slegarraga