File size: 15,122 Bytes
f4fad12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363f18f
 
 
 
 
 
 
 
f4fad12
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
---
license: cc-by-nc-4.0
pretty_name: Coding-agent routing decisions (Terminal-Bench 2.0)
language:
- en
task_categories:
- text-classification
tags:
- agents
- llm-agents
- coding-agents
- routing
- decision-making
- terminal-bench
- cost-efficiency
size_categories:
- 10K<n<100K
configs:
- config_name: states
  default: true
  data_files:
  - split: train
    path: states.parquet
- config_name: steps
  data_files:
  - split: train
    path: steps.parquet
- config_name: trials
  data_files:
  - split: train
    path: trials.parquet
- config_name: decisions
  data_files:
  - split: train
    path: decisions.parquet
- config_name: runs
  data_files:
  - split: train
    path: runs.parquet
---

# Coding-agent routing decisions (Terminal-Bench 2.0)

Logs of the open-source routing proxy `jah` (JevAgentHarness,
[github.com/JevAgentHarness/JevAgentHarness](https://github.com/JevAgentHarness/JevAgentHarness)) running five
unmodified coding-agent harnesses on [Terminal-Bench 2.0](https://www.tbench.ai/) through
[Harbor](https://github.com/laude-institute/harbor) 0.24.0, October 2026. For every agent step the proxy asked a
decision model whether the next step is `routine` or `hard`, sent hard steps to a strong LLM and routine steps to a
fast one, and logged the decision model's exact input, its probability p(hard), the tier and the cost. Each trial's
outcome is joined from Harbor's results.

Use it to train or evaluate step-level routers for coding agents: the states with p(hard) and the route, and per
trial whether the routed agent solved the task, at what cost and in how much time.

## Setup

- **Harnesses** (`harness`): `codex` (Codex CLI 0.162.1), `pi` (pi 1.2.0), `dsh` (DeepSeek Harness 0.2.1-alpha.2),
  `mswe` (mini-swe-agent) and `t2` (Terminus-2, Harbor's reference agent). Each uses its own prompts and tools; only
  the model endpoint is the proxy.
- **Tiers** (`runs.tiers`): strong Gemini 4 Argon (thinking high) with a fast Gemini 3.8 Flash (thinking low) or
  Gemini 3.5 Flash-Lite (thinking low); for Codex in the test run, strong GPT-6.1 Sol (medium) with fast GPT-6 Luna
  (low). Costs are the providers' list prices of October 2026.
- **Decision model:** Jev (`typesafe/jev-1.13`, TypeSafe) through OpenRouter. It was asked: "Decide how hard the
  agent's NEXT step is. 'routine': the next step follows directly from what the agent already knows ... 'hard': the
  next step needs careful reasoning ..." (the full text is `QUESTION` in `src/jevagentharness/router.py`).
- **Arms** (`arm`, the model name the harness asks the proxy for): `jah-strong` (every step strong, the baseline),
  `jah-auto` (routed, the step goes to the strong tier when p(hard) >= 0.5), `jah-auto-t75` (threshold 0.75),
  `jah-fast` (every step fast), and dev-only variants (`jah-auto-t85`, `jah-auto-t75m`, `jah-auto-eff`; the modes
  arms `jah-shadow`, `jah-safe`, `jah-stopguard`, `jah-submit`, `jah-reflect`, `jah-routeguard`). Routed arms always
  put the first step on the strong tier and re-do a fast-tier reply without a tool call on the strong tier (the
  finish check). The arms are defined in the repository's `bench/configs/*.yaml` (`runs.proxy_config`).
- **Tasks:** Terminal-Bench 2.0 (89 tasks, `laude-institute/terminal-bench-2` at commit
  `69671fbaac6d67a7ef0dfec016cc38a64ef7a77c`) with a fixed hash split into 15 dev and 74 test tasks (`task_split`),
  and a 20-task test subset for the Codex row (`in_test20`). One trial per task and arm.
- **Phases** (`phase`): `dev` (router settings explored), `dev_modes` (the decision-point modes of the repository's
  `docs/modes.md`, dev tasks only), `test` (the reported runs, settings fixed in `bench/PROTOCOL.md` before they ran).

| Run (`run`) | Phase | Proxy config | Harnesses and arms |
|---|---|---|---|
| `dev1` | dev | `bench/configs/gemini_argon_flash.yaml` | codex: jah-auto, jah-fast, jah-strong; dsh: jah-auto, jah-fast, jah-strong; pi: jah-auto, jah-fast, jah-strong |
| `dev1c` | dev | `bench/configs/gemini_argon_flash.yaml` | codex: jah-auto, jah-fast, jah-strong |
| `dev2` | dev | `bench/configs/gemini_argon_flash.yaml` | codex: jah-auto-t75, jah-auto-t85; dsh: jah-auto-t75, jah-auto-t85; pi: jah-auto-t75, jah-auto-t85 |
| `dev3` | dev | `bench/configs/gemini_argon_flash.yaml` | codex: jah-auto, jah-auto-t75m |
| `dev4` | dev | `bench/configs/gemini_argon_flash.yaml` | codex: jah-auto-eff; dsh: jah-auto-eff; pi: jah-auto-eff |
| `dev-lite` | dev | `bench/configs/gemini_argon_lite.yaml` | mswe: jah-auto, jah-auto-t75; pi: jah-auto, jah-auto-t75, jah-strong |
| `dev-lite2` | dev | `bench/configs/gemini_argon_lite.yaml` | mswe: jah-strong |
| `dev-modes` | dev_modes | `bench/configs/gemini_argon_lite_modes.yaml` | mswe: jah-safe, jah-shadow; pi: jah-shadow, jah-stopguard |
| `dev-modes2` | dev_modes | `bench/configs/gemini_argon_lite_modes.yaml` | mswe: jah-auto-t75, jah-reflect, jah-routeguard, jah-submit |
| `dev-modes3` | dev_modes | `bench/configs/gemini_argon_lite_modes.yaml` | mswe: jah-auto-t75, jah-reflect; pi: jah-reflect |
| `test-gem` | test | `bench/configs/gemini_argon_flash.yaml` | dsh: jah-auto, jah-strong; pi: jah-auto, jah-strong |
| `test-gem1` | test | `bench/configs/gemini_argon_flash.yaml` | mswe: jah-auto, jah-strong; t2: jah-auto, jah-strong |
| `test-lite` | test | `bench/configs/gemini_argon_lite.yaml` | dsh: jah-auto-t75; mswe: jah-auto-t75; pi: jah-auto-t75; t2: jah-auto-t75 |
| `test-codex` | test | `bench/configs/openai_sol_luna.yaml` | codex: jah-auto, jah-strong |

`dev1c` holds Codex reruns of `dev1`; their steps are in `dev1`'s proxy log, so `steps` lists them under `run`
`dev1`.

## Configs

| Config | Rows | One row per |
|---|---|---|
| `states` (default) | 16,368 | routed step: the decision model's exact input, p(hard) and the tier |
| `steps` | 42,427 | proxy step (all arms, routed or not) and context-cache event |
| `trials` | 1,508 | Harbor trial (harness x arm x task) with its outcome |
| `decisions` | 6,533 | decision-point question of the `dev_modes` runs |
| `runs` | 14 | run folder: tiers, decision model, proxy config, spend |

Join `states` and `steps` with `trials` on (`run`, `session`) or (`arm`, `trial`); `session` is `<arm>/<trial>`.
States exist for the runs `test-lite`, `test-gem`, `test-gem1`, `test-codex`, `dev-lite` and `dev4` (the proxy wrote
them only when its state log was on).

## Fields

**states**: `run`, `session`, `arm`, `harness`, `task`, `trial`, `step` (assistant turns before this one), `ts`,
`state` (the text the decision model read: `TASK:` with the task text, `STEPS SO FAR:`, then the last six actions with
their results, truncated as in `render_state` of `router.py`), `p_hard` (Jev's probability for `hard`), `tier` (the
tier that wrote the step: `strong`, `fast`, or in dev runs `fast_med` = Gemini 3.8 Flash at medium thinking and
`strong_low` = Gemini 4 Argon at low thinking, the fast tier of `jah-auto-eff`) and `reason` (`routine` / `hard` = the decision, `decision_error` = no answer, so the step
went to the strong tier).

**steps**: identification as above plus `event` (`step` or `cache`, a context-cache write that only costs money),
`tier`, `reason` (also `pinned` = an unrouted arm, `first_steps`, `finish_check`, `guard`, `reflection`,
`route_guard`, `stop_guard`, `fast_error`, and `repeat:<reason>` when a harness re-sent the same step), `p_hard`,
`llm_cost_usd`, `decision_cost_usd`, `cost_usd`, `latency_s`, token counts (`input_tokens`, `cached_tokens`,
`cache_write_tokens`, `output_tokens`, `reasoning_tokens`), `n_tool_calls`, `finish`, `finish_check`, `calls` (each
LLM call: tier, model, latency, attempts, cost), `decision_model`, `decision_latency_s`, `decision_input_tokens`,
`decision_state_chars`, `cache_model`, `cache_tokens`, `points` and `redo` (the modes runs: what each decision point
answered and which checks made the strong tier re-do the step), and `error`, `decision_error`, `fast_tier_error`
(short codes such as `upstream HTTP 503`).

**trials**: `run`, `phase`, `proxy_config`, `strong_model`, `strong_effort`, `fast_model`, `fast_effort`,
`decision_model`, `harness`, `arm`, `task`, `trial`, `task_split`, `in_test20`, `success` (Harbor reward = 1),
`cost_usd` (LLM + decision-model dollars logged by the proxy for the trial's session), `decision_cost_usd`,
`agent_s` (Harbor's agent-execution seconds), `llm_s`, `steps`, `strong_share`, `proxy_errors`, `exception`
(Harbor's exception type, such as `AgentTimeoutError`), `infra_error`, `timeout`, `has_proxy_log` (false when the
trial failed before its first LLM call) and `reported_in` (`test_flash_lite`, `test_argon_flash` or
`test_codex_openai` when the trial is part of a reported comparison).

**decisions** (`dev_modes` runs): `point` (`routing`, `tool_select`, `stop`, `reflection`, `action`), `mode`
(`cascade`, `shadow`, `guard`, `trigger`, ...), `question`, `options`, `p` (one probability per option),
`choice`, `confidence`, `tau`, `act_option`, `p_act`, `acted`, `effect`, `label` and `label_tier` (what the strong
tier did, where known), `agree`, `fit_ok`, `latency_s`, `cost_usd`, `decision_model`, `rounds`, `error`,
`route_tier`, `guard_tool`, `guard_pattern`. The states of these questions were not logged.

**runs**: `run`, `phase`, `proxy_config`, `proxy_log`, `trials`, `jobs`, `tiers` (JSON), `decision`, `tau_default`,
`proxy_spent_usd`, `proxy_budget_usd`.

## How the trial table was made

`trials` is the output of the repository's `bench/summarize.py` (`load_trials`, `load_steps` and `join`, the same
functions as `python bench/summarize.py JOBS PROXY --per-task`), one call per run. Its `compare` function, run on the
`trials` rows of each reported comparison, reproduces the repository's `bench/results/*.json` exactly. The reported
test results:

*Gemini 4 Argon + Gemini 3.5 Flash-Lite, routed at tau = 0.75 (test, 74 tasks; `test_flash_lite`)*

| harness:arm | n | success | Δ vs jah-strong (pt) [95% CI] | $/task | cost saving | agent s/task | time saving | strong share |
|---|---|---|---|---|---|---|---|---|
| dsh:jah-auto-t75 | 74 | 66.2% | +0.0 [-8.1, +8.1] | 0.682 | 27.8% | 684 | 15.0% | 50.1% |
| dsh:jah-strong | 74 | 66.2% | baseline | 0.944 | – | 805 | – | 100.0% |
| mswe:jah-auto-t75 | 74 | 63.5% | -2.7 [-14.9, +8.1] | 0.330 | 63.7% | 471 | 42.8% | 45.4% |
| mswe:jah-strong | 74 | 66.2% | baseline | 0.909 | – | 824 | – | 100.0% |
| pi:jah-auto-t75 | 74 | 56.8% | +4.1 [-6.8, +14.9] | 0.424 | 31.1% | 650 | 4.5% | 54.6% |
| pi:jah-strong | 74 | 52.7% | baseline | 0.616 | – | 680 | – | 100.0% |
| t2:jah-auto-t75 | 74 | 41.9% | +14.9 [+4.1, +25.7] | 0.135 | -27.3% | 967 | 28.8% | 44.4% |
| t2:jah-strong | 74 | 27.0% | baseline | 0.106 | – | 1357 | – | 100.0% |

*Gemini 4 Argon + Gemini 3.8 Flash, routed at tau = 0.5 (test, 74 tasks; `test_argon_flash`)*

| harness:arm | n | success | Δ vs jah-strong (pt) [95% CI] | $/task | cost saving | agent s/task | time saving | strong share |
|---|---|---|---|---|---|---|---|---|
| dsh:jah-auto | 74 | 70.3% | +4.1 [-5.4, +13.5] | 0.882 | 6.6% | 629 | 21.8% | 50.4% |
| dsh:jah-strong | 74 | 66.2% | baseline | 0.944 | – | 805 | – | 100.0% |
| mswe:jah-auto | 74 | 74.3% | +8.1 [+0.0, +17.6] | 0.788 | 13.3% | 686 | 16.7% | 52.3% |
| mswe:jah-strong | 74 | 66.2% | baseline | 0.909 | – | 824 | – | 100.0% |
| pi:jah-auto | 74 | 59.5% | +6.8 [-2.7, +17.6] | 0.554 | 10.1% | 563 | 17.2% | 56.5% |
| pi:jah-strong | 74 | 52.7% | baseline | 0.616 | – | 680 | – | 100.0% |
| t2:jah-auto | 74 | 33.8% | +6.8 [+0.0, +13.5] | 0.192 | -81.8% | 1263 | 6.9% | 51.7% |
| t2:jah-strong | 74 | 27.0% | baseline | 0.106 | – | 1357 | – | 100.0% |

*Codex with GPT-6.1 Sol + GPT-6 Luna, tau = 0.5 (20 test tasks; `test_codex_openai`)*

| harness:arm | n | success | Δ vs jah-strong (pt) [95% CI] | $/task | cost saving | agent s/task | time saving | strong share |
|---|---|---|---|---|---|---|---|---|
| codex:jah-auto | 20 | 85.0% | +0.0 [-15.0, +15.0] | 0.158 | 6.5% | 273 | -46.9% | 52.9% |
| codex:jah-strong | 20 | 85.0% | baseline | 0.169 | – | 186 | – | 100.0% |

Each routed arm is compared with the `jah-strong` arm of the same harness on the tasks both completed. Δ is the
difference in success in points. "Cost saving" and "time saving" compare the totals over the same tasks. For the
Flash-Lite row the baseline is the `jah-strong` arm of the Argon + Flash test runs (same strong tier, harness version
and tasks; `bench/PROTOCOL.md`, "Changes"). The Codex row is a 20-task check, not a claim.

## What was left out

- **States of `sanitize-git-repo`** (198 rows): the task plants fake credentials (AWS, GitHub and Hugging
  Face key-shaped strings) in a repository for the agent to remove, and they appear in the states. Its `steps` and
  `trials` rows are kept.
- **14 further states** whose text names a commercial AI assistant or its vendor (in task files, in a
  package path and in text an agent wrote), and **2 states** that show the benchmark host's run directory (a
  container's mount table). Their `steps` and `trials` rows are kept.
- Harbor's agent trajectories, terminal recordings, verifier output and logs, the proxy's server logs, error messages
  (only short codes are kept), the runs `smoke` and `smoke-gem2` (plumbing checks) and two assembled views of the test
  runs that would duplicate rows.

## Licence and third-party content

- **Licence: CC BY-NC 4.0** (non-commercial) for the logs, the joined outcomes and the tables, because they contain outputs of commercial models (the Jev decision model and Gemini or OpenAI agent text) whose redistribution terms we cannot extend to commercial use.
- **Terminal-Bench 2.0** task texts and task-container contents (files, command output) appear in `state`.
  Terminal-Bench 2.0 is released under the Apache-2.0 licence (github.com/laude-institute/terminal-bench-2); keep its
  attribution and licence notice. Some task data contains names and e-mail addresses from public software projects
  (for example git history); they come from the benchmark.
- **Model output:** the actions in `state` were written by Gemini 4 Argon, Gemini 3.8 Flash and Gemini 3.5 Flash-Lite
  (Google) or by GPT-6.1 Sol and GPT-6 Luna (OpenAI, `test-codex`); `p_hard` and the decision probabilities are
  outputs of Jev (TypeSafe). Check these providers' terms before you use the data commercially, in particular for
  training a model that competes with theirs.
- By design no provider key entered a task container: each agent got a dummy key and only the proxy held the real
  ones. The files were scanned for our keys and for key-shaped strings before release.

## Citation

```bibtex
@misc{zhu2026jevagentharnessbenchmarkingdeployingtraining,
      title={JevAgentHarness: Benchmarking, Deploying and Training Decision Models That Share Control with LLMs},
      author={Kunlun Zhu and Tao Feng and Xu Han and Heng Wang and Ling Yang and Xiangru Tang and Jiaxuan You and Heng Ji},
      year={2026},
      eprint={2610.21412},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2610.21412},
}
```