agent-mcts is an open-source Python tool that wraps coding-agent command-line programs in Monte Carlo tree search. Rather than letting an agent pursue one sequence of edits and retries, it creates separate branches of work, explores alternatives, and directs more attempts toward promising solutions. Each search-tree node has an isolated Git worktree and agent session, keeping the user’s working tree unchanged until they choose a result to apply. Test commands provide scores: passing earns full credit, while failures can earn partial credit based on the test pass rate. An optional language-model judge also evaluates changes. The terminal interface displays progress, and users can inspect, resume, or apply a branch.
The project is early-stage, and its initial benchmark does not show reliable improvement. In ten runs on each of two harder tasks, tests-only search produced better answers than the first attempt in none, matched it nine times, and did worse once; average score fell 2.2 points, with runs taking about five minutes. Adding an LLM judge yielded four improvements, four ties, and two regressions, with nearly no average score change and roughly five times the time and episode budget. The judge sometimes rescued answers that passed visible tests but missed hidden cases, yet also preferred weaker answers; it ranked two passing attempts correctly in only 38 of 62 comparisons. Claude Code is verified, while the Codex adapter has only been tested with a fake executable and Kimi support is planned.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.