Skip to content

bug: agent card resolution ignores --timeout and fails to classify deadline exceeded error #95

Open

Description

@patil-prajwal

Which area does this relate to?

  • CLI code
  • SPEC or COMPLIANCE file
  • Other doc files

What happened?

When executing commands like a2a card get <url> --timeout 10ms or any command resolving an agent card, the --timeout flag is ignored during agent card resolution because resolveCard uses a hardcoded compatCardResolver with a fixed 30-second HTTP timeout and ignores cfg.httpTransport.

Additionally, if context deadline exceeded occurs while resolving the agent card, it is returned as an unclassified error with exit code 1 instead of being classified as CodeTimeout (exit: 5, hint to increase --timeout).

Finally, --wait, --poll-interval, and --timeout flags were missing from the top-level documentation and skill references.

Steps to reproduce

  1. Run a command pointing to a slow or delayed agent card endpoint with a low timeout:
    a2a card get http:// --timeout 10ms
  2. Observe that the request does not terminate at 10ms (it waits up to 30s).
  3. If it times out, observe that the error is not classified as timeout (exit code 1 instead of 5).

CLI version

main (commit cda7982)

Operating system & environment

Windows 11 (x86_64) / All OS

Relevant log output or error messages

failed to resolve agent card: context deadline exceeded
exit status 1

Additional context

Pull request already prepared with fix, tests, and documentation:
#94

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions