Back to Blog
August 16, 2026Biweekly Report 05

Plugins, Deep Bug Detection, and Cost Estimation

Customize the correctness pipeline, find multiple bugs in each function, and understand expected resource usage before analysis.

In the past two weeks, FM-Agent received 13 new issues and 25 pull requests, closed 12 issues, processed 14 pull requests, made 54 commits, and added 4,386 lines of code.

This release was contributed to by Qiaoyi Zheng, Xiaoyu Zhang, Zhe Jiang, Yihan Liu, and Xian Xu.

Extensible Plugin System

Plugins let developers customize pipeline stages—including function extraction, call-graph construction, specification generation, correctness reasoning, and bug reproduction—without changing FM-Agent's core code.

Each stage supports three control modes: pass skips the built-in stage, replace runs a plugin function instead, and modify keeps the built-in stage while running hooks before and after it. Plugins exchange stage data through FM-Agent's input and output files.

plugins/
└── example_plugin/
    ├── plugin.json
    ├── plugin.py
    └── prompts/
        └── custom_workflow.md

The directory name must match the name in plugin.json. Hooks use a common signature:

def hook(proj_dir: str) -> None

Hooks should be idempotent because they can run repeatedly. List and select plugins with:

uv run python main.py --list-plugin
uv run python main.py <proj_dir> --plugin example_plugin

Plugins are trusted Python code, not sandboxed extensions. Load only plugins from trusted, reviewed sources.

Deeper Correctness Detection

By default, FM-Agent stops checking a function after finding its first bug. The new mode continues reasoning and reports multiple independent problems from the same function:

uv run python main.py <proj_dir> --all-bugs
uv run python main.py <proj_dir> --incremental intent.md --all-bugs
uv run python main.py <proj_dir> --resume --all-bugs

Reports use ordered names such as function.bug-001.json. A run started with --all-bugs must also use it when resuming.

Pre-Run Cost Estimation

Estimate mode scans the target without calling an LLM or starting formal analysis. It shows included and excluded directories and files, approximates the number of functions, and predicts duration, LLM calls, token usage, and cost:

uv run python main.py <proj_dir> --estimate
uv run python main.py <proj_dir> --estimate --submodule src/core src/runtime

Predictions are ranges derived from successful runs stored in history.jsonl and scaled by function count, with file count as a fallback. They are estimates because code complexity and runtime environments vary.