Repository navigation
Description
Request
Add opt-in support for Google's RRSI (Regularized Recursive Self-Improvement of Agent Harnesses) through AgentDescent's existing evolution/port interfaces.
A concrete use case: evolve a skill or agent harness against a development suite without accumulating task-specific shortcuts, unnecessary inference cost, or edits whose apparent improvement is evaluation noise. AgentDescent already supplies concurrent proposals, versioned diffs and verification; RRSI would supply a complementary regularized search/acceptance rule.
Primary sources and evidence boundary
- Paper, arXiv:2609.24972v3: Peng Xia, Rujun Han, Zifeng Wang et al.; first submitted 2026-09-21, revised 2026-10-04.
- Authors' project page: Google Cloud AI Research with UNC-Chapel Hill, Stanford and Washington University in St. Louis.
- Released implementation, inspected at be50316e1db05914068a973f322770ef08ed7ba1.
The target is harness evolution around a frozen model, not weight training. Upstream reports transfer and token-efficiency improvements, but these have not been reproduced in AgentDescent. The current paper abstract, README and project page differ in headline numbers; do not copy those into this project's measured-results table. Follow the pinned implementation and explicitly document paper/code discrepancies.
Mechanisms the support should preserve
- Proposal regularization: a cosine-annealed budget counts independent edits, with component/hypothesis attribution, measured edit history and exploration of untried components when progress stalls. It is not a changed-line or file-count limit. See schedule.py and history.py.
- Pre-evaluation critic: deterministic leakage checks plus model review, with bounded repair; rejected candidates are logged without invented measurements. Include task-specific runtime memory leakage, grader access and undeclared edit bundling. See critic.py.
- Selection: preserve Algorithm 2's historical-best floor, cost rule, within-noise-band novelty/cost tradeoff and domain guards, then choose the highest-scoring admissible candidate or retain the incumbent. Specifically, the floor is
S_candidate >= S_best - delta; it does not require every accepted edit to exceed the incumbent bydelta. See selection.py. - Pruning and accounting: use component-level recent yield to propose removal of unproductive accepted machinery; evaluate those removals normally. Preserve weighted trial rewards and missing-trial denominators. Track policy inference tokens separately from search/critic overhead. See history.py and evaluate.py.
Proposed integration and bounded first milestone
Start with examples/rrsi/, an offline mechanism fixture and one harness-directory domain. Expose it through evolve(); keep the default behavior unchanged.
- Represent the editable harness through an existing directory/file strategy or a justified custom strategy. Keep evaluator, benchmark answers, credentials and governance configuration outside the editable artifact.
- Reuse
Policies(proposal=...)for proposal production where its one-proposal contract fits. Maintain an explicit, checkpointable RRSI record keyed by candidate/base version;ProposalContext.historyand rejected cards alone are not the upstream measured per-edit ledger. - Prototype selection through the documented
aggregator_factoryextension when round-wide candidates, score/cost records and historical-best state exceed a single policy slot. Do not silently layer the default Beta gate over RRSI and call it faithful. - Run leakage screening before expensive evaluation. An acceptance-only wrapper is too late in the current pipeline.
- First establish the upstream round semantics: candidates evaluated from the same incumbent, one winner. Upstream already evaluates candidates concurrently. Diff fusion or barrier-free admissions are separate AgentDescent variants; they must recheck budgets, leakage and measurements on the resulting artifact and declare the semantic change.
- Preserve existing governance vetoes and transactional/CAS safeguards. If they conflict with an upstream acceptance case, document the restriction rather than weakening them.
This extends the port conventions in #74 and addresses the transfer/noise concerns discussed in #164. It is distinct from Genesis (#183). Repository-wide issue searches for RRSI/regularized and an all-state RRSI PR search found no existing implementation request.
Acceptance criteria
- Pin upstream source/configuration and document each preserved mechanism, limitation and deviation in
docs/algo-rrsi.mdand the fidelity index. - Offline tests exercise edit-budget boundaries, leakage rejection before evaluation, history attribution, stall exploration and pruning.
- Golden decision fixtures cover historical-best floor, both cost-rule branches, domain veto, ties, no admissible candidate, missing trials and unknown token counts.
- Tests prove installed components actually run, defaults are unchanged, and resume does not duplicate evidence or lose
S_best. - Keep evolve/development data separate from untouched final holdout/OOD data; tests ensure final evaluation evidence never enters proposals or selection.
- Provide a zero-network, no-key
--dry-runand offline end-to-end fixture using the shared CLI conventions. - Publish reproducible equal-budget baseline/regularized ablations and serial/synchronous/asynchronous semantics separately when measured. Report quality, cost, failures and variance; mark real-model results unmeasured until actually run.
Dependencies, risks and decisions
Upstream core requires Python 3.10+, while AgentDescent supports 3.9: prefer an optional adapter or compatible port rather than raising the package floor implicitly. Preserve Apache-2.0 notices for reused upstream code and inspect third-party licenses. Real benchmark runners need additional environments/data; paid model calls are outside this first milestone.
Questions to settle in the implementation design:
- Start as a declared mechanism microport, then add the original coding benchmark adapter?
- Reuse upstream pure selection functions or implement a compatibility-tested local policy?
- Upstream treats absent token counts as zero relative cost change. Preserve that in fidelity mode, or offer a separately named strict mode that refuses cost-based admission without telemetry?
Critic approval is a heuristic, not proof against leakage. Final holdout isolation, sandbox boundaries and reproducible accounting remain necessary.
Activity
Birfy commentedon Oct 13, 2026
Progress note: the first increment landed in https://github.com/Birfy/agentdescent/pull/222 (merged).
That PR ships the offline RRSI round-selection core under
examples/rrsi/with docs indocs/algo-rrsi.md. It deliberately does not yet cover proposal regularization/history, pre-evaluation leakage critique, trial aggregation/accounting, pruning, resumability, domain/evolve()integration, or a CLI — those remain in scope for follow-up increments on this issue.Birfy commentedon Oct 13, 2026
Progress (first increment shipped). #222 merged the offline RRSI round-selection mechanism (
examples/rrsi/selection.py,docs/algo-rrsi.md,tests/test_rrsi_selection.py).Still deferred for later increments (from
docs/algo-rrsi.md):evolve()/aggregator_factory/ a proposal policy / resumable run recordevolve()/CLI fixture described in this issueLeaving this issue open until that integration work is done.
feat(rrsi): add cosine-annealed L0 edit-budget schedule (ThinkFlowLab…
Birfy commentedon Oct 17, 2026
Status on main and what remains
Shipped: the round-selection core (#222), the schedule, per-edit history, and the
evolve()integration (#254):build_rrsi_bundle()withRRsiCritic(pre-evaluation screen),RRsiProposalPolicy,RRsiAcceptance, the newPolicies(screen=...)seam,critic-rejected/noise-floor/cost-ruleoutcomes, and a checkpointableRRsiState(resume keepsS*). 23 integration tests plus selection / schedule / history goldens. Defaults are unchanged.Against this issue's acceptance criteria, not yet done (from
docs/algo-rrsi.md: "a full harness-directory domain adapter, multi-roundselect_roundtrial aggregation, and a RRSI CLI"):--dry-run:examples/rrsi/rrsi_*.pywith the shared CLI conventions (zero network, no key), registered intests/test_example_entrypoints.pyPORTS.FileTree/skill_dir, with evaluator, answers and credentials outside the artifact; offline end-to-end fixture.evolve()level: the protected-strings test exists; add one proving final evaluation evidence never reaches proposals or selection.port-fidelity.mdrow for the integration (the page currently documents the pre-port pieces) and thecandidate_methods/ self-evolution tables.Keep open until the entrypoint and domain land; slices above are independent, entrypoint first.