LangGraph Recursion Limit as Infinite Loop Sentinel
criticallangchain_langgraph_recursion_limit_hit fires when graph execution exceeds max depth, often signaling infinite loops, poor graph design, or adversarial inputs. Left unchecked, this consumes resources and inflates costs without useful output.
Alert immediately on any non-zero langchain_langgraph_recursion_limit_hit. Correlate with langchain_langgraph_node_invocation counts (which nodes are hot) and langchain_langgraph_checkpoint_size growth (ballooning state). Check if specific user inputs or metadata patterns trigger loops.
Investigate graph topology for cycles without proper termination conditions. Add explicit max-iteration guards or cycle-breaking logic. Use LangSmith trace views to identify looping node sequences. Tag problematic inputs and filter or preprocess them upstream.