Tev: Scaling Long-Horizon Agentic Environments with Dense Progress Rewards
Organizations: Adobe Research · University of California, Los Angeles
Abstract
Long-horizon agents have drawn growing attention for their ability to work autonomously -- from hours to days -- on economically valuable tasks, a capability essential to automated discovery and recursive self-improvement (RSI). Yet open-source models still struggle on long-horizon tasks, largely for lack of both training data and a working recipe, and scaling both is hard: long, complex tasks are difficult to curate and verify, and their rewards are sparse. We address both. First, we introduce Tev-Gym, the first long-horizon agent training dataset with verifiable, dense, progressive rewards -- 1,170 verified task environments across 7 domains. It is built on a latent-world-first approach that first constructs a latent world: a complete and correct hidden specification of the task domain, workflow, and expected state after each step. Each task is then progressively rendered from this specification into an agent-facing environment, enabling controllable complexity and a natural progress metric. Second, we turn this metric into a training recipe: via progress-potential reward shaping (PPRS), we convert progress into a dense per-step reward that improves training efficiency and makes otherwise-intractable tasks trainable. Training with this recipe yields Tev-27B, which achieves substantial gains on the Agents' Last Exam computing and math sciences domains (ALE-CM), matching GPT-6 Astra and Claude Opus 5 at Pass@5. Despite training only on ALE-related data, it generalizes to the Terminal-Bench (TB) 3.0 and 4.0 subsets, surpassing GLM 5.2 and Gemini 3.7 Flash, and reaches Claude Opus 4.8-level performance on middle-horizon tasks such as TB 2.1.
Figures & tables
| Dataset | Size | # Domains | Agent time (min) | Oracle | Grading | Progressive | P@1 | P@8 | |
| Median | Mean | Metric | Reward | ||||||
| SWE-Smith ( Yang et al., 2025a ) | 50.1k | 1 | 2.0 | 2.4 | unit tests | pass/fail | ✗ | 47% | 52% |
| Terminal-Universe ( Wu et al., 2026 ) | 32.0k | 3 | NA | NA | pytest | pass/fail | ✗ | NA | NA |
| TMAX-15K ( Ivison et al., 2026 ) | 14.6k | 3 | 1.3 | 2.1 | unit tests | pass/fail | ✗ | 74% | 80% |
| SETA ( Shen et al., 2026 ) | 4.5k | 4 | 1.2 | 2.1 | unit tests | test fraction | ✗ | 80% | 88% |
| Endless Terminals ( Gandhi et al., 2026 ) | 3.3k | 2 | 0.5 | 0.7 | unit tests | pass/fail | ✗ | 83% | 89% |
| Model | Harness | Math & Science | ML | Coding & System | All (Avg) | ||||||||||||
| S@1 | S@5 | P@1 | P@5 | S@1 | S@5 | P@1 | P@5 | S@1 | S@5 | P@1 | P@5 | S@1 | S@5 | P@1 | P@5 | ||
| Frontier API models | |||||||||||||||||
| GPT-6 Astra | Codex | 0.58 | 0.58 | 0.38 | 0.38 | 0.48 | 0.49 | 0.20 | 0.20 | 0.81 | 0.85 | 0.20 | 0.20 | 0.62 | 0.63 | 0.28 | 0.28 |
| Claude Fable 5 | Claude Code | 0.47 | 0.51 | 0.38 | 0.38 | 0.52 | 0.57 | 0.24 | 0.40 | 0.83 | 0.90 | 0.20 | 0.20 | 0.58 | 0.63 | 0.29 | 0.33 |
| GPT-5.6 (sol) | Codex | 0.50 | 0.51 | 0.38 | 0.38 | 0.46 | 0.49 | 0.20 | 0.20 | 0.82 | 0.85 | 0.20 | 0.20 | 0.58 | 0.60 | 0.28 | 0.28 |
| GPT-5.6 (terra) | Codex | 0.51 | 0.56 | 0.38 | 0.38 | 0.25 | 0.26 | 0.00 | 0.00 | 0.75 | 0.83 | 0.20 | 0.20 | 0.50 | 0.55 | 0.22 | 0.22 |
| Model | TB 3.0 (22 tasks) | TB 4.0 (18 tasks) | ||||||||||||||||||
| Software | ML | Operations | Security | All | Software | ML | Operations | Security | All | |||||||||||
| P@1 | P@5 | P@1 | P@5 | P@1 | P@5 | P@1 | P@5 | P@1 | P@5 | P@1 | P@5 | P@1 | P@5 | P@1 | P@5 | P@1 | P@5 | P@1 | P@5 | |
| Claude Fable 5 | 0.50 | 0.80 | 0.45 | 0.50 | 0.15 | 0.25 | 0.40 | 0.75 | 0.41 | 0.64 | 0.53 | 0.62 | 0.60 | 0.75 | 0.05 | 0.25 | 0.70 | 1.00 | 0.46 | 0.61 |
| Claude Opus 5 | 0.54 | 0.60 | 0.60 | 0.75 | 0.40 | 0.50 | 0.55 | 0.75 | 0.53 | 0.64 | 0.47 | 0.62 | 0.75 | 1.00 | 0.20 | 0.50 | 0.90 | 1.00 | 0.52 | 0.72 |
| GPT-5.6 (sol) | 0.32 | 0.50 | 0.65 | 0.75 | 0.10 | 0.25 | 0.70 | 0.75 | 0.41 | 0.55 | 0.33 | 0.62 | 0.70 | 1.00 | 0.00 | 0.00 | 0.80 | 1.00 | 0.39 | 0.61 |
| GPT-5.6 (terra) | 0.22 | 0.50 | 0.55 | 0.75 | 0.05 | 0.25 | 0.50 | 0.75 | 0.30 | 0.55 | 0.10 | 0.38 | 0.50 | 0.75 | 0.00 | 0.00 | 0.70 | 1.00 | 0.23 | 0.44 |
| Model | Pass@1 | Pass@5 |
| GPT-6 Astra (Codex, high) | 0.874 | 0.944 |
| Fable 5 (Claude Code, xhigh) | 0.838 | 0.933 |
| Opus 4.8 (Claude Code, high) | 0.789 | 0.944 |
| Sonnet 5 (Claude Code, high) | 0.746 | 0.921 |
| Qwen3.5-9B (base) | 0.178 | 0.292 |
| Tev -9B (ours) | 0.227 | 0.348 |
| Method | Data | Reward | GPU-h / step | ALE-CM | |||||||
| World | DAG | Hidden truth | Signal | Credit | Adv. norm. | S@1 | S@5 | P@1 | P@5 | ||
| Qwen3.5-9B (base) | – | – | – | no RL | – | – | – | 0.25 | 0.33 | 0.06 | 0.06 |
| Tev -9B (ours) | ✓ | ✓ | ✓ | + terminal | , | per turn | 9.0 | 0.29 | 0.40 | 0.07 | 0.11 |
| Data ablation: replace one construction step with an LLM; terminal reward, compare with Sparse | |||||||||||
| Public-view verifier | ✓ | ✓ | LLM | terminal | whole rollout | per rollout | 22.3 | 0.24 | 0.35 | 0.04 | 0.06 |
| Prompt-first | LLM | LLM | LLM | terminal | whole rollout | per rollout | 11.8 | 0.23 | 0.32 | 0.06 | 0.06 |
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
| Subdomain | Scope |
| 9.1 Software Engineering | Feature implementation, debugging, refactoring, and test authoring across real codebases, turning issues and specs into working, tested code changes. Verified by: test-suite pass (gate then score), behavioral correctness under fixed inputs, and no regression in existing tests. |
| 9.2 Data & Analytics Engineering | ETL/ELT pipelines, recommender and ranking systems, feature engineering, and analytics workflows, turning raw data into validated datasets, features, and model outputs. Verified by: output values exact or within tolerance, schema validity (gate), metric reproduction, and feature-parity against a reference. |
| 9.3 AI Engineering, Safety & CS Research | Model training and evaluation pipelines, research-paper reproduction, checkpoint and config management, and alignment/safety experiments, turning specs and code into reproduced results. Verified by: reproduced metrics within tolerance (FID, accuracy, etc.), config and alignment exactness, artifact validity, and deterministic-under-seed behavior. |
| 9.4 Mathematical & Operations Research | Combinatorial optimization, game-theoretic equilibrium computation, applied mathematics and number theory, and probabilistic estimation and filtering, implemented from specifications. Verified by: objective or solution exact or within tolerance, an optimality/feasibility certificate (gate), and reproducibility under a fixed seed. |
| 9.5 Cybersecurity & Digital Forensics | Reverse engineering and malware-config extraction, network and packet triage, crackme and key-generation analysis, and incident forensics, turning binaries and captures into extracted artifacts and findings. Verified by: extracted-value exactness against a reference (hash/string), finding-set precision and recall, and decoded-artifact correctness (gate). |
| 9.6 Infrastructure Engineering & Cloud Operations | Kubernetes migration and configuration, root-cause analysis of production incidents, OS and security hardening, and infrastructure-as-code, turning infrastructure specs and incidents into working, secured systems. Verified by: the system’s world-state (resources/health) under fixed inputs, config correctness against a reference, incident-cause exactness, and policy-check pass (gate). |
| Gate | What it enforces | Failure class it targets |
| Reward causality | each reward component drops when its cause is mutated | reward credits the wrong outcome |
| Exploit resistance | all 14 gaming probes score | verifier loophole, shortcut acceptance |
| Role independence | disjoint reference/alt/verifier/progress closures | shared bias between solver and grader |
| Solver agreement | reference and alternative solvers yield identical trees | verifier-only acceptance, unresolved spec. |
| Progress validity | ; monotone; decreases on regression | invalid process signal |
| Metamorphic invariance | meaning-preserving rewrites keep the grade; stale outputs fail | over-narrow verifier; stale-state acceptance |
| Per-environment horizon (median) | Difficulty (P@1) | ||||||
| Category | Task envs. | Stages | Input files | Corruptions | Formats | Base 27B | Frontier |
| Math & Science | 264 | 6 | 8 | 1 | 7 | 0.04 | 0.31 |
| ML | 242 | 6 | 12 | 1 | 11 | 0.03 | 0.24 |
| Coding & System | 664 | 6 | 14 | 3 | 19 | 0.03 | 0.30 |
| Tev-Gym (total) | 1,170 | 6 | 12 | 2 | 15 | 0.03 | 0.29 |
| Corpus | Anchor | Model in generation | Validation | Difficulty control | Coverage control | Progress signal |
| SWE-Smith ( Yang et al., 2025a ) | repository | bug injection, task text | tests run post hoc | – | – | none |
| Terminal-Universe ( Wu et al., 2026 ) | agent trajectory | trajectory, task text | pytest post hoc | – | – | none |
| TMAX-15K ( Ivison et al., 2026 ) | task text | task, container, tests | none; RL soft-filters | – | topic balancing | none |
| SETA ( Shen et al., 2026 ) | task text | task, tests | solvability post hoc | – | – | test fraction |
| Endless Terminals ( Gandhi et al., 2026 ) | task text | task, container, tests | solvability post hoc | – | – | none |
| CLI-Gym ( Lin et al., 2026 ) | agent trajectory | trajectory, task text | tests post hoc | – | – | none |
| Evaluation set | Tasks | 13-gram hits | 8-gram hits | Max token cov. | NN Jaccard med. / max |
| ALE-CM | 18 | 0 | 0 | 0.0% | 0.22 / 0.38 |
| TB 3.0, all | 74 | 0 | 0 | 0.0% | 0.13 / 0.18 |
| TB 3.0, CM subset | 22 | 0 | 0 | 0.0% | 0.14 / 0.18 |
| TB 4.0, all | 66 | 0 | 0 | 0.0% | 0.13 / 0.18 |
| TB 4.0, CM subset | 18 | 0 | 0 | 0.0% | 0.14 / 0.18 |
| TB 2.1 | 89 | 0 | 0 | 0.0% | 0.10 / 0.16 |
| Setting | Value |
| Objective | group-relative policy gradient with centered advantages (Eq. ( 2 )) |
| Trust region | total-variation divergence bound on the policy ratio (DPPO loss); no KL anchor ( ) |
| Rollouts per task ( ) | 24 |
| Unique tasks per step | 8 (192 rollouts per step) |
| Active sampling | zero-variance groups discarded and refilled |
| Optimizer | AdamW, learning rate , constant schedule, one epoch per batch |
| Category | Task | Title |
| Math & Science (8) | branch_bound_atsp | Branch-and-Bound ATSP Solver |
| cfr_game_theory_equilibrium | CFR Game Theory Equilibrium | |
| particle_filter_nonlinear_tracking | Particle Filter Nonlinear Tracking | |
| k3_abelian_extensions | Finite Abelian Extension Classification | |
| synthetic_causal_structure_inference | Synthetic Causal Structure Inference | |
| clustered_cyclic_code_circuit_level_simulation | Clustered-Cyclic Code Circuit Simulation |
| TB task | TB category | In TB 4.0 |
| batched-eval-parity | ML / Evaluation | yes |
| cargo-flight-dispatch | Operations / Logistics | yes |
| cli-2ph-simplex | Software / Algorithms | – |
| ctr-optimization | Operations / Marketing | yes |
| data-anonymization | Software / Data engineering | yes |
| distributed-dedup | Software / Systems | yes |
| Model | Harness | Our ALE-CM split (18 tasks) | Official full ALE (152 tasks) | Official | ||
| S@1 | P@1 | Score | Pass rate | effort | ||
| GPT-5.6 (sol) | Codex | 0.58 | 0.28 | 0.54 | 0.31 | xhigh |
| GPT-5.6 (terra) | Codex | 0.50 | 0.22 | 0.51 | 0.28 | max |
| Claude Opus 5 | Claude Code | 0.58 | 0.28 | 0.55 | 0.32 | high |
| Claude Opus 4.8 | Claude Code | 0.52 | 0.22 | 0.45 | 0.27 | max |
| Gemini 3.1 Pro | Gemini CLI | 0.52 | 0.21 | 0.33 | 0.16 | default |
| Task | Category | Best frontier rollout | Second frontier rollout | Base rollout | Ours |
| k8s_payment_api_root_cause_analysis | Coding & Sys. | 0.97 (Claude Fable 5) | 0.75 (GPT-6 Astra) | 0.70 | 0.97 |
| ising_post_measurement_1 | Math & Sci. | 1.00 (Claude Fable 5) | 1.00 (GPT-5.6 sol) | 0.00 | 1.00 |
| branch_bound_atsp | Math & Sci. | 1.00 (Claude Fable 5) | 1.00 (GPT-5.6 sol) | 0.00 | 1.00 |
| k3_abelian_extensions | Math & Sci. | 1.00 (Claude Fable 5) | 1.00 (GPT-5.6 sol) | 0.00 | 1.00 |
LLM Agent Training
Large language model agent training teaches models to plan, use tools, and learn from multi-step interaction with environments.
See all 581 papers