Manuscript Offprint

arXiv:2610.27290

TEX: Test-Time Scaling Testing Agents via Execution-based Cross-Validation

Akash Gokul, Srijan Bansal, Yingbo Zhou, Semih Yavuz

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

Abstract

Test-case generation is critical but remains challenging for language models. Existing test-time scaling methods either isolate candidates or aggregate traces, which do not scale to long-horizon tasks. We present TEX, a collaborative test-time scaling framework based on execution-driven cross-validation. TEX parallelizes agents to generate tests and patches, cross-executing each test against every patch to form a K×KK \times K feedback matrix. Agents use their matrix slices for refinement, enabling objective validation without verbose trace sharing. On SWT-Bench Verified, TEX achieves 86.4%, establishing a new state-of-the-art and improving +9.0% over single-agent baselines. Moreover, even random selection from TEX outputs (84.4%) surpasses the previous SOTA (84.0%), showing collaborative execution feedback improves solution quality, not just best-case samples. Our results highlight execution-grounded feedback as an effective scaling mechanism for long-horizon agentic tasks.

1 Introduction

Software engineering agents have made remarkable progress in bug-fixing (Jimenez et al., 2024; Deng et al., 2025), yet generating high-quality tests remains challenging. Test-case generation demands both diversity (exploring different test designs) and validation (identifying which tests correctly detect bugs). Current approaches struggle to provide both: isolated generation lacks diversity, while parallel sampling faces a verification gap when no oracle tests exist (Li et al., 2026).

Test-time scaling improves large language model (LLM) performance through inference-time computation (OpenAI, 2024b; Guo et al., 2025; Snell et al., 2025). However, existing methods have limitations. Serial scaling limits diversity and suffers from overthinking (Zhou et al., 2026). Parallel scaling (Best-of-N) requires verifiers (Xi et al., 2026; Jin et al., 2026). Hybrid approaches (Venkatraman

Figure

Figure 1: TEX overview. At each round, K agents are sampled in parallel and each agent outputs a test file and code patch. We perform cross-validation by running all generated code patches against all generated test files. Each agent receives execution feedback from running its code & test against all other tests & code, then continues sampling in the next round.

et al., 2025; Madaan et al., 2025) share information across agents but either concatenate full traces (prohibitive at 100K+ tokens) or summarize them (losing details). Moreover, multi-agent collaboration often underperforms single agents under equal budgets (Tran and Kiela, 2026), suggesting inefficient aggregation.

For test generation, these limitations are acute. Verifier-based methods work when correctness is verifiable, but test quality verification requires oracle code execution. Self-execution frameworks (Zheng et al., 2024; Ding et al., 2024) run agents' self-generated tests on their own code, providing limited supervision, as failures do not disambiguate between incorrect tests and incorrect code.

We hypothesize that this can be addressed through collaborative validation: agents generate diverse solutions and learn from each other's execution results. We present TEX, which achieves this via execution-based collaborative learning. TEX samples K agents in parallel; each generates both test scripts and code patches across multiple rounds. Rather than sharing reasoning traces, we execute every agent's tests against every agent's code, producing a compact K×KK \times K feedback matrix (Figure 1). Each agent receives execution results for cross-candidate refinement. This provides: (i) objective verification without learned reward models or oracle verifiers; (ii) richer signals than self-execution alone; and (iii) compact feedback. TEX achieves 86.4% on SWT-Bench Verified, improving +9.0% over single-agent baselines while maintaining diversity (Best-of-4 stable at ∼89%\sim89\%). Effective test-time scaling needs the right signal: execution feedback, not more context.