-
Notifications
You must be signed in to change notification settings - Fork 325
Closed
Closed
Copy link
Description
What happened?
Bug Description
The get_card() method in JsonRpcTransport has a critical bug where it returns a stale local variable instead of the updated extended card after fetching authenticated extended card data.
Steps to Reproduce
- Create
JsonRpcTransportwith a basic agent card thatsupports_authenticated_extended_card = True - Call
get_card()method - Method fetches extended card from server but returns the original basic card
Expected Behavior
Method should return the newly fetched extended card with additional authentication capabilities.
Actual Behavior
Method returns the original basic card, missing extended authentication information.
Root Cause
- Line 283: Local variable
cardcaptures initial agent card state - Line 314:
self.agent_cardis updated with new extended card from server - Line 427: Method incorrectly returns stale
cardinstead of updatedself.agent_card
Impact
- Authentication flows may fail due to missing extended capabilities
- Silent failure - no exceptions thrown, making it hard to detect
- Callers receive incorrect card information
Proposed Solution
Change return statement from return card to return self.agent_card on line 427.
Environment
- File:
src/a2a/client/transports/jsonrpc.py - Method:
JsonRpcTransport.get_card() - Line: 427
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels