On the Clock: Towards Punctual and Productive Time-Budgeted AI Agents
Organizations: University of Illinois at Chicago · AWS Agentic AI · New York University · AWS
Abstract
We study whether small LLM agents can operate effectively under explicit wall-clock time budgets by both respecting the allocated runtime and using available time productively. We evaluate Qwen3.6-27B on five competitions from MLE-Bench Lite and Qwen3-4B on Zork I (Jericho), two agentic benchmarks where additional computational time can meaningfully improve performance. In the simplest setting, where the budget is stated only in the prompt, agents fail to translate the stated budget into controlled use of time. These failures arise from gaps in time awareness, since the harness provides no timing feedback, but also because they cannot reliably anticipate the duration of actions, and do not have a learned mapping from available time to an appropriate strategy. We investigate two complementary classes of interventions: harness-based mechanisms that expose timing information and enforce deadlines, and reinforcement learning with budget-aware rewards. Injecting timing information through the harness substantially improves budget adherence for Qwen3.6-27B without measurable loss in performance, while enforcement hooks tighten adherence further. RL with GRPO achieves near-perfect budget adherence on Zork I and generalizes to held-out budgets not seen during training, but does not improve task performance over the untrained harness on MLE-Bench. Once agents are made to respect the budget, they still fail to use additional time to improve task performance. RL-trained policies learn when to stop but often fill extra time with repeated actions, and GRPO training on multiple budgets tends to collapse toward the strategy learned for the shortest budget. Our results reveal a gap between time adherence and productive time allocation, which remains a central challenge for budget-conditioned agents.
Figures & tables
| Model | Budget | On time | Elapsed | Quality |
|---|---|---|---|---|
| Qwen3.6-27B | 8 min | |||
| 15 min | ||||
| 60 min | ||||
| none | – |
| Condition | On budget (%) | Quality (%ile) | Turns | Time (s) | Valid (%) |
|---|---|---|---|---|---|
| Prompt only | 15 | 78 | |||
| + Harness (clocks) | 62 | 88 | |||
| + Enforcement (clamp) | 74 | 90 | |||
| + Enforcement (refuse) | 88 | 78 | |||
| + RL (GRPO, refuse) | 86 | – | 74 |
| Hook | When it fires | What it does |
| Per-tool clock | After every tool call | Adds the time remaining to the result the agent reads |
| Periodic reminder | On a fixed time interval | Reports the time remaining even while a command is still running |
| Generation accounting | After every tool call | Reports how long the model spent generating text before the action |
| Enforcement (clamp) | Before a shell command runs | Shortens the command’s time limit so it stops by the deadline; the command still runs, but is cut off |
| Enforcement (refuse) | Before a shell command runs | Blocks the command and returns a message explaining why, so the agent must choose something cheaper |
| Condition | Budget in | Per-turn | Callable | System prompt |
|---|---|---|---|---|
| prompt | clock | clock | at s | |
| No Budget | – | – | – | 1301 |
| Budget in Prompt | yes | – | – | 1456 |
| Clock Tool | yes | – | yes | 1766 |
| Clock Tool++ | yes | – | yes | 3013 |
| Auto-Clock | yes | yes | – | 1456 |
| Algorithm | GRPO ( adv_estimator=grpo ), KL loss on, kl_loss_coef |
|---|---|
| Policy | Qwen3-4B, trained from the base model (no warm start) |
| Learning rate | |
| Batching | train batch , PPO mini-batch , micro-batch per GPU, |
| gradient checkpointing on | |
| Group size | rollouts per prompt episodes per step |
| Sampling | temperature , thinking disabled |
| Elapsed Time (s) | Score (max = 350) | |||||||||||
| Budget (s) | 0.5 | 1 | 2 | 4 | 8 | 16 | 0.5 | 1 | 2 | 4 | 8 | 16 |
| Qwen3-4B | ||||||||||||
| Budget in Prompt | ||||||||||||
| + Clock Tool | ||||||||||||
| + Clock Tool++ | {\color[rgb]{0.1211,0.3047,0.4727}\mathbf{16.1{\scriptstyle\pm 13.3}}} | |||||||||||
| + Auto-Clock | {\color[rgb]{0.1211,0.3047,0.4727}\mathbf{2.3{\scriptstyle\pm 0.3}}} | {\color[rgb]{0.1211,0.3047,0.4727}\mathbf{3.6{\scriptstyle\pm 1.1}}} | {\color[rgb]{0.1211,0.3047,0.4727}\mathbf{8.2{\scriptstyle\pm 2.2}}} | {\color[rgb]{0.1211,0.3047,0.4727}\mathbf{14.2{\scriptstyle\pm 4.0}}} | ||||||||
| Reward | On-target (%) | Score (of 350) | Median | Steps to score |
|---|---|---|---|---|
| linear | 100.0 | 8.7 | 1.00 | – |
| gaussian | 99.7 | 20.8 | 1.00 | 89 |
| step_wise | 96.1 | 22.5 | 1.00 | 56 |
| setting | model | 0.5 s | 1 s | 2 s | 4 s | 8 s | 16 s |
|---|---|---|---|---|---|---|---|
| thinking off | |||||||
| Clock Tool | Qwen3-4B | 0.00 | 0.00 | 0.19 | 0.00 | 0.81 | 0.00 |
| Clock Tool | Qwen3.5-9B | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
| Clock Tool | Qwen3.8-27B | 0.25 | 0.19 | 0.25 | 0.12 | 0.06 | 0.38 |
| Clock Tool++ | Qwen3-4B | 0.19 | 0.81 | 1.75 | 2.06 | 2.75 | 3.12 |
| Clock Tool++ | Qwen3.5-9B | 0.88 | 0.50 | 0.50 | 0.19 | 0.31 | 1.00 |
| Mean signed error (s) | |||||
|---|---|---|---|---|---|
| Model | Clock | Elapsed | Budget left | Time to finish | Total runtime |
| Qwen3.6-27B | no | ||||
| yes | |||||
| Reward | Shape | Behaviour |
|---|---|---|
| Unshaped | ||
| Flat in , just the game score as reward | ||
| Cutoff | ||
| Meet the deadline or forfeit the score. Finishing much earlier than the budget receives the same reward as finishing exactly at the budget. | ||
| Linear | ||
| The time bonus rises linearly to its maximum at and then decreases linearly, reaching zero at . |
| Symbol | Meaning | Steps 1–105 | Steps 106–182 |
|---|---|---|---|
| quality term | band, | ||
| bonus for a gradeable file | |||
| bonus for finishing on budget | |||
| on-budget speed slope | |||
| share of kept when late | |||
| maximum late penalty |
| Algorithm | GRPO, KL loss on (low-variance estimator), coefficient |
|---|---|
| Policy | Qwen3.6-27B, trained from the released weights |
| Learning rate | , constant; weight decay |
| Group size | episodes per (competition, budget); groups per step |
| Response length | tokens per generation |
| Parallelism | tensor parallel , pipeline parallel |
| Checkpoints | every steps |