SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.14857 · September 2026

MODULARRSI: MODULAR AND GENERALIZABLE RE-CURSIVE HARNESS SELF-IMPROVEMENT

Ming Zhou, Yuxuan Zhang, Jian Yang, Xianglong Liu, Chenghua Lin, Yizhi Li, Haau-Sing Li, Riza Batista-Navarro, Siwei Wu, Chuanyi Zhang, Chengran Yang, Bryan Dai, and 2 more

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2609.14857.json · badge: /api/ran/2609.14857.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
IQuestLab/ModularRSI canonical (classifier label)
classifier basis: plan_row
6 ran · 0 no recorded run
FunctionStatusWhere it lives
compare_numeric Ran
ran, violated the contract we drafted
IQuestLab/ModularRSI/adapters/dabstep/scorer.py
code served (permissive licence) · get_code("de19ee7afd87e58d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math

def compare_numeric(num1: float, num2: float) -> bool:
    if num1 == num2:
        return True
    if num1 < 1 and num2 < 1:
        return math.isclose(num1, num2, rel_tol=0.0001, abs_tol=0.0001)
    dec_places1 = len(str(num1).split('.')[-1]) if '.' in str(num1) else 0
    dec_places2 = len(str(num2).split('.')[-1]) if '.' in str(num2) else 0
    round_to = min(dec_places1, dec_places2)
    rounded1 = round(num1, round_to)
    rounded2 = round(num2, round_to)
    if rounded1 == rounded2:
        return True
    return math.isclose(num1, num2, rel_tol=0.0001, abs_tol=0.0001)

ARGS = {
    "num1": 3.14159,
    "num2": 3.14160,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_numeric Ran
ran, honoured the contract we drafted
IQuestLab/ModularRSI/adapters/dabstep/scorer.py
code served (permissive licence) · get_code("5b8eb1533af10264")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re
from typing import Union

def extract_numeric(value: str) -> Union[float, None]:
    value = value.replace(',', '').replace('$', '')
    match = re.search('(\\d*\\.\\d+|\\d+\\.?\\d*)%?', value)
    if match:
        num_str = match.group(1)
        try:
            return float(num_str)
        except ValueError:
            return None
    return None


# Test cases for the extract_numeric function
ARGS = {
    'value': '1,234.56'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_task_category Ran
ran; our contract draft was wrong, not the code
IQuestLab/ModularRSI/adapters/bfcl/generate_parity_sample.py
code served (permissive licence) · get_code("62f29b2074bb2f0a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Construct arguments for get_task_category function
# The function takes a source_id string and extracts the task category

ARGS = {
    "source_id": "simple_python_0"
}

# Additional test cases to verify the function works correctly
test_cases = [
    "simple_python_0",
    "live_simple_0-0-0",
    "live_complex_task_1-2-3",
    "another_category_42",
    "no_number_suffix"
]
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_numeric_with_commas Ran
ran, violated the contract we drafted
IQuestLab/ModularRSI/adapters/dabstep/scorer.py
code served (permissive licence) · get_code("a62495edc6f98b22")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def is_numeric_with_commas(value: str) -> bool:
    v = value.strip()
    pattern = '\n      ^\\$?\n      (?:\n         \\d{1,3}(?:,\\d{3})+(?:\\.\\d+)?\n       | \\d+[.,]\\d+\n      )\n      $\n    '
    return bool(re.match(pattern, v, re.VERBOSE))

ARGS = {
    "value": "$1,234.56"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (import:TypeError)
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_task_ids_from_bfcl Ran
ran; our contract draft was wrong, not the code
IQuestLab/ModularRSI/adapters/bfcl/generate_parity_sample.py
code served (permissive licence) · get_code("8ee53879e7ca7e6c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned defaultdict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
from pathlib import Path
from collections import defaultdict
import tempfile
import os

# Create a temporary directory structure that mimics BFCL layout
temp_dir = tempfile.mkdtemp()
bfcl_root = Path(temp_dir)
data_dir = bfcl_root / 'bfcl_eval' / 'data'
data_dir.mkdir(parents=True, exist_ok=True)

# Create sample BFCL data files for a few categories
sample_data = {
    'simple_python': [
        {'id': 'simple_python_1', 'function': 'test_func_1'},
        {'id': 'simple_python_2', 'function': 'test_func_2'},
    ],
    'simple_java': [
        {'id': 'simple_java_1', 'function': 'test_func_3'},
    ],
    'parallel': [
        {'id': 'parallel_1', 'function': 'test_func_4'},
        {'id': 'parallel_2', 'function': 'test_func_5'},
        {'id': 'parallel_3', 'function': 'test_func_6'},
    ],
}

for category, entries in sample_data.items():
    data_file = data_dir / f'BFCL_v4_{category}.json'
    with open(data_file, 'w', encoding='utf-8') as f:
        for entry in entries:
            f.write(json.dumps(entry) + '\n')

ARGS = {
    'bfcl_root': bfcl_root,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
stratified_sample Ran
ran; our contract draft was wrong, not the code
IQuestLab/ModularRSI/adapters/bfcl/generate_parity_sample.py
code served (permissive licence) · get_code("4b1bef41af5fc1d1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random

RANDOM_SEED = 42

def stratified_sample(category_ids: dict[str, list[str]], sample_size: int, seed: int=RANDOM_SEED) -> list[str]:
    """
    Perform stratified random sampling across all categories.

    Args:
        category_ids: Dictionary of {category: list of task IDs}
        sample_size: Total number of samples to draw
        seed: Random seed for reproducibility

    Returns:
        List of sampled task IDs
    """
    random.seed(seed)
    total = sum((len(ids) for ids in category_ids.values()))
    sampled_ids = []
    for category, ids in category_ids.items():
        count = len(ids)
        category_sample_size = round(sample_size * count / total)
        if category_sample_size == 0 and count > 0:
            category_sample_size = 1
        category_samples = random.sample(ids, min(category_sample_size, count))
        sampled_ids.extend(category_samples)
    random.shuffle(sampled_ids)
    return sampled_ids


# Setup code
ARGS = {
    "category_ids": {
        "category_a": ["task_1", "task_2", "task_3", "task_4"],
        "category_b": ["task_5", "task_6", "task_7"],
        "category_c": ["task_8", "task_9"]
    },
    "sample_size": 5,
    "seed": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 0 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
compare_numeric 2 other papers
2 dated earlier
2604.19572 (2026-04)
A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compression
2605.26457 (2026-05)
Verus-SpecGym: An Agentic Environment for Evaluating Specification Autoformalization
extract_numeric 2 other papers
2 dated earlier
2604.19572 (2026-04)
A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compression
2605.26457 (2026-05)
Verus-SpecGym: An Agentic Environment for Evaluating Specification Autoformalization
is_numeric_with_commas 2 other papers
2 dated earlier
2604.19572 (2026-04)
A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compression
2605.26457 (2026-05)
Verus-SpecGym: An Agentic Environment for Evaluating Specification Autoformalization
get_task_category 1 other paper
1 dated earlier
2604.19572 (2026-04)
A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compression
load_task_ids_from_bfcl 1 other paper
1 dated earlier
2604.19572 (2026-04)
A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compression
stratified_sample 1 other paper
1 dated earlier
2604.19572 (2026-04)
A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compression

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recent work extends recursive self-improvement (RSI) to agent harnesses for long-horizon coding and terminal tasks, enabling agents to improve execution mechanisms from experience. However, generalizable harness RSI remains challenging. First, evolving harnesses on evaluation benchmarks or their subsets makes it difficult to distinguish reusable improvements from benchmark-specific adaptation. Second, single-trajectory updates can conflate systematic harness deficiencies with instance-specific reasoning and solution details, producing modifications that transfer poorly to unseen tasks. Third, localizing recurring behavioral deficiencies within monolithic harnesses is difficult, while whole-harness optimization can entangle unrelated mechanisms and complicate attribution and validation. We propose ModularRSI, a benchmark-disjoint, contrastive, and modular framework for generalizable harness evolution. ModularRSI contrasts successful and failed trajectories for the same task and aggregates evidence across tasks to identify recurring behavioral deficiencies. It decomposes the evolvable harness into five functional modules: Agent Loop, Tool Use, Observation Management, Context Management, and Task Completion Detection. Each module evolves independently within a restricted modification scope, followed by an integration stage that combines the evolved modules into a unified harness and resolves potential conflicts. To support benchmark-disjoint evolution, we curate 2,000 executable evolution tasks from external sources that are disjoint from downstream evaluation benchmarks. Experiments on TB2.0 and SWE-Bench Verified show consistent improvements on unseen in-domain and cross-domain tasks, with the evolved harness also transferring across different foundation models.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2609.14857")
get_code_for_paper("2609.14857")
have("2609.14857")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2609.14857.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2609.14857.svg)](https://syntology.ai/paper/2609.14857)

Connect an agent — have() is free.