acceptodds
Under review as a conference paper at ICLR 2027

Test-Time Adaptation of Scaffolds from Unlabeled Trajectories

Abstract

A scaffold is a workflow that orchestrates how a coding agent observes its environment, uses tools, and produces outputs. Existing scaffolds typically follow a uniform workflow across different models and tasks. In this study, we reveal that such uniform workflows may fail to accommodate diverse model capabilities and varying coding complexities. To address this limitation, we propose *AdaScaffold*, a test-time **ada**ptation framework that adapts **scaffold**s to diverse model capabilities and coding complexities. AdaScaffold uses unlabeled trajectories to estimate when to intervene and inject behavioral guidelines into the original workflow via two core modules: (i) *Intervention Timing Estimation*, which optimizes the timing of each intervention by maximizing the *empirical covariation* between agent mis-behaviors and risks; and (ii) *Guideline Generation*, which prompts the coding agent itself with the estimated timings and predefined mis-behaviors to synthesize model- and task-specific guidelines. Extensive evaluation demonstrates that AdaScaffold improves resolve rates across various model scales while reducing token consumption to 45%–85%. By grounding intervention timing in a closed-form statistical criterion over unlabeled trajectories, AdaScaffold offers an interpretable test-time scaffold-level adaptation mechanism for coding agents.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.