Skip to content

Go SDK: agent's outbound call timeout is hardcoded to 15s, not configurable #720

Description

@santoshkumarradha

Summary

agent.New() (Go SDK) hardcodes a 15-second timeout on the http.Client used for every outbound call the agent makes as a client — cross-agent srv.Call(...), and (separately) the control-plane memory backend's HTTP requests. There's no Config field to override it.

// sdk/go/agent/agent.go
httpClient := &http.Client{
    Timeout: 15 * time.Second,
}

Impact

Any reasoner chained behind srv.Call(...) that can legitimately take longer than 15 seconds end-to-end causes the caller to fail with a client-side timeout, even though the callee is still working and will complete successfully on its own. This is not theoretical: it reproduces immediately with any reasoning-model-backed reasoner (DeepSeek-R1/V3-style "thinking" models, o1-style models, etc.) doing a modest amount of work — a search call plus a large max_tokens reasoning response routinely exceeds 15s. The error surfaces as:

perform execute call: Post ".../api/v1/execute/<node>.<reasoner>": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

This makes any multi-hop / recursive reasoner graph (agent calling agent calling agent) that uses a slower model unreliable by default, with no way to fix it from the caller's config.

Repro

  1. Register a serverless node with a reasoner that calls a reasoning-capable model with a generous max_tokens budget (anything that reliably takes >15s wall-clock).
  2. Have a second reasoner invoke it via srv.Call(ctx, "node.reasoner", input).
  3. The call fails with the context-deadline error above, while the callee's own execution (visible in the control plane) completes successfully after the caller has already given up.

Fix

Add a CallTimeout time.Duration field to agent.Config, defaulting to the existing 15s when unset (no behavior change for anyone not hitting this), and use it to construct the client's http.Client.

Acceptance criteria

  • agent.Config.CallTimeout exists; unset defaults to 15s (unchanged default behavior).
  • Setting it changes the actual http.Client.Timeout used for outbound calls.
  • Test coverage for both the default and the override.

Metadata

Metadata

Labels

bugSomething isn't workingenhancementNew feature or requestsdk:goGo SDK related

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions