Skip to content

fix(a2a): report tool confirmation as auth_required - #7812

Open
claxman wants to merge 1 commit into
google:mainfrom
claxman:fix/7810-confirmation-auth-required
Open

claxman wants to merge 1 commit into
google:mainfrom
claxman:fix/7810-confirmation-auth-required

Conversation

@claxman

@claxman claxman commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

Problem:
A2aAgentExecutor reports a tool waiting on human confirmation (adk_request_confirmation) as TASK_STATE_INPUT_REQUIRED. A2A spec 7.6 says that pause is TASK_STATE_AUTH_REQUIRED. Both executor paths only apply that state to adk_request_credential: event_converter._create_status_update_event and LongRunningFunctions._mark_long_running_function_call. A client cannot tell an approval from a clarifying question, and a coordinator relaying the pause reports INPUT_REQUIRED too.

Solution:
Add REQUEST_CONFIRMATION_FUNCTION_CALL_NAME to the auth-required name check in those two places. Other long-running calls stay INPUT_REQUIRED. RemoteA2aAgent already resumes AUTH_REQUIRED and INPUT_REQUIRED the same way, so the reply path is unchanged.

This changes the reported state for clients that branch on INPUT_REQUIRED to detect an ADK confirmation; they will now see AUTH_REQUIRED. No opt-in flag: spec 7.6 requires this state, and a flag would leave the default wrong for every client that does not set it.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

New tests: test_create_status_update_event_confirmation_is_auth_required and test_confirmation_request_maps_to_auth_required. On e3d0ec926 both fail with TASK_STATE_INPUT_REQUIRED where TS_AUTH_REQUIRED is expected.

pytest tests/unittests/a2a/converters tests/unittests/a2a/executor
400 passed, 6 skipped

pyink, isort, ruff clean. mypy on event_converter.py and long_running_functions.py: no issues.

Manual End-to-End (E2E) Tests:

Did not run the issue's ASGI script. The two new tests cover the status-event converter and the LongRunningFunctions path the script exercises.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

test_regular_function_maps_to_input_required and test_create_status_update_event_with_input_required_state cover that non-credential, non-confirmation long-running calls still map to INPUT_REQUIRED.

A2aAgentExecutor treated only adk_request_credential as
TASK_STATE_AUTH_REQUIRED. adk_request_confirmation stayed
INPUT_REQUIRED, so a human approval looked like a clarifying question.

Fixes google#7810
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.

A2aAgentExecutor reports a tool awaiting human confirmation as INPUT_REQUIRED, not AUTH_REQUIRED (A2A spec 7.6)

1 participant