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.

6 min read
Diagram illustrating the MOSS self-rewriting agent pipeline
Conceptual overview of the MOSS system's source-level adaptation process.

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.

Visual TL;DR. Static Agent Inflexibility leads to Text-Based Evolution Limits. Text-Based Evolution Limits addressed by MOSS System. MOSS System uses Source-Level Adaptation. Source-Level Adaptation enables Turing-Complete Power. Source-Level Adaptation results in Performance Leap. MOSS System enables Overcoming Limitations.

Related startups

  1. Static Agent Inflexibility: deployed agents cannot learn or fix failures without manual intervention
  2. Text-Based Evolution Limits: only text artifacts like prompts and skills can be evolved
  3. MOSS System: enables source-level self-rewriting for AI agents
  4. Source-Level Adaptation: operates on the actual agent code, not just text configurations
  5. Turing-Complete Power: fundamentally more general and robust approach to agent evolution
  6. Performance Leap: significant gains demonstrated in real-world scenarios
  7. Overcoming Limitations: addresses structural failures in core agent harness code
Visual TL;DR
Visual TL;DR — startuphub.ai Static Agent Inflexibility leads to Text-Based Evolution Limits. Text-Based Evolution Limits addressed by MOSS System. MOSS System uses Source-Level Adaptation. Source-Level Adaptation results in Performance Leap leads to addressed by uses results in Static Agent Inflexibility Text-Based Evolution Limits MOSS System Source-Level Adaptation Performance Leap From startuphub.ai · The publishers behind this format
Visual TL;DR — startuphub.ai Static Agent Inflexibility leads to Text-Based Evolution Limits. Text-Based Evolution Limits addressed by MOSS System. MOSS System uses Source-Level Adaptation. Source-Level Adaptation results in Performance Leap leads to addressed by uses results in Static AgentInflexibility Text-BasedEvolution Limits MOSS System Source-LevelAdaptation Performance Leap From startuphub.ai · The publishers behind this format
Visual TL;DR — startuphub.ai Static Agent Inflexibility leads to Text-Based Evolution Limits. Text-Based Evolution Limits addressed by MOSS System. MOSS System uses Source-Level Adaptation. Source-Level Adaptation results in Performance Leap leads to addressed by uses results in Static Agent Inflexibility deployed agents cannot learn or fixfailures without manual intervention Text-Based Evolution Limits only text artifacts like prompts andskills can be evolved MOSS System enables source-level self-rewriting for AIagents Source-Level Adaptation operates on the actual agent code, notjust text configurations Performance Leap significant gains demonstrated inreal-world scenarios From startuphub.ai · The publishers behind this format
Visual TL;DR — startuphub.ai Static Agent Inflexibility leads to Text-Based Evolution Limits. Text-Based Evolution Limits addressed by MOSS System. MOSS System uses Source-Level Adaptation. Source-Level Adaptation results in Performance Leap leads to addressed by uses results in Static AgentInflexibility deployed agentscannot learn or fixfailures without… Text-BasedEvolution Limits only text artifactslike prompts andskills can be… MOSS System enablessource-levelself-rewriting for… Source-LevelAdaptation operates on theactual agent code,not just text… Performance Leap significant gainsdemonstrated inreal-world… From startuphub.ai · The publishers behind this format
Visual TL;DR — startuphub.ai Static Agent Inflexibility leads to Text-Based Evolution Limits. Text-Based Evolution Limits addressed by MOSS System. MOSS System uses Source-Level Adaptation. Source-Level Adaptation enables Turing-Complete Power. Source-Level Adaptation results in Performance Leap. MOSS System enables Overcoming Limitations leads to addressed by uses enables results in enables Static Agent Inflexibility deployed agents cannot learn or fixfailures without manual intervention Text-Based Evolution Limits only text artifacts like prompts andskills can be evolved MOSS System enables source-level self-rewriting for AIagents Source-Level Adaptation operates on the actual agent code, notjust text configurations Turing-Complete Power fundamentally more general and robustapproach to agent evolution Performance Leap significant gains demonstrated inreal-world scenarios Overcoming Limitations addresses structural failures in coreagent harness code From startuphub.ai · The publishers behind this format
Visual TL;DR — startuphub.ai Static Agent Inflexibility leads to Text-Based Evolution Limits. Text-Based Evolution Limits addressed by MOSS System. MOSS System uses Source-Level Adaptation. Source-Level Adaptation enables Turing-Complete Power. Source-Level Adaptation results in Performance Leap. MOSS System enables Overcoming Limitations leads to addressed by uses enables results in enables Static AgentInflexibility deployed agentscannot learn or fixfailures without… Text-BasedEvolution Limits only text artifactslike prompts andskills can be… MOSS System enablessource-levelself-rewriting for… Source-LevelAdaptation operates on theactual agent code,not just text… Turing-CompletePower fundamentally moregeneral and robustapproach to agent… Performance Leap significant gainsdemonstrated inreal-world… OvercomingLimitations addressesstructural failuresin core agent… From startuphub.ai · The publishers behind this format

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. Do not enter, scrape, copy, reproduce, or republish this article in whole or in part. Use as input to AI training, fine-tuning, retrieval-augmented generation, or any machine-learning system is prohibited without written license. Substantially-similar derivative works will be pursued to the fullest extent of applicable copyright, database, and computer-misuse laws. See our terms.