Skip to content

[Feature Request] Give Google ADK Go model, MCP and A2A Activities a 10-second default heartbeat timeout #511

Closed

Description

@campoy

Is your feature request related to a problem? Please describe.

In Google ADK Go, InvokeModel gets a 30-second HeartbeatTimeout only when it streams (WithStreaming). The MCP and A2A Activities get none. They all heartbeat on a timer, but only when a heartbeat timeout is set. So by default:

  • A cancel never reaches a running MCP call, A2A send, or model call that doesn't stream. It runs to the end. A streamed model call hears it, but slowly.
  • A lost worker goes unnoticed until the start-to-close timeout: 2 minutes for a model call, 1 minute for the others.

This is the Google ADK Go part of #491.

Describe the solution you'd like

  • Default HeartbeatTimeout to 10 seconds for InvokeModel (streamed or not), ListMcpTools, CallMcpTool, ResolveA2AAgentCard, SendA2AMessage and CancelA2ATask. A timeout you set wins.
  • A negative HeartbeatTimeout turns heartbeats off. In Go, zero already means "not set". Today the server rejects a negative one and the workflow task fails, so no working code changes meaning. If we ever need more, we can add a boolean.
  • Heartbeat every half of the timeout, like the other plugins, with the first heartbeat half the timeout into a call instead of as soon as it starts. Then a short call sends none.
  • Document it all in the README, with the cancel's limits: the server caps its heartbeat timeout at its 5-second start-to-close timeout, and nothing cancels a cancellation, so its heartbeats only notice a lost worker.
  • ActivityAsTool runs your own Activity, so it stays as it is.

Additional context

What does it cost? In Temporal Cloud, each heartbeat that reaches the server is an Action. With the first one 5 seconds in, a shorter call sends none, and a 30-second call sends four. I counted them against a dev server.

Activity

  1. added
    enhancement
    on Nov 13, 2026
  2. added a commit that references this issue on Nov 13, 2026
    4bd0339
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions