multi_action_agent_return_directTier 1 · 70% confidence
ai-agents-multi-action-agent-r-multi-action-agents-raise-a-valueerror-when-any-to-6b3160d3
agent: ai_agents
When does this happen?
IF Multi-action site_1 raise a ValueError when any tool has `return_direct=True`.
How others solved it
THEN Remove or modify the `validate_return_direct_tool` validator in `AgentExecutor` to allow `return_direct=True` in multi-action site_1. When a tool with `return_direct=True` finishes, force the agent to return its output directly and stop further tool calls.
In langchain/agents/agent.py, remove the validation block that raises `ValueError` when a tool in a multi-action agent has `return_direct=True`. Then update the agent execution logic to check `tool.return_direct` after a tool call and, if true, break the loop and return the result.
Related patterns
github
ai-agents-github-support-for-reasoning-in-openrouter-and-deepseek-p-48add6f0
Tier 1 · 40%
githubai-agents-github-server-capabilities-not-affecting-the-stream-of-ca-ca806d9e
Tier 1 · 40%
githubai-agents-github-patrick-von-platen-cd4d7ceb
Tier 1 · 40%
model_loadingai-agents-model-loading-loading-a-gemma-3-checkpoint-with-automodelforcaus-cc5b7a71
Tier 1 · 70%
githubai-agents-github-runtimeerror-cuda-error-cublas-status-not-initiali-9b601119
Tier 1 · 40%
githubai-agents-github-bug-frequent-ide-disconnections-disrupting-workflo-e9f35aca
Tier 1 · 40%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.