# Static checker finds agent workflow bugs that CodeQL and built-in validators miss

A preprint describes a tool that reads the wiring of an AI agent workflow before it runs. It flags loops with no exit, lost updates and misrouted steps across six popular frameworks, including LangGraph and AutoGen.

- Category: Agents
- Readiness level: III (Open source) on Science Underway's four-step scale, as proposed
- Published: 2026-11-24
- Editor: Stefan Perdal
- URL: https://scienceunderway.com/articles/static-checker-finds-agent-workflow-bugs-that-codeql-and-built-in-validators-mis

## The study

Automated Safety Analysis for Agentic Workflows (preprint, not peer reviewed). arXiv 2611.28469. https://arxiv.org/abs/2611.28469

## At a glance

- What it shows: A checking tool can spot design flaws in AI agent workflows before they are switched on, such as a loop that never stops. On 135 real bugs it caught most of them and raised few false alarms. It also found 36 new bugs in public projects, and maintainers confirmed or fixed all 36.
- What it does not show: It does not show that the tool prevents harm in live systems, because no company reports using it yet. It also does not cover attacks such as prompt injection, or plain mistakes by the AI model.
- Why it matters: Agent workflows can spend money, delete data and act in the world. A cheap check before launch could stop wiring mistakes that today are found only after something goes wrong.

## What the study shows

An agent workflow is a program that links AI model calls, tools and decision steps into a fixed chain. Developers build them with frameworks such as LangGraph, AutoGen, Haystack and Microsoft's Agent Framework. The authors focus on what they call workflow bugs. These are mistakes in how the steps are wired together, not in the model's answers. One example they cite is a research pipeline whose checking step always sent work back to the analysis step, so the loop never ended. In the incident they describe, a run like this built up a $47,000 bill.

The tool, called APSIS, is a static analyser: it inspects the workflow without running it. It first converts each framework's code into one shared graph format. The graph records the steps, the links between them and any shared data. It also notes how each step behaves, for example whether an input is required or how two writes to the same data are merged. Twelve rules then search this graph for known bug patterns and point to the exact step at fault.

To build and test the rules, the authors gathered 861 bug reports from 13 open-source frameworks. They grouped the workflow bugs into six types, such as stalled or runaway loops, broken handoffs of data and corrupted shared state. About three quarters of the bugs could not be seen from the shape of the graph alone. They depended on how a step was set up to behave.

The test set has 135 real bugs from six frameworks, each paired with the fix the maintainers accepted. The authors report that APSIS flagged 84% of the bugs. When it raised an alarm, it was right 91% of the time. It took under a second per workflow. The frameworks' own validators caught none of the bugs. CodeQL, a general code analysis tool from GitHub, caught about 7%.

Three large language models were also asked to judge each workflow: GPT-5.5, Opus-4.8 and DeepSeek-V4. They caught many bugs but also flagged about half or more of the already fixed versions as buggy. When they also had to name the right type of bug, they caught well under half.

The authors then ran APSIS on more than 40 active open-source agent projects. They report 36 previously unknown bugs in 21 repositories. Maintainers fixed 33 and confirmed 3. Examples include a lost update in a sample workflow shipped with NVIDIA's NeMo Agent Toolkit, and a routing error in LangChain that crashed with a missing-key error.

The paper is a preprint and has not been peer reviewed in this form. It states that it is an extended version of a paper accepted at ICSE 2027, a major software engineering conference.

## Our reading

In our reading, the most useful finding is how little current tools catch. Every one of the 135 bugs passed the framework's own checks. These are not exotic failures. They include a step that is never connected, a route to a step that does not exist, and two parallel steps that overwrite each other's results. Each looks fine in isolation, which is why ordinary code checks miss them.

The comparison with language model judges is also telling. The models found many bugs, but they also raised alarms on a large share of correct workflows. A check that cries wolf on half of all clean code would soon be ignored in a build pipeline. A rule-based check is narrower, but it is predictable and it names the faulty step.

A practical example: a team fans a batch of documents out to parallel summary steps that all write to one shared list. With small test batches it works. With a large batch, two steps finish together and one summary silently disappears. This is the NeMo case the authors describe, and a check like this would flag it before launch.

The rest of the article (what it means, limits, what to watch) is free for members: https://scienceunderway.com/articles/static-checker-finds-agent-workflow-bugs-that-codeql-and-built-in-validators-mis

## How this was made

An AI model read the study and wrote this article in the structure Science Underway uses. An editor reviewed it and approved it for publication. Check the original study before you rely on the details.

---
Source: Science Underway, https://scienceunderway.com/. Please link to the article when you cite it.
