Repository navigation
Terminal-Bench 2.1 parity with tmax and OpenThoughts-TBLite eval - #459
Merged
Merged
Conversation
Pin the loader to the official terminal-bench-2-1 repository and read the task resources it declares. Add the vanillux scaffold, a port of tmax's Vanillux2Agent: mini-swe-agent prompts, one bash tool in a persistent shell, head/tail truncation, format-error recovery, a submit marker and the reference sampling defaults. Run each trial in a pristine task image with the task's CPU and memory limits under its wall-clock agent timeout, support several attempts per task with pass@k, and report harness failures separately from zero rewards. Interrupt session commands that exceed their timeout instead of failing the run. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017Sx2zb6N7vQiyaXL3C28fQ
… of it On a host of another architecture a derived image built with the default platform gets an interpreter the base image cannot run. Read the base image's platform and build for it. The pristine variant also removed the uv binary after creating the virtualenv, so the image's own tools stay the ones commands find. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017Sx2zb6N7vQiyaXL3C28fQ
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017Sx2zb6N7vQiyaXL3C28fQ
Rootless Podman's default namespace size leaves system ids such as nogroup unmapped, which breaks apt-get in task images and verifier scripts. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017Sx2zb6N7vQiyaXL3C28fQ
A solution that installs packages can take many minutes, longer than a single swe-rex session request may last, which left the sandbox wedged and the trial errored. Run it through the streamed background executor the verifier already uses, and keep the agent cutoff to the agent path. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017Sx2zb6N7vQiyaXL3C28fQ
A run that ends because the provider could not be reached is the harness's failure, not the agent's, so it belongs in the error rate rather than hiding as a zero reward. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017Sx2zb6N7vQiyaXL3C28fQ
A command that fails swe-rex's syntax check now comes back to the model as bash's error with exit code 2, as it would from a shell. A tool call whose arguments are not a JSON object is kept as text in the replayed conversation, since an OpenAI-compatible server rejects a conversation that carries it as a tool call. Either case used to end the trial. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017Sx2zb6N7vQiyaXL3C28fQ
TBLite ships a Dockerfile per task rather than a prebuilt image, so the eval now builds a task's image from its environment directory when none is declared, cached by content hash and serialized across attempts, and layers swe-rex on top as before. The loader takes its repository, ref and version as parameters, and the eval reads them from a dataset descriptor that the TBLite subclass overrides. Difficulty and category labels are normalized so the per-group metrics do not split on spelling. The pristine swe-rex layer keeps its virtualenv outside any home directory and hands control back to the base image's user, so tasks that run as a non-root user do so here as well. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017Sx2zb6N7vQiyaXL3C28fQ
gregorybchris
approved these changes
Oct 12, 2026
pdasigi
enabled auto-merge (squash)
October 12, 2026 22:38
gregorybchris
added a commit
that referenced
this pull request
Oct 13, 2026
Resolve conflicts with #459 (Terminal-Bench 2.1 parity): - executor: keep main's interrupt_session handling of timed-out session commands, which replaces this branch's equivalent change. - image: keep main's pristine mode and platform detection, and apply this branch's time budget to every subprocess image resolution runs, including the new base-image pull for platform detection. remove_swerex_image and the tag hash account for pristine. - README: keep both the SWE-bench and Terminal-Bench sections. - pyproject/uv.lock: main's dev extras plus swebench; lock regenerated. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
8 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the Terminal-Bench external eval to parity with the implementation in shatu/tmax (
omni_agent), pins it to Terminal-Bench 2.1, and adds OpenThoughts-TBLite on the same harness. tmax runs its evals through Harbor (the official Terminal-Bench runner) with a customVanillux2Agent; this PR ports the parts of that setup that determine the score and keeps this repo's own sandbox layer, which supports Podman natively instead of through Harbor's compose-over-socket shim.Changes
harbor-framework/terminal-bench-2-1at7131e43). The loader also reads each task's CPU, memory and build settings.vanilluxscaffold, the eval's default: a port of tmax's Vanillux2Agent. mini-swe-agent prompts, onebashtool in a persistent shell, submit marker, 64 steps, 10k-char head/tail output truncation, format-error recovery, and sampling at temperature 0.7 / top_p 0.95 / 16384 max tokens.openai_agentsremains selectable.PATH, or leavesuvbehind; the server is reached through a launcher symlink and the base image'sUSERis restored. Built for the base image's platform.--cpus/--memory(resource_limits=falseto disable, needed on Beaker where Podman runs with cgroups disabled). The task's agent timeout now bounds the whole run; a timed-out agent is still verified, as Harbor does.n_attemptsgivespass@1,pass@k,pass_rate_stdandpass_rate_sem. Harness failures (missing reward file, verifier timeout, container failure, model unreachable) are reported aserror_rateand excluded frompass_rate_adjustedinstead of silently scoring 0.apt-getworks in task images.openthoughts_tblite): same harness, agent and metrics. Its tasks ship a Dockerfile instead of a prebuilt image, so each task image is built once per run from its environment directory, bounded by the task's build timeout and cached by content hash, with the swe-rex layer and registry caching on top.Results: Qwen/Qwen3.5-9B, 5 attempts per task, one H100 on Beaker
vLLM 0.19.1 with
tool_call_parser=qwen3_xml,max_model_len=65536,language_model_only=true,gdn_prefill_backend=triton. tmax reference numbers are fromscripts/beaker/terminalbench_combined_evals.csvon theomni_agentbranch (same model, same max length).Terminal-Bench 2.1 (experiment, 89 tasks, 445 trials)
OpenThoughts-TBLite (experiment, 100 tasks, 500 trials)
TBLite has partial-credit tasks (17 of 500 trials scored strictly between 0 and 1); tmax's
compute_stats.pycounts any positive reward as a pass, this eval counts only a full reward. Both conventions are shown above.Why the error rate is lower
tmax's
err_rateis computed from Harbor's exception table and includesAgentTimeoutError, so the comparable figure here is agent timeouts plus infrastructure errors. Agent timeouts match closely between the two (another sign the agents behave the same); the gap is in infrastructure failures, roughly 1% here versus roughly 12% in tmax. Based on tmax's own documentation of its Podman path:docker compose, with patches that tmax's docs describe as brittle: bind-mount permission failures that surface asRewardFileNotFoundError, flaky per-project networks, missing device nodes, and Docker Hub rate limits when co-located jobs pull images. This repo's sandbox talks to swe-rex over HTTP directly, supports Podman natively, reads the reward with anexecrather than through a bind mount, and builds each task's image once per job rather than re-pulling aftercompose down --rmi all.exec.Follow-ups
SWEREX_REGISTRYcache with--gcp-credentialson the job; Docker Hub would need a publish script and an image mapping in the loader.timeoutwrapper) or recreate the shell after a failed interrupt, which would remove most of the remaining infrastructure errors.pass@kshould count partial credit as tmax does.allow_internet=falsecannot be enforced because swe-rex needs the network; every task in both datasets currently allows internet, and a warning is logged if that changes.Test plan
uv run ruff check src/ tests/,uv run ruff format --check src/ tests/,uv run ty check src/ alembic/(one pre-existing unused-ignore warning),uv run pytest tests/ --ignore=tests/integration(3216 passed).🤖 Generated with Claude Code
https://claude.ai/code/session_017Sx2zb6N7vQiyaXL3C28fQ