Skip to content

[BUG] A2A - completed requested ignored #3899

@chk0301

Description

@chk0301

Description

hi, A2A remote agent call responds message properly with status "completed", but A2A server is ignoring it and delegating same request to the same agent again. Remote agent respond again with same answer and status "completed. This repeats until multi-turn = 10 and Server agent terminates (max - turn reached)

Steps to Reproduce

use existing code A2A server crew and A2A remote crew

Expected behavior

after response with status "completed" is received, the server agent does not delegates again,

Screenshots/Code snippets

here is where the "loop" get started

A2A/wrapper.py _delegate_to_a2a(

        if a2a_result["status"] in ["completed", "input_required"]:
            final_result, next_request = _handle_agent_response_and_continue(
                self=self,
                a2a_result=a2a_result,
                agent_id=agent_id,
                agent_cards=agent_cards,
                a2a_agents=a2a_agents,
                original_task_description=original_task_description,
                conversation_history=conversation_history,
                turn_num=turn_num,
                max_turns=max_turns,
                task=task,
                original_fn=original_fn,
                context=context,
                tools=tools,
                agent_response_model=agent_response_model,
            )

            if final_result is not None:
                return final_result

            if next_request is not None:
                current_request = next_request

            continue

Operating System

Windows 11

Python Version

3.12

crewAI Version

1.3.0

crewAI Tools Version

n/a

Virtual Environment

Venv

Evidence

code attached

Possible Solution

why when status = completed, the process of

final_result, next_request = _handle_agent_response_and_continue(

needs to be done again .. it's final.

Additional context

server agent (standalone, just execute. ensure .env contains model, key and url. I was using gpt.4.1

MultiAgentChat_light.py

and remote agent. (ensure .env exists), start main.py

agent.py
agent_executor.py
main.py

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