Skip to content

Terminal-Bench 2.0 Evaluation Results: Hex v1.11.x Baseline #16

Open

Description

@harperreed

Terminal-Bench 2.0 Evaluation Results

First-ever benchmark evaluation of Hex on Terminal-Bench 2.0, the standard benchmark for evaluating AI coding agents in terminal environments. 89 tasks covering systems programming, security, data engineering, ML, and more.

Summary

Configuration Passed Total Solve Rate
Hex v1.11.2 + Claude Opus 4.6 43 88 48.9%
Hex v1.11.0 + Claude Sonnet 4.5 34 88 38.6%

Leaderboard Context

Agent Model Score Rank
ForgeCode Claude Opus 4.6 81.8% #1
Claude Code Claude Opus 4.6 58.0% #39
Hex Claude Opus 4.6 48.9% ~#53
Codex CLI GPT-5 49.6% #53
Terminus 2 Claude Sonnet 4.5 42.8% #63
Claude Code Claude Sonnet 4.5 40.1% #69
Hex Claude Sonnet 4.5 38.6% ~#71

Hex with Opus 4.6 lands next to Codex CLI (GPT-5). With Sonnet 4.5, hex nearly matches Claude Code on the same model. The ~9 point gap to Claude Code on Opus is the primary improvement target.

Task-by-Task Results

Tasks Solved by Both Models (30 tasks)

Task Sonnet Opus
bn-fit-modify ✅ ✅
cobol-modernization ✅ ✅
code-from-image ✅ ✅
compile-compcert ✅ ✅
constraints-scheduling ✅ ✅
crack-7z-hash ✅ ✅
custom-memory-heap-crash ✅ ✅
extract-elf ✅ ✅
fix-code-vulnerability ✅ ✅
fix-git ✅ ✅
fix-ocaml-gc ✅ ✅
git-leak-recovery ✅ ✅
git-multibranch ✅ ✅
headless-terminal ✅ ✅
large-scale-text-editing ✅ ✅
log-summary-date-ranges ✅ ✅
mcmc-sampling-stan ✅ ✅
modernize-scientific-stack ✅ ✅
multi-source-data-merger ✅ ✅
nginx-request-logging ✅ ✅
overfull-hbox ✅ ✅
portfolio-optimization ✅ ✅
prove-plus-comm ✅ ✅
pypi-server ✅ ✅
pytorch-model-cli ✅ ✅
qemu-startup ✅ ✅
rstan-to-pystan ✅ ✅
sqlite-db-truncate ✅ ✅
sqlite-with-gcov ✅ ✅

Tasks Solved Only by Opus 4.6 (13 tasks)

Task Category
break-filter-js-from-html Web security
chess-best-move Reasoning
count-dataset-tokens Data processing
distribution-search Statistics
feal-differential-cryptanalysis Cryptography
financial-document-processor Document parsing
kv-store-grpc Systems programming
llm-inference-batching-scheduler ML infrastructure
merge-diff-arc-agi-task Complex diffing
password-recovery Security
regex-log Log parsing
reshard-c4-data Data engineering
sanitize-git-repo Git operations
tune-mjcf Physics simulation

Tasks Solved Only by Sonnet 4.5 (4 tasks)

Task Category
circuit-fibsqrt Hardware design
hf-model-inference ML inference
query-optimize Database
schemelike-metacircular-eval Language design
vulnerable-secret Security

Tasks Failed by Both (45 tasks)

adaptive-rejection-sampler, build-cython-ext, build-pmars, build-pov-ray, caffe-cifar-10, cancel-async-tasks, configure-git-webserver, db-wal-recovery, dna-assembly, dna-insert, extract-moves-from-video, feal-linear-cryptanalysis, filter-js-from-html, gcode-to-text, gpt2-codegolf, install-windows-3.11, largest-eigenval, mailman, make-doom-for-mips, make-mips-interpreter, model-extraction-relu-logits, mteb-leaderboard, mteb-retrieve, openssl-selfsigned-cert, path-tracing, path-tracing-reverse, polyglot-c-py, polyglot-rust-c, protein-assembly, pytorch-model-recovery, qemu-alpine-ssh, raman-fitting, regex-chess, sam-cell-seg, sparql-university, torch-pipeline-parallelism, torch-tensor-parallelism, train-fasttext, video-processing, winning-avg-corewars, write-compressor

