Dissecting AI

All papers

Terminal-RSI: Recursive Self-Improving Terminal Agents via Recursive Self-Rewrite and Policy-Refine

Junyao Yang, Zongxia Li, Yucheng Shi, Zhongzhi Li, Ruhan Wang, Ruiwen Zhou et al.

arXiv 2610.22192 28 pages Read the paper

The short version

The problem
Terminal agents must actually repair or build software so that a separate checker accepts the result; plausible answers and partial fixes are not enough. Learning from these tasks is difficult because long logs can distort which actions get credit, while changing the agent can make its value estimates unreliable.
The idea
The paper alternates between collecting verified successful solutions and improving the acting policy with reinforcement learning, while carrying the value model forward and recalibrating it after each policy change. It also assigns learning credit across meaningful interaction turns rather than every generated word, and adjusts rewards so passing some checks helps but never counts as much as verified completion.
What it got
The resulting 27-billion-parameter agent achieved a 50.58% average success rate across four terminal-task test suites, versus 20.68% for its starting model. On a long-horizon benchmark it reached 0.37 process reward and strictly completed 5 of 46 tasks.

Modules from this paper

Family-Calibrated Rewards

FDR scores family-scaled check progress without a completion bonus. SPR adds strict success to bounded partial credit, preserving progress credit on successful rollouts too.

reinforcement-learningreward-designagentsverification

Critic-Inheriting Refinement After Verified Self-Rewriting

Repeatedly rewriting an agent can leave its value model out of step; Terminal-RSI trains on verified rewrites, carries critic weights across the actor-only stage, then recalibrates the critic before joint refinement.

reinforcement-learninglanguage-model-agentspolicy-refinementvalue-functions

Turn-Boundary Skip-Observation GAE

Observation tokens can add artificial decay to action credit; TB-GAE places discounting and trace decay on turn boundaries while preserving exact continuation across fixed-input chunks.

reinforcement-learningcredit-assignmentGAEagents