SWE-Marathon: Evaluating Coding Agents at Billion-Token Scale - Rishi Desai, Abundant AI
AI Engineer · 12 min · 112 sentences · from YouTube's caption track
Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.
- 00:01Hi everyone.
- 00:02My name is Rishi Desai.
- 00:04I'm an ML engineer at Abundant AI, where we build reinforcement learning environments for Frontier Labs.
- 00:11Today, I'm going to talk about SWE Marathon, a benchmark that answers a question that is starting to matter a lot more.
- 00:18Can coding agents stay coherent over a billion token budget?
- 00:23Can they build Slack from scratch?
- 00:26Can they rewrite an entire JAX code base in PyTorch?
- 00:30Can they build a C compiler in Rust?
- 00:34This is what SWE Marathon is trying to measure.
- 00:36What happens when coding agents move from fixing bugs to owning entire projects end to end?
- 00:47There's been a tremendous amount of interest in autonomous agent systems.
- 00:52Anthropic has explored teams of agents building a C compiler.
- 00:57Cloudflare rebuilt the entire Next.js on Vite, completely hands-off with agents.
- 01:04And Cursor has experimented with their days-long running autonomous agent harness.
- 01:11The pattern is that coding agents are being pointed at whole projects, not just GitHub issues or linear tickets.
- 01:20My question is, can we turn some of these Frontier Labs style case studies into reproducible eval tasks?
- 01:32Let's talk about the SWE benchmark lineage.
- 01:36Human Eval asked whether models could write individual Python functions.
- 01:43SWE-bench was a big jump to real GitHub issues, where agents had to inspect a repository, make a patch, and patch some unit tests.
- 01:54Terminal-bench pushed this even further by making each task a full environment with a verifier.
- 02:01So, agents could use a terminal, run bash commands, inspect files, and leave behind a final container state.
- 02:10SWE Marathon takes that environment plus verifier framing and stretches the horizon to project scale work.
- 02:18Multi-hour trajectories and coordinated changes across many, many components.
- 02:23These are literally hundreds of hours of human work compressed into a single agent rollout.
- 02:34But, once you make tasks this long, a big problem shows up.
- 02:39Verification.
- 02:42In a short benchmark, a weak test could just be considered as noise.
- 02:48But, in a multi-hour environment, a weak verifier becomes an attack surface.
- 02:55The agent has hours, a file system, unrestricted network access potentially, and a reward signal.
- 03:02So, it could spend hours probing the verifier instead of actually doing the intended engineering work.
- 03:09That's a big reason why SWE Marathon uses multiple independent checks.
- 03:15We have hidden tests, reference parity checks, computer use agent checks for the product clone tasks, and anti-cheating tests.
- 03:26We wanted independent verified channels that fail in different ways.
- 03:32I'll first show you the computer use agent verification example, and then later the failure case where an agent tries to solve the C compiler task by secretly calling GCC.
- 03:49You You have noticed that there are basically no full stack product clone tasks in any long horizon three benchmark out there.
- 03:57And the reason is verification.
- 04:01Unit test can pass, but the product is probably still unusable and the front end looks terrible.
- 04:10Sweet marathon is the first benchmark to use a computer use agent or CUA verifier for these full stack tasks.
- 04:18For the clone slack task, we have deterministic unit tests to check the API and the back end functionality.
- 04:26But then a computer use agent uses the browser like a human.
- 04:31That's what you're seeing in this GIF.
- 04:33The verifier isn't reading code or calling an API directly.
- 04:38It's driving the submitted slack clone through the UI.
- 04:43So it's logging in, creating channels, posting messages, reacting with emotes, and checking that the app actually works with the rubric.
- 04:54The big takeaway is that full stack eval's are hard because correctness is not just an API contract.
- 05:00It's whether the user can actually complete the product's intended workflow.
- 05:09Sweet marathon has 20 project scale tasks across four families.
- 05:15There are library clones, full stack product clones, ML engineering, and algorithmic tasks.
- 05:23And some of these tasks even use external APIs.
- 05:25For example, we have a post train task where the agent must post train a language model using the tinker API.
- 05:34Expert contributors from the eval's community propose the tasks and reference solutions.
- 05:40And then we work together to standardize them into executable environments with the multi-layer verifier suites.
- 05:47Tasks all follow the harbor format.
- 05:52A lot of my work was spent on the QA and the hardening layer.
- 05:56So, running the agent trials, inspecting the failure modes, patching the shortcuts, patching the verifier, and then rerunning until the tasks were both solvable, but also hard to game.
- 06:15This is the main leaderboard result.
- 06:17The best configuration here is Claude Opus 4.8 with Claude Code, and it only achieves a 26% resolution rate.
- 06:26So, even with the strongest agent setup we evaluated, it's only solving like one in four tasks.
- 06:35The important thing is that these aren't shallow failures.
- 06:38The average trial used 31 million tokens, and the longest rollout consumed 877 million tokens.
- 06:46So, the agents are exploring, editing, testing, getting stuck, recovering, running for hours.
- 06:55So, the takeaway is that current agents are very impressive, but end-to-end project ownership ownership is still very far from being solved.
- 07:10This plot puts cost on the x-axis and resolution rate on the y-axis.
- 07:15So, higher success rate for less money is always better.
- 07:21Claude Opus 4.8 is the top point.
- 07:24It gets 26%, but it's also the most expensive configurations, or one of them.
- 07:30Whereas GPT 4.5 with Codex is far cheaper and only gets 12%.
- 07:38So, the model isn't just the full picture.
- 07:41The agent scaffold makes a huge difference uh how the how it plans, uses tools, um summarizes context, and decides on when to test.
- 07:51I won't get too deep into the cost analysis here, but the paper has the full details.
- 08:00I wanted to show you what a full marathon rollout actually looks like.
- 08:06This is one I picked with GLM 5.2 on the Next.js fight rewrite task.
- 08:13So, there's over, you know, 356 million tokens uh over 9 hours and over 800 trajectory steps and and tool actions.
- 08:23So, for the top half, you can see the the agent starts by exploring the repo and the fixtures, um gets its first full test suite at zero of zero out of 325
- 08:36test passing, and then spends the next few hours pushing through routing, hydration, uh server actions, middleware, and cache behavior.
- 08:47The bottom part of the chart shows the work pattern over time.
- 08:51So, you can see like lots of reading and searching early, then huge waves of like editing, building, testing, and debugging.
- 08:59The key intuition is that these are like long engineering loops.
- 09:03They're not simple coding tasks.
- 09:10Reward hacking is an arms race between coding agents and our environment.
- 09:16This is why strong verifiers are are central to Sweep Marathon's task design and not an afterthought.
- 09:23This chart has two levels of behavior.
- 09:26The lighter bars are the suspicious suspicious uh shortcut behavior.
- 09:32So, things like looking for solution files, messing with data, messing with the configs.
- 09:37Whereas the darker bar is like a clear exploit that has actually gotten shipped in the final submission.
- 09:44And across the 1,400 rollouts, um we found 12.8% had suspicious shortcut behavior, and 9% had the clear verifier bypass.
- 09:56So, if these verifiers were weak, these wouldn't just be amusing failure cases, they would actually delegitimize the benchmark.
- 10:05And the important number is the zero.
- 10:08Zero rollouts earned reward through an exploit, because our defenses caught them.
- 10:13That should be the bar for long-horizon evals.
- 10:20This is my favorite concrete reward hacking example.
- 10:25The task is to build a C compiler in Rust from scratch.
- 10:28The lexer, the parser, semantic analysis, codegen, the whole thing.
- 10:35But Gemini found a much shorter implementation strategy, which is call GCC from inside the Rust program.
- 10:45So, under a weak verifier, this task would look almost solved, because the compiler outputs match the reference behavior behavior.
- 10:53But obviously it's not a real compiler in Rust.
- 10:57The anti-cheat layers ca- uh catch this by using S trace to find the forbidden subprocesses um called like GCC.
- 11:07So, even though the partial scores look high, the final reward is zero.
- 11:14I have the full failure mode taxonomy in the paper, um which I hope you guys will check out.
- 11:25If you remember one thing from this video, it's that the future of SWE evals is not just harder unit tests.
- 11:32Once agents run for hours, each task becomes a complex environment, and agents not only trying to write code, it's also navigating tools, tests, your hidden assumptions, and the verifier itself.
- 11:48So, the two big takeaways are first, long horizons we is still unsolved.
- 11:56The best agents only at 26%.
- 11:58There's plenty of headroom left.
- 12:01Second, the big bottleneck is robust verification.
- 12:06At hour and day scale length tasks, we need the multi-channel checks, anti-cheat hardening, product style validation.
- 12:20The tasks, the code, the paper, the logs, and the trajectories are all public.
- 12:26I've released 320 GB of trajectories that are especially important because they make SWE-bench fully inspectable and transparent.
- 12:36I also want to thank all of my collaborators on this project, all of whom are listed here.
- 12:42SWE-bench was very much a community-driven effort across task contributors, advisors, and paper writing.
- 12:50You can find everything at swe-bench.org.
- 12:54Thank you.