Methodology

  • Hex version: v1.11.0 (Sonnet run), v1.11.2 (Opus run)
  • Agent mode: --spell agent --permission-mode=auto (maximum intelligence spell, auto-approve tools)
  • Harness: Harbor with custom hex adapter (hex-terminal-bench)
  • Infrastructure: Docker containers on aibox01, Cloudflare AI Gateway for API routing
  • Concurrency: 4 parallel tasks
  • Attempts: 1 attempt per task (no retries)

Agent Intelligence Features Used

These features were shipped as part of the v1.11.x release specifically to improve agent effectiveness (based on arXiv:2511.18538 survey findings):

  1. Enhanced system prompt — comprehensive guidance on tool usage, self-correction, planning, and code quality
  2. Agent spell (--spell agent) — layers additional instructions for thorough planning, verification, and self-correction
  3. Stuck detection — tracks consecutive tool failures and injects hints to try different approaches
  4. Verification hints — nudges to verify changes after file mutations
  5. Project memory — auto-detects project language, build/test commands, and structure
  6. Smarter context pruning — ContentBlock-aware token estimation, error prioritization

Improvement Opportunities

Closing the Gap to Claude Code (~9 points on Opus)

  1. Tool execution in mux path — the mux adapter creates a fresh Anthropic client per agent; optimizing tool call batching and streaming could reduce latency
  2. Extended thinking — Claude Code likely uses extended thinking; enabling this could improve complex reasoning tasks
  3. Better error recovery — many failed tasks show hex hitting errors and not recovering effectively; the stuck detection helps but could be more aggressive
  4. Task-specific context — injecting repository structure and file listings before the task prompt would help navigation
  5. Retry logic — running failed tasks with a different strategy (no spell, different prompt wrapping) could pick up a few more

Systemic Failures to Investigate

  • Build tasks (build-pov-ray, build-pmars, build-cython-ext) — consistently fail, likely timeout or dependency issues in the container
  • ML tasks (torch-, caffe-) — may need GPU or specific frameworks not available in the container
  • Polyglot tasks — multi-language compilation chains are hard without verified tool outputs

Reproducing

# Install harbor
uv tool install harbor

# Clone hex-terminal-bench adapter
cd /path/to/hex-terminal-bench

# Install
uv venv && source .venv/bin/activate && uv pip install -e .

# Run
source /path/to/.env  # needs ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL
harbor run -d terminal-bench@2.0 \
  --agent-import-path hex_terminal_bench:HexAgent \
  -m anthropic/claude-opus-4-6 \
  --ak version=1.11.2 \
  --ae ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
  --ae ANTHROPIC_BASE_URL=$ANTHROPIC_BASE_URL \
  --jobs-dir ./results \
  --agent-setup-timeout-multiplier 3.0 \
  -n 4

