Counterfactual Twin Cells
Each task executes identically on base and target sandboxes differing along a single probe-verified system mechanism across 55 container configurations.
TRACELITE AI / RESEARCH BENCHMARK
TraceLite AI Research · Technical Report & Benchmark Suite
Near-100% scores in uniform greenhouse containers mask severe 31.3–72.3 pt collapses under single-variable environment shifts.
Modern software and terminal agent benchmarks evaluate models almost exclusively inside homogeneous 'greenhouse' containers—assuming UTF-8 locales, root privileges, GNU coreutils, permissive ulimit quotas, standard local filesystems, and direct interactive environment inheritance. High scores in such uniform sandboxes conflate algorithmic coding skill with real-world environment adaptability.
We introduce TwinEnv-Bench, a counterfactual benchmark of 117 real-world software and data engineering tasks (234 twin cells) spanning a grounded five-layer environment taxonomy (E1–E5, 15 dimension groups, 31 mechanisms). Every task pairs an identical prompt and workspace across a standard baseline container (base) and a counterfactual sandbox (target) shifted along exactly one verified system dimension, enforced by a three-state mechanical verification contract.
By balancing Interactive-Exposed shifts (59 tasks, where discrepancies surface during interactive commands) and Deployment-Latent shifts (58 tasks, where sample runs pass silently while production constraints reside in cron, rlimits, mounts, or cross-account ownership), TwinEnv-Bench exposes a fundamental cognitive bottleneck: frontier coding agents excel at error-driven reactive patching but critically lack proactive environment reconnaissance—triggering sharp accuracy drops and leaderboard rank reversals.
Isolating causal environment sensitivity without confounding task difficulty or leaking held-out oracles.
Each task executes identically on base and target sandboxes differing along a single probe-verified system mechanism across 55 container configurations.
Every task passes 6 deterministic checks: unmodified workspace fails both; environment-naive solution passes base & fails target; reference solution passes both.
59 Interactive-Exposed tasks test error-driven recovery; 58 Deployment-Latent tasks require proactive host reconnaissance before writing code.
API keys, reference solutions, and held-out judge/ inputs remain strictly on the host; judge/ and verify.sh are injected only after agent termination.
Grounded in real-world open-source agent failure issues and POSIX/runtime specifications—revealing orthogonal capability profiles across model families.
E1.1 Filesystem Semantics (casefold, Unicode NFD, sparse/atomic) · E1.2 System Conventions (CRLF)
E2.1 Language Runtime · E2.2 Dependencies & Offline Wheels · E2.3 BusyBox/BSD Shell · E2.4 Browser Engine
E3.1 Locale, Character Encoding & Timezone Drift · E3.2 Cron Daemon, Non-Login Shell & Subprocess Env
E4.1 Ownership, umask & EXDEV Mounts · E4.2 Network/Proxy · E4.3 Clock Skew · E4.4 Credentials · E4.5 Kernel rlimits
E5.1 Stale PID/Lock/Cache Platform Residuals · E5.2 Upstream Service Transient Faults & Retries
When environment discrepancies no longer surface in interactive sample runs, reactive leaders drop sharply and leaderboard rankings flip.
Percentage-point drop from Base Pass@1 (95.1%–99.7%) to single-variable shifted Target Pass@1 (26.8%–67.1%) across 9 frontier models.
GPT-6.1 Sol plunges −29.1 pts from Exposed (77.4% #1) to Latent (48.3% T-#3), while Claude Opus 5.5 (59.3% #1, Overall 67.1% #1) and Qwen 3.8 Max (52.3% #2, Overall 63.8% #2) take the top two.
Upfront probing (steps 1–2, ≥2 probes) lifts Deployment-Latent Pass@1 from 13.2% to 77.4% (r = 0.92 across 9 models).
| Model | Base Pass@1 | Target Pass@1 | Shift Drop (Δ) | Exposed (59) | Latent (58) | Target Pass@3 | Target Pass^3 | Span (@3−^3) |
|---|---|---|---|---|---|---|---|---|
Claude Opus 5.5 | 98.4% | 67.1% | -31.3 | 74.1% | 59.3% | 73.9% | 59.5% | 14.4 |
Qwen 3.8 Max | 95.1% | 63.8% | -31.3 | 75.1% | 52.3% | 76.9% | 47.0% | 29.9 |
GPT-6.1 Sol | 97.4% | 63.0% | -34.4 | 77.4% | 48.3% | 68.4% | 58.1% | 10.3 |
Gemini 4 Argon | 99.1% | 61.0% | -38.1 | 73.4% | 48.3% | 70.1% | 51.3% | 18.8 |
Hy4 Flash | 99.7% | 55.3% | -44.4 | 69.5% | 40.8% | 65.8% | 45.3% | 20.5 |
DeepSeek V4.1 Flash | 99.4% | 41.6% | -57.8 | 46.3% | 36.8% | 58.1% | 25.6% | 32.5 |
GLM-5.3 Flash | 96.9% | 40.7% | -56.2 | 53.7% | 27.6% | 52.1% | 28.2% | 23.9 |
Grok 4.7 | 97.4% | 34.5% | -62.9 | 46.3% | 22.4% | 47.0% | 22.2% | 24.8 |
Kimi K3.1 Pro | 99.1% | 26.8% | -72.3 | 39.5% | 13.8% | 39.3% | 14.5% | 24.8 |
Open interactive leaderboard, E1–E5 breakdowns & 117-task explorer →
Command-level trajectory analysis explains why agents fail silently on latent shifts—and why naive test-time retries cannot substitute for reconnaissance.
Why do 19.2% (89/464 pairs) of consistently probed (3/3 Probed) tasks still fail 0/3, why does Qwen 3.8 Max trail Opus despite an 82.8% probe rate, and how does Gemini 4 Argon tie for #3 with a 58.0% probe rate?
Among 3/3 Probed → 0/3 Fail runs, 66.7% probe early (steps 1–2) yet average only 1.52 probes: 49.4% stop after 1 surface check (missing /etc/cron.d), and 21.3% probe an unrelated axis.
Even with on-target probing, models fail to deduce boundary side-effects (e.g., DST fall-back crashes or dropped CAP_DAC_OVERRIDE). Kimi hits 85.4% On-Target yet converts only 39.0% vs. Opus's 74.5%.
Qwen 3.8 Max leads raw (82.8%) & deep (59.2%) probing (#1 Pass@3 = 76.9%) yet probes late (Early = 14.4%, Pass^3 = 47.0% vs. Opus 69.0% / 59.5%), while Gemini achieves peak conversion (68.3%).
| Model | Exec. N | Exec. Pass@1 | Probe% | Early% | Deep (≥2)% | On-Target% | Pass | Probe | Pass | On-Target | Pass | NoProbe |
|---|---|---|---|---|---|---|---|---|---|
Claude Opus 5.5 | 145 | 59.3% | 73.1% | 69.0% | 27.6% | 89.5% | 67.0% | 74.5% | 38.5% |
Qwen 3.8 Max | 174 | 52.3% | 82.8% | 14.4% | 59.2% | 88.9% | 61.8% | 68.0% | 6.7% |
GPT-6.1 Sol | 174 | 48.3% | 70.7% | 68.4% | 15.5% | 74.6% | 56.9% | 67.1% | 27.5% |
Gemini 4 Argon | 174 | 48.3% | 58.0% | 42.5% | 37.9% | 83.5% | 68.3% | 69.7% | 20.5% |
Hy4 Flash | 174 | 40.8% | 64.4% | 48.3% | 33.3% | 72.8% | 55.4% | 68.0% | 14.5% |
DeepSeek V4.1 Flash | 174 | 36.8% | 59.8% | 25.3% | 28.7% | 75.8% | 54.8% | 66.7% | 10.0% |
GLM-5.3 Flash | 174 | 27.6% | 40.8% | 10.3% | 15.5% | 74.2% | 50.7% | 52.2% | 11.7% |
Grok 4.7 | 174 | 22.4% | 44.3% | 33.9% | 12.1% | 77.9% | 41.6% | 39.6% | 7.2% |
Kimi K3.1 Pro | 174 | 13.8% | 32.2% | 20.1% | 9.8% | 85.4% | 35.7% | 39.0% | 3.4% |
Note: Consistent with the Main Leaderboard, all metrics on Deployment-Latent (58 tasks × 3 repeats = 174 scheduled runs) are evaluated over non-refusal executed runs (Exec. N); for Claude Opus 5.5, excluding 29 unexecuted API refusals yields Exec. N = 145 and Exec. Pass@1 = 59.3%, while all other 8 models have full Exec. N = 174.
Does upfront reconnaissance exert direct causal leverage, or merely correlate with stronger coding skill? Zero-spoiler system-prompt interventions across all 58 Deployment-Latent tasks (n = 688 strictly paired runs across 4 representative models) prove both causal lift and a rigid reasoning ceiling.
P0 (Default) → P1 (Generic Recon) → P2 (SRE Checklist) lifts paired Deployment-Latent Pass@1 from 32.0% to 61.9%, doubling Pass^3 (23.5% → 51.3%) as Deep ≥2 probes surge ×5.4 (17.4% → 94.5%).
Breaking shallow-probing habits unlocks DeepSeek V4.1 Flash (+43.9 pp to 80.9%) and GPT-6.1 Sol (+28.2 pp to 76.4% in 5.8 cmds)—both surpassing unprompted #1 Claude Opus 5.5 (59.3%).
Even at 100% probing under P2, Kimi K3.1 Pro caps at 37.4% vs. DeepSeek's 80.9%—proving prompts cure reconnaissance blindness but cannot replace post-trained Probe-to-Action reasoning.
| Model | Paired N (Tasks) | Pass@1 (P0 → P1 → P2) | Δ (P2 − P0) | Pass^3 (P0 → P1 → P2) | Probe% (P0 → P1 → P2) | Deep ≥2% (P0 → P1 → P2) | Pass | Probe (P0 → P1 → P2) |
|---|---|---|---|---|---|---|---|
DeepSeek V4.1 Flash | 173 (57) | 37.0% → 65.9% → 80.9% | +43.9 pp | 24.6% → 47.4% → 70.2% | 59.5% → 97.1% → 100.0% | 28.9% → 73.4% → 100.0% | 55.3% → 67.9% → 80.9% |
GPT-6.1 Sol | 174 (58) | 48.3% → 68.4% → 76.4% | +28.2 pp | 43.1% → 62.1% → 70.7% | 70.7% → 100.0% → 100.0% | 15.5% → 87.9% → 100.0% | 56.9% → 68.4% → 76.4% |
GLM-5.3 Flash | 167 (53) | 28.7% → 43.1% → 52.7% | +24.0 pp | 20.8% → 34.0% → 41.5% | 40.7% → 73.7% → 98.8% | 15.6% → 43.7% → 87.4% | 52.9% → 56.9% → 53.3% |
Kimi K3.1 Pro | 174 (58) | 13.8% → 17.2% → 37.4% | +23.6 pp | 5.2% → 8.6% → 22.4% | 32.2% → 86.8% → 100.0% | 9.8% → 25.9% → 90.2% | 35.7% → 18.5% → 37.4% |
| 4-Model Paired Macro | 688 (226) | 32.0% → 48.7% → 61.9% | +29.9 pp | 23.5% → 38.1% → 51.3% | 50.9% → 89.5% → 99.7% | 17.4% → 57.9% → 94.5% | 52.3% → 53.7% → 62.1% |
Note: P2 − P1 macro gain = +13.2 pp (95% task-level bootstrap CI: [+6.7, +20.1] pp). Counting the 7 single-turn 6k output-limit truncations as 0 (n = 695: 31.7% → 48.6% → 61.4%) yields virtually identical effect sizes.
Four canonical tasks from TwinEnv-Bench illustrating the full spectrum of failure mechanisms: premature blind exit, shallow probing illusion, probe-to-action reasoning gap, and granularity blind spots.
Task: Clean and distribute national outage logs into regional files. The inherited splitter stages all cleaned rows into a single intermediate file before splitting.
$ python3 split_outages.py --input sample/outages.csv Wrote 4 regional CSVs (staging size: 5 KB). # Zero errors on KB-scale sample -> submits immediately! [Judge Verify] OSError: [Errno 27] File too large on 3 MB national log
$ ulimit -a && ulimit -f file size (blocks, -f) 1024 # 1 MiB per-file ceiling! # Eliminates monolithic staging; streams directly to regional handles $ python3 test_synth_40k_rows.py [Judge Verify] All regional files written under 1 MiB cap (PASS)
Task: Add an --errors-only filter to /workspace/logs/annotate.py while keeping formatted local timestamps exact when run by the scheduled nightly job.
$ date '+%Z %z' && echo $TZ JST +0900 / Asia/Tokyo # Stops probing after interactive shell! # Keeps inherited round(seconds/3600) whole-hour formatter [Judge Verify] Under cron TZ=Asia/Kolkata (+05:30), outputs +06:00!
$ date '+%Z %z' && grep -rn 'TZ=' /etc/cron* /etc/systemd/ /etc/cron.d/nightly-job: TZ=Asia/Kolkata # Spots +05:30 half-hour offset -> formats exact %z (+HH:MM) minutes [Judge Verify] Exact +05:30 timestamps under cron execution (PASS)
Task: Extend /workspace/energy/rollup.py with a peak_hour (UTC HH:00) column per day over naive local meter readings.
$ date '+%Z %z' && cat /etc/timezone CET +0100 / Europe/Berlin # Probed target axis! # Calls df['ts'].dt.tz_localize('Europe/Berlin') with default ambiguous='raise' [Judge Verify] AmbiguousTimeError: Cannot infer dst time from 2025-10-26 02:15
$ cat /etc/timezone # -> Europe/Berlin (has CET/CEST transitions!) # Deduces monotonic sequence disambiguation for repeated fall-back hour: # tz_localize(zone, ambiguous='infer', nonexistent='shift_forward') [Judge Verify] Spring-forward & fall-back logs rolled up cleanly (PASS)
Task: Update /srv/sitepub/publish.py to sync and prune the web docroot while preserving uploads/.
$ id && ls -ld /var/www/html uid=0(root) gid=0(root) # Assumes root can overwrite any file in place! # Keeps shutil.copy2(src, dst) opening read-only foreign hotfix for write [Judge Verify] PermissionError: [Errno 13] Permission denied
$ grep Cap /proc/self/status && capsh --print CapEff: 00000000a80425fb # CAP_DAC_OVERRIDE is dropped! # Writes temp file inside root-owned parent dir + os.replace(tmp, dst) [Judge Verify] Foreign read-only hotfixes replaced & pruned (PASS)
@article{twinenvbench2026,
title = {TwinEnv-Bench: Beyond Greenhouse Sandboxes via Counterfactual Evaluation of Reactive and Proactive Environment Adaptation in Software Agents},
author = {TraceLite AI Research},
year = {2026},
url = {https://github.com/TraceLite-AI/TwinEnv-Bench}
}