Throughput-Aware Trajectory Filtering for Resource-Constrained Coding Agents
Filter and truncate agent execution trajectories based on deployment hardware token throughput to prevent budget timeouts during evaluation.
Time
Compute level
Resources
What the paper used
Prerequisites
Scope
The Gap
In Section 5.3, student model Gemma 4 E4B was fine-tuned on Kimi K3 trajectories that took a median of 15 tool calls on a fast commercial API within an 8-minute budget. When evaluated on 4xL4 GPUs, the 4B model generated ~50 tokens per second per task, causing 54 to 60 of 78 development tasks to exceed the 8-minute execution limit.
“A trajectory that fits in 8 minutes on a fast API does not fit on 4×L4.”
Limitation
Training student agents on trajectories generated by high-throughput API models causes them to imitate an aggressive exploration pace that systematically leads to timeouts on resource-constrained target evaluation hardware.
Proposed Solution
Estimate per-token and per-tool latency on the target deployment hardware during data preprocessing, and prune trajectory steps whose predicted execution time exceeds the hardware budget. Additionally, condition the agent on explicit dynamic budget tokens in the system prompt so it scales back exploration tool calls as available execution time diminishes.
The paper’s authors list this direction as future work, so they may already be pursuing it.
Why This Matters
Expected to substantially reduce task timeouts from ~55 out of 78 tasks down to manageable levels, allowing small 4B agents to focus compute on patch generation rather than running out of time.
How to Get Started
How to test it: Evaluate whether throughput-pruned S1 and S3 fine-tuned models resolve more tasks within the 8-minute budget compared to baseline S1/S3r1 models. The main metric is resolved tasks and timeout counts; the stopping criterion is when pruned models fail due to insufficient context exploration.
- Profile Gemma 4 E4B token generation and tool response execution latency on target 4xL4 hardware.
- Script a trajectory filter in the release codebase to compute estimated execution time and drop turns exceeding 480 seconds.
- Fine-tune the S1 single-agent model on the throughput-filtered trajectory dataset.
- Run evaluation on the 78 development set tasks and log task completion times versus Table 4 baselines.
Suggested by AI. Adapt it to your setup.
Has This Been Done?
None of the listed papers address hardware-aware latency estimation and trajectory pruning or dynamic budget tokens for resource-constrained software engineering coding agents. While works like SWE-fficiency discuss code optimization and RE-Bench or SWE-Stream focus on agent benchmarks and streaming, none propose throughput-aware trajectory filtering or explicit execution budgets in system prompts.
We searched OpenAlex and arXiv for “language model agent context budgeting throughput SWE-bench execution time limit” and “Throughput-Aware Trajectory Filtering for Resource-Constrained Coding Agents” and an AI compared the idea with the top 10 results. A small search can miss relevant work.
Source Paper
Let the Fixer Decide: Training a Code Localizer from the Fixer's LikelihoodKhalil Hennara, Muhammad Hreden, Zeina Aldallal +2 more · 2026
This paper presents Fixer-Guided Localization (FGL), an expectation-maximization framework for training a code localizer sub-agent based on the likelihood assigned to verified patches by a frozen code fixer. By using weighted supervised fine-tuning instead of expensive reinforcement learning with test execution, FGL optimizes localized context size and utility. While offline signal tests show FGL provides 27.5% smaller context windows with equal patch accuracy, end-to-end evaluations on Gemma 4 E4B demonstrate that overall agent performance is primarily bottlenecked by execution timeouts, repetition loops, and edit quality rather than localization quality alone.
Related Ideas
- Execution-Time and Hardware-Cost-Aware Scoring Beyond Token Budgets in Agentic Kernel OptimizationAscendGYM: A Cost-Aware Kernel Optimization Benchmark for Real-World Workloads on Ascend NPUs🟡Fairly easy
- Workload-Adaptive Dynamic Expert Caching for Hybrid GPU-CPU On-Device ExecutionClover-35B-A3B-Preview Technical Report🟡Fairly easy
- Lightweight Perception Distillation and Hierarchical Agent Caching for Budget-Efficient Dexterous Program SynthesisPyRUA-Dex: Learning Programmatic Policies for Dexterous Bimanual Manipulation with Coding Agents🟠Medium
- Cross-Task Skill Seeding and Motion-Planner Fallback for Unsolved Exploration BottlenecksPyRUA-Dex: Learning Programmatic Policies for Dexterous Bimanual Manipulation with Coding Agents🟠Medium
- Full-Trajectory Deployment Cost and Retry-Overhead Profiling for Medical AI AgentsInclusionMed: Benchmarking AI for Inclusive Healthcare🟡Fairly easy