agent-mcts
Give your coding agent a search tree: try many fixes, score them, keep the best, and stop guessing in a straight line.
Project intro
agent-mcts turns any coding agent into a tree-searching agent. Instead of one straight run that either works or fails, it wraps your agent — Claude Code today, Codex next — in Monte Carlo tree search: it tries several different fixes, scores each one, backtracks from dead ends, and spends its budget on the most promising branch. It has 14 stars and 1 fork on GitHub, and it is early software at version 0.4.
Every attempt runs in its own isolated git worktree with its own agent session, so your working files are never touched until you choose to apply a result. You watch the tree grow live in your terminal, and when the search finishes you get the best branch plus the command to apply it.
The author's own small benchmark is honest about the limits: on tasks with a written spec, generating tests first and scoring attempts against them improved the answer in 16 of 20 runs, while plain search barely beat a single run — and on a vague bug report the test writer made the same mistake as the bug, so the tool returned the unfixed code. It helps most when the task is specific enough to test.
It is written in 100% Python, installs with uv, and works with your installed agent and test command — it asks for a budget and your go-ahead before spending anything. It is free under the MIT license, and the latest commit landed on 22 November 2026.
Actions
Tech stack
Project info
- Project category
- Developer Tools
- Project status
- Online
- Collaboration intent
- None