---
title: "The Agents on Rails Files: enter lemans, a Ruby harness for fair agent races"
description: "lemans is an open source Ruby harness built for the Rails Foundation's coding-agent benchmark."
url: "https://swe.quest/articles/the-agents-on-rails-files-enter-lemans-a-ruby-harness-for-fair-agent-races-67f1e215509b634c"
canonical: "https://evilmartians.com/chronicles/the-agents-on-rails-files-enter-lemans-a-ruby-harness-for-fair-agent-races"
source: "Evil Martians"
published: "2026-11-03"
difficulty: "medium"
kind: "Case study"
reading_minutes: 16
tags: ["evals","ai-agents","ruby","sandboxing","llms"]
---

# The Agents on Rails Files: enter lemans, a Ruby harness for fair agent races

A post on [Evil Martians](https://swe.quest/sources/evil-martians.md), published 2026-11-03, 16 min read, Case study. Original: [https://evilmartians.com/chronicles/the-agents-on-rails-files-enter-lemans-a-ruby-harness-for-fair-agent-races](https://evilmartians.com/chronicles/the-agents-on-rails-files-enter-lemans-a-ruby-harness-for-fair-agent-races)

## Summary

lemans is an open source Ruby harness built for the Rails Foundation's coding-agent benchmark. Each task is an instruction, an environment patch that plants a bug or removes a feature, a golden solution patch and a hidden Minitest grader. Gate tests score a run 0 on failure, while \`allow\_failure\` checks add partial credit, and oracle and nop agents validate every task before any model is scored. Models are driven through RubyLLM by miniswen, a bash-only Ruby port of mini-swe-agent. Cheating attempts drove much of the sandbox hardening: models mined Bootsnap caches, file mtimes, unreachable Git blobs and leaked env vars, and one called web-search models through the allowed API host to fetch the source. Each led to a guardrail such as cache wiping, timestamp normalization, Git state moved outside the repo, secret redaction and network proxying.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Ruby](https://swe.quest/tags/ruby.md) (Languages)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- Ruby and Rails testing ([easy posts on Ruby](https://swe.quest/tags/ruby.md?difficulty=easy))
- LLM coding agents ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- Docker sandboxes ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))

## Keywords

lemans, miniswen, RubyLLM, Minitest, Daytona, OpenRouter, Harbor, mini-swe-agent

## Related posts

- [Building an agentic harness that outlasts the model](https://swe.quest/articles/building-an-agentic-harness-that-outlasts-the-model-75504578038e6cc5.md): Shopify Engineering · 2026-07-29 · Medium · 8 min read · AI agents, Application security, Vulnerability research, LLMs, Ruby
  Shopify's AppSec team built Dispatch, a Ruby-orchestrated multi-agent harness that partitions codebases, runs parallel category-specific Hunter agents, verifies candidates with tests written by a different model inside each app's existing test suite, and opens draft fix PRs.
- [How Legora runs 2,000 parallel agent evals on Modal Sandboxes](https://swe.quest/articles/how-legora-runs-2-000-parallel-agent-evals-on-modal-sandboxes-18a61f0150fc40b8.md): Modal · 2026-10-19 · Medium · 4 min read · Evaluation, AI agents, Sandboxing & isolation, Virtualization, Containers
  Legora tests its long-running legal agent by booting the full application, pinned to a specific commit, inside a separate Modal Sandbox for each eval run.
- [The Most Common Questions About Agent Evals, Answered](https://swe.quest/articles/the-most-common-questions-about-agent-evals-answered-40ebbb294f8cf253.md): LangChain · 2026-10-15 · Medium · 15 min read · Evaluation, AI agents, Observability, LLMs
  Agent evals score agent runs to handle nondeterminism, multiple valid answers and variable execution paths: start by reading traces, pick one behavior, build a 10-20 example dataset from real traces, run a baseline experiment, and fold new failures back in.
- [Agents are users, so your software needs evals](https://swe.quest/articles/agents-are-users-so-your-software-needs-evals-ae7971006fec5a38.md): Vercel · 2026-11-16 · Medium · 19 min read · Evaluation, AI agents, Testing, LLMs
  Agents act as users of APIs, CLIs, MCP servers and SDKs, so measuring whether they complete tasks correctly requires evals: tests run many times and scored.
- [CWE-bench v2: More coverage, quality, and transparency](https://swe.quest/articles/cwe-bench-v2-more-coverage-quality-and-transparency-a9d3d012216634c0.md): Hugging Face · 2026-11-03 · Medium · 4 min read · Evaluation, Application security, AI agents, LLMs
  CWE-bench v2 releases a public set of 100 agentic security tasks covering 91 CWEs, where an agent must find and fix a vulnerability in a real open-source repository without breaking existing functionality, scored by deterministic programmatic verifiers that reject memorized upstream patches.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
