EnvOpt: Automated Optimization for Agent Environments

Mingxuan Li, Joseph E. Gonzalez, Alex Dimakis and colleagues (UC Berkeley Sky Computing Lab, University of Chicago, Bespoke Labs) propose optimizing the shared environment an agent works in, as a third target alongside model weights and the harness.
Ask this paper
Setting. Many agents work in stationary environments shared by many tasks, such as a company's Slack workspace or a collection of documents and tickets. EnvOpt changes what the environment holds and how it is presented to the agent.
Method. A coding agent such as Codex runs the target agent on training tasks that have no graders or reference answers, revises the environment, and decides when to stop using a held-out validation set.
AutomationBench. EnvOpt cuts Claude Haiku 4.5's cost by 72.7% and raises its pass rate by 14.34%. The same optimized environment transfers to Opus 5 with 68.1% lower cost and a 1.34% gain.
Stacks with harness optimization. Added on top of Meta-Harness's optimized harness for Haiku 4.5, it lowers cost by a further 83.4% and adds 11.17% accuracy.
Payback. One optimization run costs about $150 and saves more than ten times that. Across 5 benchmarks it outperforms tool-only optimization.
Abstract
An LLM agent's cost and success depend on its model, its harness, and its environment. In addition to the widely studied directions of parameter tuning and harness optimization, we propose the third direction: optimization over stationary environments. Agents are often deployed in rich environments shared by many tasks, such as a company's Slack workspace or a complex collection of data sources, documents or tickets. We call these environments stationary environments. We introduce EnvOpt, a method for automated end-to-end optimization of stationary environments for any given model and harness, using real or synthetic tasks without needing any graders or reference answers. On AutomationBench, EnvOpt reduces the cost of Claude Haiku 4.5 by 72.7% and raises its pass rate by 14.34%. The same environment transfers to Opus 5, cutting its cost by 68.1% with a 1.34% gain. Added on top of Meta-Harness's optimized harness for Haiku 4.5, it lowers cost by a further 83.4% and adds 11.17% accuracy over Meta-Harness alone. Across 5 benchmarks, EnvOpt significantly reduces the cost of agents while improving or maintaining pass rate, and is transferable to different models and different harnesses. We also discuss common successful and rejected environment optimization strategies during automated optimization. More broadly, our results show that how information is represented to an agent shapes both its cost and its success, making the environment worth optimizing in addition to the parameters and the harness.