Skip to content

fix: defer AgentCard resolution to prevent eager startup failures - #1058

Open
kabir wants to merge 1 commit into
a2aproject:mainfrom
kabir:lazy-agent-card
Open

fix: defer AgentCard resolution to prevent eager startup failures#1058
kabir wants to merge 1 commit into
a2aproject:mainfrom
kabir:lazy-agent-card

Conversation

@kabir

@kabir kabir commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

All three handler implementations (gRPC, JSON-RPC, REST) now store Instance and resolve lazily on first access instead of eagerly in the constructor. This prevents startup failures when the AgentCard producer depends on the HTTP server's bound address, which is not yet available during gRPC service construction at RUNTIME_INIT.

Transport validation is also deferred to first use via an AtomicBoolean guard, consistent with the existing pattern in GrpcHandler.

This fixes #1033

…aproject#1033)

All three handler implementations (gRPC, JSON-RPC, REST) now store
Instance<AgentCard> and resolve lazily on first access instead of
eagerly in the constructor. This prevents startup failures when the
AgentCard producer depends on the HTTP server's bound address, which
is not yet available during gRPC service construction at RUNTIME_INIT.

Transport validation is also deferred to first use via an AtomicBoolean
guard, consistent with the existing pattern in GrpcHandler.

This fixes a2aproject#1033

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Kabir Khan <kkhan@redhat.com>
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.

[Bug]: gRPC reference implementation resolves the Agent Card eagerly, unlike the JSON-RPC and REST ones

1 participant