AI Research

MOSS: Source-Level Self-Rewriting for Agents

MOSS enables AI agents to self-rewrite their source code, achieving significant performance gains and overcoming limitations of text-based evolution.

Daniel Singer

By Daniel Singer, Editor, StartupHub.ai

2 min read

Diagram illustrating the MOSS self-rewriting agent pipeline
Conceptual overview of the MOSS system's source-level adaptation process.
Visual TL;DR
Static Agent InflexibilityDriver
From the article 2 mentionsCurrent autonomous agentic systems suffer from a critical inflexibility: once deployed, they remain static, unable to learn from user interactions or fix recurring failures without manual intervention.
Text-Based Evolution LimitsDriver
only text artifacts like prompts and skills can be evolved
MOSS SystemCore
enables source-level self-rewriting for AI agents
From the article 9+ mentionsThis paper introduces MOSS, a system designed for self-rewriting at the source code level within production agentic substrates.
Source-Level AdaptationContext
operates on the actual agent code, not just text configurations
From the article 2 mentionsThe researchers propose that true self-evolution requires source-level adaptation, a fundamentally more general and robust approach.
Overcoming LimitationsEffect
addresses structural failures in core agent harness code
Turing-Complete PowerContext
fundamentally more general and robust approach to agent evolution
From the articleThis approach is inherently more powerful because source-level adaptation is Turing-complete, a strict superset of any text-mutable scope.
Performance LeapOutcome
significant gains demonstrated in real-world scenarios
From the articleThis significant improvement showcases the practical impact of enabling agents to evolve at the source code level, moving beyond static deployments and text-based adjustments to achieve more dynamic and effective performance.
Contents(3)

Current autonomous agentic systems suffer from a critical inflexibility: once deployed, they remain static, unable to learn from user interactions or fix recurring failures without manual intervention. Existing self-evolving agents, while a step forward, are limited to text-mutable artifacts like prompts and skill files, leaving the core agent harness untouched. This prevents the system from addressing structural failures embedded in code, such as routing or hook ordering. The researchers propose that true self-evolution requires source-level adaptation, a fundamentally more general and robust approach.

Beyond Textual Artifacts: The Power of Source-Level Adaptation

This paper introduces MOSS, a system designed for self-rewriting at the source code level within production agentic substrates. Unlike previous methods confined to text-based configurations, MOSS operates on the actual code. This approach is inherently more powerful because source-level adaptation is Turing-complete, a strict superset of any text-mutable scope. It ensures deterministic evolution, unaffected by the long-context drift that can plague base-model compliance, and addresses a class of failures previously inaccessible through text modifications alone.

MOSS: A Deterministic Pipeline for Agentic Evolution

MOSS implements a structured, multi-stage pipeline for its self-rewriting process. Each evolution cycle is triggered by an automatically curated batch of production failure evidence. While a pluggable external coding-agent CLI handles the actual code modification, MOSS maintains control over stage ordering and final verdicts. Candidate code is rigorously verified by replaying the failure batch in ephemeral trial workers. Successful candidates are then deployed through a user-consent-gated, in-place container swap, with a health-probe-gated rollback mechanism ensuring system stability. This meticulous process underpins the reliability of MOSS self-rewriting agents.

Demonstrated Performance Leap in Real-World Scenarios

The efficacy of MOSS is clearly demonstrated on the OpenClaw platform. In a single, unsupervised evolution cycle, the system successfully lifted the mean grader score across four tasks from a baseline of 0.25 to 0.61. This significant improvement showcases the practical impact of enabling agents to evolve at the source code level, moving beyond static deployments and text-based adjustments to achieve more dynamic and effective performance.

Mentioned in this story

Sources

Get the free daily brief every morning

Every morning the day's AI news, new AI startups and new funding rounds. Free and takes a few minutes to read, unsubscribe at any time.

Join 64,000 other subscribers.

TopicsAI ResearchAutonomous AgentsSoftware EvolutionMOSS

Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.

Test your Agent Readiness now

Paste your website. How well ChatGPT, Claude and the other agents can read and use a site, in about a minute, free.

Watch

The videos behind the news, one flip at a time

The feed mixes the videos from our articles with startup demos and you flip through them like TV channels for free with no signup.