# Local CLI tool to scan LangGraph / LangChain code for unbounded loops and billing exposure

**URL:** <https://forum.langchain.com/t/local-cli-tool-to-scan-langgraph-langchain-code-for-unbounded-loops-and-billing-exposure/5111>\
**Category:** Talking Shop\
**Created:** [November 6, 2026, 8:15pm UTC](https://forum.langchain.com/t/local-cli-tool-to-scan-langgraph-langchain-code-for-unbounded-loops-and-billing-exposure/5111 "2026-11-06T20:15:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blakk](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@Blakk](https://forum.langchain.com/u/Blakk)\
**Post date:** [November 6, 2026, 8:15pm UTC](https://forum.langchain.com/t/local-cli-tool-to-scan-langgraph-langchain-code-for-unbounded-loops-and-billing-exposure/5111/1 "2026-11-06T20:15:14Z")

</div>

Hi all,

Managing financial guardrails inside cyclical graphs or stateful agent loops can get messy. If internal graph conditions drift or encounter unhandled exceptions, the agent can enter an infinite retry loop that drains your keys before an alert triggers.

I open-sourced a developer utility called **`valta-leak`** to address this at the code level.

It’s a local static analysis CLI that scans your scripts to flag missing backoffs and computes a real-time dollar-per-hour exposure ceiling based on live model tokens, not a guessed number.

Source code is open on GitHub:[GitHub - Valta-hq/valta-leak: Static analysis CLI that catches unbounded LLM agent loops, missing retry backoff, and leaked system prompts — with a real dollar-per-hour exposure ceiling computed from actual model pricing, not a guessed number. · GitHub](https://github.com/Valta-hq/valta-leak)

Let me know if you run into any edge cases with LangGraph condition parsing—happy to adjust the rules to support more complex graph setups.
