Coding agent writes scheduling solvers that beat commercial tools on benchmarks
A preprint reports that Claude Code, using only free software, wrote factory-scheduling programs. On the same computer, these came closer to the best possible result than the paid solvers CP Optimizer and Hexaly. The advantage held on large, regular test problems, but not on every problem type.


What the study shows
Researchers in Brazil and Canada tested whether an AI coding agent can stand in for a commercial optimisation solver. A solver is software that searches for the best plan under constraints. The agent was Claude Code, a command-line tool that writes, runs and revises its own programs. It had no access to commercial solvers. The work is a preprint and has not been peer reviewed.
The test problems are job shops: jobs must pass through machines in a set order, and one machine handles one job at a time. The goal is the shortest makespan, the time until the last job finishes. Each problem also has a lower bound, a proven floor that no schedule can beat. A separate checker, sharing no code with the agent, verified every schedule. The authors say they report every run, including failures.
The largest problem has 100 jobs, 1,000 machines and 100,000 operations. After 42 minutes of a session, the agent changed its approach. It fixed a target finish time and gave each operation a time window that guaranteed that target. It then removed machine clashes one by one. With 30 minutes on 16 cores, the resulting program ended about 0.6% above the floor. On the same machine and budget, CP Optimizer ended about 4% above and Hexaly about 3.3% above.
The same program, unchanged, was run on nine sister problems of the same size. It beat the previous best-known result on all ten and reached the floor on two, which proves those schedules optimal. A later 24-hour campaign, run by the agent itself, brought this to four of ten.
On a second family, flexible job shops where each step can use one of several machines, an agent-written search program improved the best-known result on 11 of 32 unsolved problems. A third family adds two transport robots that carry jobs between machines. Here the agent's program beat all valid published results on 7 of 10 problems. On a different set of 21 transport problems, where machine time matters more than travel, a published approach based on CP Optimizer did better on 20.
Results varied a lot between sessions. On the largest job shop, single sessions ended anywhere from about 1% to about 6% above the floor. The session that wrote the best program took 101.6 minutes and cost US$10.07 in usage charges.
Our reading
In our reading, the main lesson is about specialisation, not raw intelligence. Commercial solvers must work on any problem a customer brings. The agent only had to work on one. On the big job shop, it noticed that machines sat idle about 90% of the time while jobs were almost always busy. It built a method around that fact. The authors say this specialisation appears to be the main source of the advantage, and the results support that view.
The most useful output is a program, not a schedule. When the agent itself produced schedules, quality swung widely from session to session. When it wrote a reusable solver, results became repeatable with fixed random seeds, auditable as source code, and cheap to rerun. A plant that schedules the same kind of line every day could have an agent write a solver once, then run it nightly at the cost of computer time.
The loss on the 21 machine-heavy transport problems matters as much as the wins. A solver tuned to robot routing could not shorten schedules where machines were the bottleneck. Tailored code is strong on the structure it was built for and can be weak elsewhere. Anyone using this approach needs to test it on problems that look like their real ones.
Read the rest of this story
Membership is free. You get every article in full and the Issue every Sunday.
We send a sign-in link, no password needed. Already a member? Sign inReadiness assessment
| Level | Status | Evidence |
|---|---|---|
| I Lab only | Met | Research prototypes and benchmark experiments exist for all three problem families. |
| II Benchmarked | Met | Results are reported on public benchmarks (JSPLib, FJSPLib, the Homayouni and Fontes transport benchmark). Every schedule is checked by an independent checker. Same-hardware runs of CP Optimizer, Hexaly and CP-SAT are included. |
| III Open source | Met | A public repository holds instance files, certified schedules, checkers, solver source code, run commands and logs. The paper does not state a software licence, so reuse terms are unconfirmed. |
| IV In production | Not yet | No named organisation is documented using these solvers in production. All instances are academic benchmarks. |
What would move it up
Documented use by a named company on its own scheduling data, with real constraints. Independent replication, and tests across other model providers and problem types, would also strengthen the case. Tuned commercial-solver baselines would help too.
The study
Andre Albrecht, Enzo Morosini Frazzon, Leandro C. Coelho et al.. Agent-written heuristics versus commercial solvers on unsolved job-shop benchmark instances. arXiv, 13 November 2026. Read the paper
Notes
- Albrecht, Frazzon, Coelho and Vieira, Agent-written heuristics versus commercial solvers on unsolved job-shop benchmark instances. arXiv preprint, 13 November 2026, CC BY 4.0. Source
- Public repository with instances, certified schedules, independent checkers, solver source code, logs and task texts. No software licence is stated in the paper. Source
- On tai_100_1000_1, lower bound 522,298. Agent solver 525,515 (30 min, 16 single-core workers, 0.62% gap). Same-workstation runs at 30 min, 16 cores: CP Optimizer 22.2, 543,034 (3.97%); Hexaly 15.0, 539,566 (3.31%). Previous best known: OptalCP, 533,080 (180 min, 16 workers, other hardware).
- Across the ten 100 x 1000 instances at 30 min with 16 cores: agent solver 0 to 1.6% above the lower bound, CP Optimizer 2.6 to 5.3%, Hexaly 2.4 to 4.2%.
- Flexible job shops (Behnke and Geiger): at 1,200 s on open instances, mean deviation from best known +0.24% for the agent tabu search, +0.79% for CP Optimizer, +2.01% for Hexaly. Improved 11 of 32 open instances in modes A and B; 18 of 32 and six closed after the mode C campaign.
- Readiness: level III, open source available. Code and logs are public; no documented production use by a named organisation.
Edited and signed by
Stefan PerdalEditor and publisher86 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
