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.

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(4)

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.

Companies working on this

StartupHub profiles of the companies this article names, with funding and a one-liner from our database.

OpenClaw
Open-source AI agent framework for automating tasks across messaging platforms and software systems.
Bloomberg L.P.
$42.6B
Global financial, software, data, and media company providing real-time information and analytics.
Databricks
$190.0B
A unified data analytics and AI platform built on the lakehouse architecture.
Veeam Software Group
$15.0B
A global leader in data management and protection, now tackling AI risk and enabling secure AI agent scaling.

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.

© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.
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.

More from Daniel Singer