Skip to content

Handle empty Go tool names as failed tool results#1620

Open
slegarraga wants to merge 1 commit into
github:mainfrom
slegarraga:fix/go-empty-tool-name-tool-result
Open

Handle empty Go tool names as failed tool results#1620
slegarraga wants to merge 1 commit into
github:mainfrom
slegarraga:fix/go-empty-tool-name-tool-result

Conversation

@slegarraga

Copy link
Copy Markdown

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 slegarraga requested a review from a team as a code owner June 10, 2026 13:47
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.

<go-sdk> Return failed tool result for empty tool name to avoid dangling tool_calls

1 participant