Manuscript Offprint

arXiv:2610.21458

What Survives Self-Evolution: Provenance Marks in Copied Agent Harnesses

Jieyu Li, Jingya Li, Sheng Li, Xinpeng Zhang, Zhenxing Qian

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Agent harnesses, the prompt and tool code around a base model, leak. Claude Code's 512,000 lines were mirrored within hours of a packaging error. A plagiarist can pass a leaked harness through a published self-evolver and ship the result as its own. We define this as a covert rewriting attack. No one targets a provenance mark, yet a large language model (LLM) proposer rewrites the file that carries it and a score keeps the better rewrites. We give the first measurement of marks under this attack, with three evolvers, five proposers and two environments. Published marks fail. KGW in the prompt survives GEPA's rewrites in 0 of 12 copies, AgentMark as released in 5 of 12. The proposer's habits decide survival, by two orders of magnitude across models, and selection protects a mark only when each decision sees enough games. We then build a mark for this attack. Its key is the order of near-tied entries of a table of where objects are found, built from public games, so deleting the table costs success, rewrites that keep its rows keep the order, and a customer reads the key from the agent's actions alone. On held-out games it is detected in 62 of 76 copies whose lineage rewrote its file. A scheme-aware plagiarist reshuffles the ties at no measurable cost, and a plagiarist who asks the proposer for more general code removes the key in 75–100% of rewrites.

1 Introduction

Claude Code’s 512,000 lines shipped in an npm source map and were mirrored within hours to repositories with tens of thousands of forks (Wiggers, 2026). What leaked is a harness, the system prompt and tool code around a base model, which separates agent products on the same model; harnesses are easy to obtain, by prompt extraction, custom GPT files or app cloning (Zhang et al., 2024; Hui et al., 2024; Yu et al., 2024; Xie et al., 2024). A plagiarist starts from the leak: a published self-evolver (Agrawal et al., 2026; Lange et al., 2026;

Figure

Figure 1: Threat model with our mark: the owner keys the order of near-tied entries in a table of where objects are found; the plagiarist’s evolver rewrites the file and ships a copy after J accepted rewrites; a customer tests the search order against many keys.

Chen et al., 2026; Zhang et al., 2026) takes the harness as its seed, a large language model (LLM), the proposer, rewrites prompt and tool code, a task score keeps the rewrites that score higher, and the plagiarist ships the best candidate as its own. For a provenance mark this is a covert rewriting attack: no one targets the mark, the evolver is never told of it, yet an LLM rewrites the file that carries it, again and again, and a score decides which rewrites stay. The owner's question is whether a rewritten agent served under another name descends from its harness; its recourse is a mark read back from the deployed copy as a customer, from the agent's actions alone, and the mark answers only if it survives the rewriting.

Published marks were tested against other edits: PromptCOS (Yang et al., 2026) against removal of its tokens and re-optimization of the prompt, AgentMark (Huang et al., 2026) against partial logs and rewritten observations, and text watermarks such as KGW (Kirchenbauer et al., 2023) against LLM paraphrase, which dilutes them (Sadasivan et al., 2025; Kirchenbauer et al., 2024). None had

Figure

Figure 2: Our mark: a secret key orders near-tied entries of a table built from public games; the proposer rewrites the tool file blind to the mark; a customer reads the order from the agent's searches and tests it against other keys.

faced an evolver, so we ran them through one. Under GEPA (Genetic-Pareto), KGW in the template is gone from all 12 copies, since GEPA regenerates the template whole; AgentMark as released survives in 5 of 12, an integration failure (GEPA stores its two-file layout as one unloadable file), and in 9 of 12 with its code in the tool file (§4.5). We ask three research questions: what affects a mark’s survival under self-evolution (RQ1, §4.1–4.2), whether published marks and ours remain detectable in the copies evolvers deploy (RQ2, §4.3–4.5), and how to design a mark that survives an evolver blind to it (RQ3, §6). Our contributions are:

  1. The first measurement of provenance marks under self-evolution: three evolvers, five proposers, two environments, six mark designs (three published baselines), a held-out test and a survival account h=r⋅d⋅Ah = r \cdot d \cdot A tested on 96 later runs.

  2. What decides: the proposer, by two orders of magnitude (a keyed table keeps 0.999 of its order per rewrite under Llama-3.3-70B, 0.002 under gpt-oss-120b); selection weighs a carrier’s value only when decisions see enough games.

  3. A simple mark that fits these findings: the key is the order of near-tied entries in a table of where objects are found, from public games, so deleting it costs success and rewrites that keep its rows keep the order; a customer reads it from the agent's actions, and on held-out games it is detected in 62 of 76 copies whose lineage rewrote its file. A scheme-aware plagiarist reshuffles the ties at no measurable cost.

Results marked †\dagger were analysed without a prediction written beforehand; every other test was predicted before its data were read (Appendix E).

References (41)