Evaluating Agents Across Runtime Contracts: When Mismatch Costs Efficiency or Quality
cs.AI, cs.LG
Submitted: 2026-03-01
Updated: 2026-09-26
License: http://creativecommons.org/licenses/by/4.0/
The gist: In CodeAct, language-model agents write Python that calls tools and use execution feedback to choose actions.
Terminology
Abstract
In CodeAct, language-model agents write Python that calls tools and use execution feedback to choose actions. Persistent runtimes preserve Python variables between actions; stateless runtimes clear them without resetting task progress. Training traces demonstrate task-solving strategies and runtime-specific ways to store and recover intermediate results. We study runtime transfer: whether agents trained under one contract remain effective under the other, a dependence that fixed-runtime evaluations can conceal. Across three tasks requiring a working record built from tool feedback, we fine-tune separate Qwen3-8B agents per task and runtime on instance-paired persistent and stateless traces and evaluate all four training-deployment combinations. We vary the per-turn tool-call cap: how many calls one Python action may execute. In our primary task, agents inspect hidden item attributes and select a high-value subset under a weight limit. At 80 calls per turn, a persistent-trained agent deployed statelessly scores 0.61 of optimal value against 0.77 under matched persistent deployment, but uses 4.4 times as many tokens rebuilding its record. Tightening the cap to 25 reduces mismatched quality to 0.07 while matched quality remains 0.66. Trace replay shows that the cap interrupts inspection, the reset erases the partial record, and rebuilding consumes calls needed for progress. The widening gap replicates across training seeds, a second rollout, and two additional base models. Across the settings studied, cap tightening produces a mismatch-specific collapse only where interruptions are frequent and matched execution resumes while mismatched execution restarts. Evaluations of trace-fine-tuned agents should specify episode limits, test runtime transfer across caps, and report cost alongside quality; otherwise, the same mismatch may appear as redundant computation or near-total quality loss.
Sources
- FireAct: Toward Language Agent Fine-tuning
- Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks
- It's Not the Capability: Harness Sensitivity Is Non-Monotone Across LLM Agent Tiers
- QLoRA: Efficient Finetuning of Quantized LLMs
- Calibrate-Then-Act: Cost-Aware Exploration in LLM Agents
- PAL: Program-aided Language Models
- ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving
- LoRA: Low-Rank Adaptation of Large Language Models
- Efficient Memory Management for Large Language Model Serving with PagedAttention
- CostBench: Evaluating Multi-Turn Cost-Optimal Planning and Adaptation in Dynamic Environments for LLM Tool-Use Agents
- The Llama 3 Herd of Models
- ToolSandbox: A Stateful, Conversational, Interactive Evaluation Benchmark for LLM Tool Use Capabilities
- MemGPT: Towards LLMs as Operating Systems
- Agent Data Protocol: Unifying Datasets for Diverse, Effective Fine-tuning of LLM Agents
- MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language Feedback
- ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization
- Qwen3 Technical Report
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
- Harness-Bench: Evaluating Agent Harnesses across Models and Realistic Workflows
- MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon Agents
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Agents' Last Exam
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems