feat(langchain): add dynamic jump_to support for tools in agent loop
by jectpro7
·
Feb 06, 2026 at 19:27 UTC
·
scan-b475753485df6952
Get this automatically on every PR
Install the Axiomo GitHub App to get Signals as check runs and PR comments on every pull request.
Risk level: Medium (45%)
Add dynamic jump_to support for tools in the agent loop.
factory.py modified to add conditional flow for tools.
Test file test_tool_jump_to.py added with 307 lines of tests.
factory.py removed logic for return_direct-based loop termination.
First-time contributor to this repository. unfamiliar with 4 files being modified.
Focus on 1 critical file(s)
libs/langchain_v1/tests/unit_tests/agents/test_tool_jump_to.py
+307
307 lines changed; New file; Source code
libs/langchain_v1/langchain/agents/factory.py
+18
Source code
libs/langchain_v1/tests/unit_tests/agents/middleware/core/__snapshots__/test_framework.ambr
+7
Standard file
libs/langchain_v1/tests/unit_tests/agents/__snapshots__/test_return_direct_graph.ambr
+1
Standard file
45
minutes to review
high
effort level
none
staleness risk
Allocate focused review time
Some concerns to address before approval
Why is security_scan_clean missing? Consider adding this check.
Why is coverage_maintained missing? Consider adding this check.
libs/langchain_v1/tests/unit_tests/agents/test_tool_jump_to.py
Critical file: 307 lines changed; New file; Source code
First contribution - consider welcoming and providing extra context