arXiv:2611.07372cs.AINov 2026

Manuscript Offprint

arXiv:2611.07372

EnvOpt: Automated Optimization for Agent Environments

Mingxuan Li, Huanzhi Mao, Qiuyang Mang, Hanchen Li, Joseph E. Gonzalez, Alex Dimakis

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

1 Introduction

An LLM agent’s cost and success rate depend on three things: the model parameters, the harness, and the structure of the environment it interacts with. The first two are actively optimized through parameter tuning and harness optimization (Lee et al., 2026; Agrawal et al., 2026b), while the environment is often considered immutable. Yet, the same information can be given to an agent in very different forms. For example, a company’s Slack history can either sit behind a remote server and be accessible via MCP or exported in plain text files that can be read and searched with terminal tools like grep. This choice alone can significantly affect how much work the agent needs to perform to solve a task (Mak et al., 2026). In this paper, we propose optimizing stationary environments as a third axis for improving LLM agents, alongside model parameter tuning and harness optimization. Stationary environments refer to environments with large collections of artifacts that remain the same or are similar across many tasks. For example, a banking agent uses the same enterprise platforms and databases for a massive number of queries; many tasks for a company’s Slack assistant depend on the same Slack workspace; feature requests for a toolkit can rely on the same code repository. We aim to optimize how the stationary environments are organized and represented to agents.

Though the environment has not received the same systematic optimization as model parameters and harnesses, previous work has shown that refining agent-environment interactions can improve agent performance. SWE-agent (Yang et al., 2024) and subsequent work (Xu et al., 2026) showed that the same model fixes more issues with fewer steps when given a better interface to the repository (Xu et al., 2026), but these interfaces were manually designed. Later work reshapes environments to create more training signal for

(a) Cost reduction on stationary environment

AutomationBench, Claude Opus 4.8

Figure

(b) Offline environment optimization

Figure

Figure 1 ENVOPT on AutomationBench. Left: ENVOPT costs around USD $150 for an offline optimization of the stationary environment in AutomationBench, and saves cost of running Claude Opus 4.8 by 77.5%, easily saving many times the cost of running ENVOPT. Lines are derived by random sampling actual cost of running the test set tasks. Right: Illustration of how offline optimization works in ENVOPT. With a fixed model and harness, ENVOPT uses disjoint sets of training tasks (without verifiers) at each step to optimize the environment. After each step, the optimized environment is tested on a separate validation set to determine when the whole process should be stopped.

reinforcement learning (RL) (Lu et al., 2026; Huang et al., 2026), but these modifications are designed to improve model training rather than the execution efficiency of deployed agents. PREPING and CORPUS2SKILL mainly focus on distilling information from the environment into reusable agent memory and skills, rather than directly optimizing how the stationary environment itself is organized and represented (Choi et al., 2026; Sun et al., 2026). In sum, the community has explored how to utilize environment during RL, optimize the tool interface of environment, or refine the environment for specific use cases, but environment optimization itself as the third direction of agent optimization remains underexplored.

We present ENVOPT, which is an automated pipeline to optimize the environment for any agent and any stationary environment. Using training tasks without verifiers, we let a coding agent, equipped with access and budget to run a target agent on the stationary environment, to optimize the environment representation for the target agent. The optimization target includes what the environment holds (e.g. adding a database to the environment or restructuring it) and ways it is exposed to the target agent (e.g. new API endpoints). The optimized environment is monitored with a validation set with verifiers to track cost and pass rate, and tested on a held-out test set.

Across five benchmarks covering workspace tasks, data engineering tasks, and software engineering tasks (see Section 3), ENVOPT reduces the cost of the target agent on unseen test sets by an average of 48%, with higher or similar pass rates. On AutomationBench (Shepard & Salimans, 2026), ENVOPT outperforms Meta-Harness (Lee et al., 2026) by 9.67% pass rate with only 15% of its cost. We also show that ENVOPT constitutes an optimization direction orthogonal to harness optimization and parameter tuning in two ways: (1) the environments optimized for the target agents can transfer to other agents, even to those with different harnesses and to models stronger than the one proposing the optimizations; (2) we applied the environment from ENVOPT on top of Meta-Harness and observe similar cost reductions and 16% improvement in pass rate, outperforming either Meta-Harness or ENVOPT alone.

Our contributions are as follows:

  • We define environment optimization over stationary environments as a new orthogonal direction for improving LLM agents. Our method can be combined with parameter tuning and harness optimization.

  • We develop ENVOPT, an automated pipeline for environment optimization, and show that across 5

Figure