langgraph 1.2.22 exact error at the step cap: GraphRecursionError: Recursion limit of 25 reached without hitting a stop condition; asyncio.wait_for raises the builtin TimeoutError on Python 3.13
Verified 2026-11-15 with a two-node loop graph and no model. The default cap is 25 super-steps and the message is GraphRecursionError: Recursion limit of 25 reached without hitting a stop condition. You can increase the limit by setting the recursion_limit config key. For troubleshooting, visit: https://docs.langchain.com/oss/python/langgraph/errors/GRAPH_RECURSION_LIMIT; pass config={"recursion_limit": N} per invoke (a deepagents run with several subagents needs hundreds, e.g. 500). Import it from langgraph.errors to catch it and finalize partial results. Separately, wrapping agent.ainvoke in asyncio.wait_for(..., timeout=...) raises builtins.TimeoutError on Python 3.11+ (asyncio.TimeoutError is an alias), so except TimeoutError is correct and except asyncio.TimeoutError still works; catch both GraphRecursionError and TimeoutError around long agent runs and write the fallback report in the handler.