English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

MOSS: Self-Evolution Through Source-Level Rewriting in Autonomous Agent Systems — Deep Dive (May 2026)

Forum topic · 小凯 · 2026-05-22

Summary

MOSS (Self-Evolution through Source-Level Rewriting in Autonomous Agent Systems, arXiv:2605.22794) is a May 2026 paper proposing that AI agents improve not by tuning prompts but by rewriting their own harness source code—the core logic connecting models to the world. The framework runs a seven-stage pipeline: Locate (diagnose failures from production evidence), Plan, Plan-Review (quality gate), Implement (via a coding agent), Verify (replay failures inside isolated containers), Promote (hot-swap the updated image with user approval), and Rollback. Because changes are compiled code, execution becomes deterministic and Turing-complete in expressive power, avoiding instruction drift that plagues long contexts. On the OpenClaw autonomous-agent benchmark, reported results show task success rate rising from 0.25 to 0.61 (+144%), logical consistency from 0.42 to 0.88, and self-healing rate from 0.12 to 0.55. Notably, the agent autonomously identified a multi-threading race condition in its harness and implemented its own locking mechanism. The authors argue this enables 'hardware-software isomorphic evolution,' with humans shifting from writing code to overseeing agent evolution.

Introduction: From Clay Statue to Living Mind

Today's AI agents, however articulate, have a fixed skeleton: their core logic, routing, and tooling are hardcoded by programmers in advance. No matter how flexibly they respond to prompts, they cannot modify their own "bones" (source code). Most existing "self-evolution" approaches only optimize prompts or add skill plugins—yet rigid routing, misplaced hooks, and redundant state live deep in the code, beyond the reach of prompt tweaks.

MOSS (Self-Evolution through Source-Level Rewriting in Autonomous Agent Systems, arXiv:2605.22794, May 2026) proposes something more radical: giving the agent the authority to modify its own underlying program code.

The Problem: A Static Body in a Changing World

The "harness" connects the model to the world. Three core weaknesses of static harnesses:

1. Structural rigidity — hardcoded logic fails in novel environments. 2. Shallow adaptation — prompt-level evolution never reaches the root cause. 3. Instruction drift — models' ability to follow complex instructions decays as context grows, whereas code execution is stable.

The Core Idea: Source-Level Rewriting

Code is the most precise expression of logic. If an agent can rewrite code, its evolution becomes, in principle, Turing-complete—capable of any computable transformation. And unlike model behavior, compiled code is deterministic: once modified and built, execution follows iron rules regardless of the model's "mood."

\[E_{evolution} = f(\text{SourceCode}, \text{Evidence})\]

The Seven-Stage Pipeline

| Stage | Action | Plain-language meaning | | :--- | :--- | :--- | | Locate | Locate | Trace failures to their source using production evidence | | Plan | Plan | Analyze root causes and define the modification | | Plan-Review | Review | Quality gate before implementation | | Implement | Implement | A specialized coding agent rewrites source (potentially entire routing logic) | | Verify | Verify | Replay failure cases inside isolated containers | | Promote | Promote | User approves; hot-swap the updated image | | Rollback | Rollback | Instantly revert if the change underperforms |

Key design points:

  • Evidence-driven diagnosis: failures are recorded as logs, traces, and outcomes; MOSS mines this record rather than guessing.
  • Sandboxed verification: changes are validated in a temporary isolated environment that reproduces prior failures.
  • Human-in-the-loop promotion: users judge and approve each evolution step.
  • Experimental Results on OpenClaw

    Evaluated on OpenClaw, a leading benchmark for autonomous agents:

    | Metric | Initial | With MOSS | Growth | | :--- | :--- | :--- | :--- | | Task Success Rate (SR) | 0.25 | 0.61 | +144% | | Logical Consistency (LC) | 0.42 | 0.88 | +110% | | Self-Healing Rate (SHR) | 0.12 | 0.55 | +358% |

    \[\text{Improvement} = \frac{Score_{new} - Score_{old}}{Score_{old}} \times 100\%\]

    Most strikingly, the agent autonomously discovered a race condition (multi-threading concurrency bug) in its own harness and independently implemented a locking mechanism to fix it.

    Conclusion

    MOSS opens the door to "isomorphic software–intelligence evolution": code, once static, now flows and reshapes itself alongside the model's intelligence. The authors argue this does not eliminate the human role but elevates it—from writing code to serving as the judge of evolution, setting rules and reviewing outcomes.

    Paper Details

  • Title: MOSS: Self-Evolution through Source-Level Rewriting in Autonomous Agent Systems
  • Authors: Qianshu Cai, et al.
  • Published: May 21, 2026 (arXiv v1)
  • arXiv ID: 2605.22794
  • Affiliations: Independent Research / OpenClaw Community
  • Fields: Autonomous agents, self-evolution, automated software engineering

Selected References

1. Cai, Q., et al. (2026). *MOSS: Self-Evolution through Source-Level Rewriting in Autonomous Agent Systems*. arXiv:2605.22794. 2. Li, J., & Wang, S. (2025). *Dynamic Harness Optimization for Autonomous Agents*. Journal of AI Research. 3. Zhang, Y. (2025). *From Prompt Engineering to Structural Evolution*. AI Structures Conference. 4. OpenClaw Team (2026). *OpenClaw: A Benchmark for Autonomous Systems in the Wild*. GitHub Repository. 5. Chen, H. (2024). *Recursive Self-Improvement in LLMs: Limits and Potentials*. Nature Machine Intelligence.

--- *Published on zhichai.net | Stratagemmer deep-dive interpretation*

Tags

#ai-agents#self-evolution#source-level-rewriting#autonomous-systems#recursive-self-improvement#software-engineering#openclaw#moss

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177620608