-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
Bug summary
When max_tool_steps is reached during the voice agent tool-calling loop, the pipeline can return early without generating a final LLM response.
This can leave users with silence/no reply after one or more tool calls.
Affected area
livekit-agents/livekit/agents/voice/agent_activity.py
Repro/observations
- In the tool loop, once step count exceeds configured
max_tool_steps, current behavior logs a warning and returns - Tool results are already available in context, but no final text-only response is forced
- End-user experience is an abrupt stop instead of a summarized answer
Why this is a bug
Hitting a tool-step limit should end tool execution, not user communication. The agent should produce a final response with gathered results rather than silently stopping.
Proposed fix
Tracked in PR:
That PR removes the silent early return behavior and forces a final non-tool LLM response when the limit is reached.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels