arXiv:2610.28409cs.LGOct 2026

Manuscript Offprint

arXiv:2610.28409

Rewards for Budget-Aware Multi-Turn Agents That Adapt to Arbitrary Test-Time Constraints

Tom A. Lamb, Adam Golinski, Eleonora Gualdoni, Sinead Williamson, Michael Kirchhof

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

Tom A. Lamb 1,2,∗^{1,2,*}, Adam Golinski 1^{1}, Eleonora Gualdoni 1^{1}, Sinead Williamson 1^{1}, Michael Kirchhof 1^{1}

1^{1}Apple, 2^{2}University of Oxford

*Work completed during an internship at Apple.

Large language model agents are often given an inference budget and asked to maximise success within it. A multi-turn agent has to allocate this budget across many environment interactions. An external harness can enforce the budget, but it remains unclear whether the agent itself can learn when and how much to spend. We ask whether agents can learn this allocation across dynamically specified budgets and which rewards best teach this behaviour. We adapt existing length penalties to budget constraints spanning multiple resource types, introduce new reward formulations, and compare eleven objectives in a shared training pipeline. We train Qwen3.5 models at 4B and 9B on AppWorld with budgets over tokens, API calls, and environment steps, and on the BabyAI gridworld with turn budgets. We train a separate policy for each environment and resource type, with each policy trained across budget values. Training with rewards that penalise overspending substantially improves within-budget success and natural compliance over untrained models and over training on task success alone, with agents learning to adapt their resource use to stated budgets and task difficulty. These gains extend to unseen budgets and, zero-shot, to a shifted task distribution and a new benchmark. Reward objectives trade off success within budget and natural compliance. A sigmoid penalty for overspending most often achieves the highest within-budget success at an individual budget, while a fixed negative reward for overspending generally yields the strongest natural compliance. Combining penalties for overspend frequency and magnitude gives the smallest average gap to the best method at each budget. Overall, we show that a single agent can learn to allocate resources across turns and adapt its behaviour to user-specified budgets using budget feedback without external budget-allocation controllers.

Correspondence: Tom A. Lamb: thomas.lamb@eng.ox.ac.uk

Date: October 21, 2026

1 Introduction

Agents can solve harder tasks by spending more at test time, thinking for longer and taking more actions in an environment (Snell et al., 2024; Guo et al., 2025; Yu et al., 2026). Current frontier agents give users some control over the effort in terms of generated tokens, tool calls, or environment actions (Liu et al., 2025b). To respond to different budgets, an agent needs to adapt its strategy to maximise success under the allowance it receives.

Budget-aware training has largely focused on controlling the cost of a single model generation (Aggarwal and Welleck, 2025; Liu et al., 2026; Wen et al., 2025). A multi-turn agent instead shares one budget across many turns, and at each turn the policy has to decide when and how much to spend given what remains (Liu et al., 2025b). This allocation is usually left to external machinery at inference time, including planners, harnesses, or routers, and is not learned by the policy itself (Zhang et al., 2026; Liu et al., 2025b). That machinery adds complexity at inference, and it remains unclear whether the task-performing policy can learn to allocate these resources itself. Different constraints may also call for different behaviour. This leads to our first question. Can we train a multi-turn agent to maximise task success under dynamically specified budgets, across different inference resources?

Figure

RewardBudget CutoffBudget JumpIn-Budget CostOverspend SizeFailure Return < 0Learned Price
Trunc✓✕✕✕✕✕
Gate✕✓✕✕✕✕
Gate-Neg✕✓✕✕✓✕
Rate✕✓✕✕✓✓
Linear-Mag✕✕✕✓✓✕
Linear-Cost✕✕✓✓✓✕
Sigmoid-Gate✕✕✕✓✓✕
Sigmoid✕✕✓✓✓✕
Exp-Mag✕✕✕✓✕✕
Dual✕✓✕✓✓✓

Figure 1 Cost-conditioned rewards. [Left] Return GG against episode cost CC for successful (R=1)(R = 1) and failed (R=0)(R = 0) trajectories across different cost-conditional rewards. Shading marks C>BC > B. Bands illustrate Λb∈[0,1]\Lambda_b \in [0,1] for Rate and Dual. [Right] Reward properties: Budget Cutoff stops rollouts before exceeding BB, Budget Jump denotes a return discontinuity at BB, In-Budget Cost penalises resource use before BB, Overspend Size makes the return depend on the extent of overspending, Failure Return <0< 0 means failed trajectories can receive negative return, and Learned Price denotes a separate learned violation price for each training budget.

We study this through reward shaping. In single-generation tasks, length penalties are often subtracted from rewards when an agent exceeds a token limit. Overlong trajectories are still collected, and they can show how to solve a task, which helps most when successes within budget are rare. Some frontier models use linear penalties (Yu et al., 2026; Xu et al., 2026), and others use step functions (Team et al., 2026). Learned budget penalties draw on constrained optimisation (Altman, 2021; Stooke et al., 2020), while cost penalties have also been used to train budget-aware routers (Zhang et al., 2026). It is not clear in advance which objectives best train a single multi-turn policy across dynamically specified budgets and different resource types. This leads to our second question. Which training objectives best teach multi-turn agents to maximise task success while complying with dynamically specified budgets?

To address these two questions, we introduce a framework for training a single policy across dynamically specified episode-level budget values, with a separate policy for each environment and resource type. The policy is told its total and remaining budget in natural language at every turn, so it can learn to allocate resources as the episode goes on. Within this framework, we adapt existing penalised objectives that punish excessive resource use or budget violations to the multi-turn, multi-budget setting and introduce new reward formulations. We then compare these objectives directly to see which ones best teach budget-aware behaviour. We train and evaluate on AppWorld (Trivedi et al., 2024), with budgets on generated tokens, environment interactions, or tool calls. We test generalisation to budgets not seen during training, distribution shift on AppWorld test-challenge, and zero-shot transfer to ASTRA (Xiu et al., 2026). To broaden the evaluation to a different environment and task format, we also train and evaluate on BabyAI (Chevalier-Boisvert et al., 2019), a text-based gridworld.

Our contributions are as follows:

  • We introduce a framework for training and evaluating multi-turn agents across dynamically specified budgets and resource types, with metrics for task success within budget and natural budget compliance.

  • We adapt existing cost-conditioned objectives to the multi-turn, multi-budget setting and introduce new reward formulations, covering hard success gating, continuous cost shaping, and fixed or learned overspend penalties.

  • We show that the strongest budget-shaped objectives improve within-budget success and natural com-

pliance over untrained models and budget-independent task-reward training across token, tool-call, and environment-step budgets. On AppWorld, learned resource allocation responds to the stated budget and task difficulty and generalises to unseen budget values. Under step budgets, improvements persist on test-challenge and under zero-shot transfer to ASTRA. We also evaluate budget-aware behaviour in BabyAI.

  • We identify distinct trade-offs between budget utility, natural compliance, and overspend severity, with no single objective dominating across all criteria. Dual has the smallest average utility gap to the best method at each budget, Sigmoid-Gate most often achieves the highest utility at an individual budget, and Gate-Neg generally achieves the highest natural compliance.

References (27)