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.
scienceunderway.com/articles/static-checker-finds-agent-workflow-bugs-that-codeql-and-built-in-validators-mis

AI illustrationWhat 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 this story is for members. Membership is free: read it at scienceunderway.com/articles/static-checker-finds-agent-workflow-bugs-that-codeql-and-built-in-validators-mis
Read the rest of this story
Membership is free. You get every article in full, and can save stories and follow topics.
We send a sign-in link, no password needed. Already a member? Sign inReadiness assessment
| Level | Status | Evidence |
|---|---|---|
| I Lab only | Met | The paper describes a working tool and design with a formal rule language and an intermediate representation. |
| II Benchmarked | Met | Evaluated on a 135-bug benchmark with 270 workflows, compared against CodeQL, native validators and three LLM judges. The suite was built by the authors, and is stated to be reproducible, but is not an established public benchmark. |
| III Open source | Met | The paper says APSIS is open source (about 4,900 lines of Rust) and that the tool and benchmark suite are available at a Zenodo DOI: https://doi.org/10.5281/zenodo.24408668. Not independently checked. |
| IV In production | Not yet | No documented production use by a named organisation. Maintainers merged fixes for bugs it found, but that is not adoption of the tool in a pipeline. |
What would move it up
Documented use by a named team in a CI pipeline would move it to level 4. Independent replication on held-out workflows, plus reported false-alarm rates on unseen real projects, would also strengthen the case.
The study
Yanju Chen, Ying Li, Bosi Zhang et al.. Automated Safety Analysis for Agentic Workflows. arXiv, 21 November 2026. Read the paper
Notes
- Chen, Li, Zhang, Liu, Wen, Ding, Tian and Feng, Automated Safety Analysis for Agentic Workflows, arXiv preprint 2611.28469, 2026. Extended version of a paper the authors state was accepted at ICSE 2027. Source
- Tool and benchmark suite, as stated in the paper's data availability section. Not independently checked. Source
- Overall results on 270 workflows (135 buggy, 135 fixed): precision 0.91, recall 0.84, F1 0.87, false-positive rate 0.08, median 0.7 s per workflow. Best baseline trailed by 0.18 F1.
- Baselines: native validators recall 0.00; CodeQL recall about 0.07; CodeQL Extended recall 0.17; LLM judges recall 0.77 to 0.88 with false-positive rates 0.49 to 0.67; strict recall 0.39 to 0.44.
- Ablation: structural rules alone gave recall 0.50; adding behavioural rules found 46 more bugs, raising recall to 0.84.
- Example new bug: lost update in NVIDIA NeMo Agent Toolkit map-reduce example. Source
- Example new bug: unresolved route in LangChain create_agent. Source
Edited and signed by
Stefan PerdalEditor and publisher142 stories editedStefan read the study, set the readiness level and approved this story. An AI system found the paper and wrote the first draft.
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.
How we workNo corrections