Activity

  1. harperreed commented on Mar 24, 2026

    @harperreed
    MemberAuthor

    Updated Results: v1.12.0 with Extended Thinking + Multi-Model

    Following the initial v1.11.x baseline, we shipped v1.12.0 with significant improvements and ran evaluations across 4 model configurations.

    Score Progression

    Version Model Passed Total Rate Approx Rank
    v1.11.0 Sonnet 4.5 34 88 38.6% ~#71
    v1.11.2 Opus 4.6 43 88 48.9% ~#53
    v1.12.0 Sonnet 4.6 + thinking 42 88 47.7% ~#54
    v1.12.0 Opus 4.6 + thinking 48 88 54.5% ~#42
    v1.12.1 GPT-5.4 28 88 31.8% ~#80

    Best result: 54.5% with Opus 4.6 + extended thinking — up 15.9 points from the initial 38.6% baseline. Gap to Claude Code (58.0%) narrowed from 20 points to 3.5.

    v1.12.0 Changes That Drove Improvement

    Hex-side (v1.11.3 → v1.12.0):

    • Graceful max-turns exit — exit 0 with best effort instead of crashing (was losing ~3-5 tasks)
    • Default max turns increased from 20 to 50
    • Tool result truncation at 15K chars — prevents context window blowout
    • MaxTokens increased from 4096 to 16384 — longer code in single response
    • Stronger verification assertion in system prompt
    • Warm context in Harbor adapter — file listing prepended to task

    mux v0.7.0 (critical):

    • Extended thinking support for Anthropic (ThinkingClient wrapper)
    • OpenAI tool_calls response format fix
    • API retry with exponential backoff
    • Base URL support for all providers

    Extended Thinking Impact

    Config Without Thinking With Thinking Delta
    Opus 4.6 48.9% (v1.11.2) 54.5% (v1.12.0) +5.6

    Tasks newly solved with thinking enabled (vs v1.11.2 Opus without):

    • extract-moves-from-video — video frame analysis
    • feal-linear-cryptanalysis — cryptanalysis (no model solved this before)
    • largest-eigenval — numerical computing
    • make-mips-interpreter — MIPS CPU emulator
    • path-tracing + path-tracing-reverse — ray tracing (heavy math)
    • torch-pipeline-parallelism — distributed ML
    • write-compressor — compression algorithm design
    • build-pmars — build systems
    • openssl-selfsigned-cert — crypto/security
    • sparql-university — knowledge graphs

    These are all deep-reasoning tasks where extended thinking provides the most value.

    Model Comparison: Tasks Solved

    Union of all models: 66 unique tasks solved (75.0%)

    Solved by all Anthropic configs (30 tasks): bn-fit-modify, cobol-modernization, code-from-image, constraints-scheduling, custom-memory-heap-crash, distribution-search, feal-differential-cryptanalysis, financial-document-processor, fix-code-vulnerability, fix-git, git-leak-recovery, headless-terminal, hf-model-inference, kv-store-grpc, large-scale-text-editing, llm-inference-batching-scheduler, log-summary-date-ranges, mcmc-sampling-stan, merge-diff-arc-agi-task, modernize-scientific-stack, multi-source-data-merger, nginx-request-logging, password-recovery, portfolio-optimization, prove-plus-comm, pypi-server, pytorch-model-cli, qemu-startup, reshard-c4-data, rstan-to-pystan

    Opus 4.6 + thinking only (unique): extract-moves-from-video, feal-linear-cryptanalysis, largest-eigenval, make-mips-interpreter, path-tracing, path-tracing-reverse, torch-pipeline-parallelism, write-compressor

    Sonnet 4.6 only (unique): adaptive-rejection-sampler, build-pov-ray, configure-git-webserver, qemu-alpine-ssh, tune-mjcf

    GPT-5.4 Analysis

    GPT-5.4 scored 31.8% — significantly below its capability (scores ~50%+ through Codex CLI). Root causes:

    1. No extended thinking — OpenAI rejects reasoning_effort with tools on /v1/chat/completions
    2. Anthropic-native tool patterns — hex's system prompt, tool descriptions, and agent spell are optimized for Claude's instruction-following style
    3. 48 wrong answers, only 4 timeouts — model uses tools correctly but produces wrong solutions, suggesting prompt/format mismatch rather than infrastructure issues

    Remaining Gap to Claude Code (3.5 points)

    The biggest remaining opportunities:

    1. Thinking budget tuning — current 10K tokens may be too low for hardest tasks; experiment with 20K-50K
    2. Multi-attempt — running failed tasks a second time with different strategy
    3. Better warm context — currently just file listing; adding file sizes and first lines would help
    4. OpenAI provider optimization — separate system prompt/tool format for OpenAI models
    5. mux orchestrator thinking support — currently using a client wrapper; native support would be cleaner

    Reproducing v1.12.0 Results

    # Opus 4.6 with thinking (best config)
    harbor run -d terminal-bench@2.0 \
      --agent-import-path hex_terminal_bench:HexAgent \
      -m anthropic/claude-opus-4-6 \
      --ak version=1.12.0 \
      --ae ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
      --ae ANTHROPIC_BASE_URL=$ANTHROPIC_BASE_URL \
      --jobs-dir ./results \
      --agent-setup-timeout-multiplier 3.0 \
      -n 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions