Skip to content

[Bug]:Intermittent "Retries exhausted: 2/2" error in multi-agent workflows and request for execution trace retrieval #899

@ingdex

Description

@ingdex

AgentScope-Java is an open-source project. To involve a broader community, we recommend asking your questions in English.

Describe the bug
I am developing a multi-agent system using the AgentScope Java framework and encountering an intermittent issue where specific agent queries fail unexpectedly.

Problem Description:
During execution, the process occasionally terminates prematurely with the following raw event error:
rawEvent={error=Retries exhausted: 2/2}

After this event is returned, the agent output stops immediately without further recovery or fallback logic. Given that AgentScope is designed to provide production-ready tools and comprehensive runtime intervention mechanisms to address common challenges in agent development 1, I expected the system to handle transient failures more gracefully or provide clearer recovery paths rather than halting execution after exactly two retries.

However, I have set the execute config of supervisor agent like this:

ExecutionConfig modelConfig = ExecutionConfig.builder()
                .timeout(Duration.ofMinutes(2))
                .maxAttempts(3)
                .build();

        return ReActAgent.builder()
                .name("SupervisorAgent")
                .sysPrompt(sysPrompt)
                .model(
                        DashScopeChatModel.builder()
                                .apiKey(apiKey)
                                .modelName("qwen-plus")
                                .stream(true)
                                .enableThinking(false)
                                .formatter(new DashScopeChatFormatter())
                                .build())
                .modelExecutionConfig(modelConfig)
                .memory(new InMemoryMemory())
                .toolkit(toolkit)
                .toolExecutionContext(context)
                .build();

Questions:

Root Cause & Configuration: What are the common causes for the "Retries exhausted: 2/2" error in a multi-agent setup? Is there a configuration option within the agent-config or runtime settings to adjust the retry policy or timeout thresholds to prevent premature termination?
Execution Tracing: To diagnose the root cause of these intermittent failures, I need to inspect the internal execution flow. How can I retrieve or enable detailed execution traces (logs) for the AgentScope Java runtime? Specifically, I am looking for a mechanism to capture the step-by-step reasoning, tool calls, and state changes leading up to the retry exhaustion.

Environment (please complete the following information):

  • AgentScope-Java Version: 1.0.8
  • Java Version: 17

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions