Skip to content

Explain an unresolvable agent address in agents chat - #60

Merged
esnible merged 1 commit into
mainfrom
chat-dns-hint
Aug 13, 2026
Merged

Explain an unresolvable agent address in agents chat#60
esnible merged 1 commit into
mainfrom
chat-dns-hint

Conversation

@esnible

@esnible esnible commented Aug 13, 2026

Copy link
Copy Markdown
Member

Resolves #59

agents chat speaks A2A directly to the agent, at the URL from its agent card, so a cluster-internal hostname fails with no such host even though the API server was reachable enough to serve the card. That failure now explains itself on stderr:

Hint: `agents chat` talks A2A directly to the agent, at the URL from its agent-card
endpoint — that hostname has to resolve from here, which a cluster-internal one may
not. Pass --address http://<route>:<port> to name a reachable URL.
For example: --address http://orders.team1.localtest.me:8080
Error: failed to send HTTP request: Post "http://orders.team1.svc.cluster.local:8080": ...

It would be better if the API server gave a better URL for the agent card, but I chose to contain this as a hint within the CLI.
Assisted by Claude.

Signed-off-by: Ed Snible snible@us.ibm.com

`agents chat` speaks A2A straight to the agent, at the URL from its agent
card, so a cluster-internal hostname fails with "no such host" even though
the API server was reachable enough to serve the card. Report that on
stderr and suggest --address, with an example built from the agent's own
namespace and name.

Matched on *net.DNSError with IsNotFound rather than the error text: the
a2a client wraps the failure twice over, but the chain survives errors.As,
and the type keeps a nonexistent name distinct from a resolver timeout or
a refused connection. The hint is supplied by `agents chat` rather than
built in the shared send path, so `a2a send` stays silent about an address
its user typed.

Assisted by Claude.

Signed-off-by: Ed Snible <snible@us.ibm.com>
@esnible
esnible merged commit 0d8cfe4 into main Aug 13, 2026
2 checks passed
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.

feature: chat failure message need more context

1 participant