<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: tappers</title>
    <description>The latest articles on DEV Community by tappers (@tappers_).</description>
    <link>https://dev.to/tappers_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4219060%2Ffa6a2007-fa93-4181-9139-db2a6ba2f787.png</url>
      <title>DEV Community: tappers</title>
      <link>https://dev.to/tappers_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tappers_"/>
    <language>en</language>
    <item>
      <title>Stop Your Coding Agent From Stepping on the Same Rake Twice: Cold-Start Exploration vs. a 5-Item MEMORY.md</title>
      <dc:creator>tappers</dc:creator>
      <pubDate>Sat, 31 Oct 2026 13:24:37 +0000</pubDate>
      <link>https://dev.to/tappers_/stop-your-coding-agent-from-stepping-on-the-same-rake-twice-cold-start-exploration-vs-a-5-item-47i1</link>
      <guid>https://dev.to/tappers_/stop-your-coding-agent-from-stepping-on-the-same-rake-twice-cold-start-exploration-vs-a-5-item-47i1</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;AI Labo Benchmark Series — Experiment &lt;code&gt;E20&lt;/code&gt; (Ranked #1 out of 41 Patterns)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This post is part of our empirical benchmark series testing AI coding agent harness patterns inside network-isolated Proxmox VMs against a hidden 20-case grading suite.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚀 &lt;strong&gt;&lt;a href="https://tappers.hashnode.dev/ai-agent-harness-patterns-benchmark" rel="noopener noreferrer"&gt;View All 41 Benchmark Results &amp;amp; Master Ranking&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🛡️ &lt;strong&gt;&lt;a href="https://tappers.hashnode.dev/air-gapped-proxmox-systemd-agent-sandbox" rel="noopener noreferrer"&gt;Read How Our Proxmox &amp;amp; systemd Anti-Cheating Sandbox Works&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Metadata &amp;amp; Experiment Identity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Experiment ID:&lt;/strong&gt; &lt;code&gt;E20&lt;/code&gt; (Backlog Candidate &lt;code&gt;C016&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run ID:&lt;/strong&gt; &lt;code&gt;e20-20261028-vm224-01&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sandbox Environment:&lt;/strong&gt; Proxmox Isolated VM &lt;code&gt;VM224&lt;/code&gt; (&lt;code&gt;ai-e20-224&lt;/code&gt;, 0 NICs, &lt;code&gt;virtio-serial&lt;/code&gt; QGA relay, &lt;code&gt;systemd&lt;/code&gt; UID separation)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; &lt;code&gt;gemini-3.8-flash&lt;/code&gt; (&lt;code&gt;thinkingLevel: LOW&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pattern Under Test:&lt;/strong&gt; Letta / MemGPT &amp;amp; Claude Code &lt;code&gt;CLAUDE.md&lt;/code&gt; / &lt;code&gt;MEMORY.md&lt;/code&gt; Pattern — &lt;em&gt;"Episodic Gotchas Memory vs. Cold-Start Exploration"&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. Executive Summary (TL;DR)
&lt;/h2&gt;

&lt;p&gt;When running multiple tasks sequentially on the same repository, starting every agent session from scratch (&lt;strong&gt;Cold-Start Exploration&lt;/strong&gt;) forces the model to rediscover non-obvious domain invariants and repository quirks ("gotchas") through repeated test failures—burning tens of thousands of tokens on stack traces and diluting model attention.&lt;/p&gt;

&lt;p&gt;To test whether a compact &lt;strong&gt;Episodic Gotchas Memory (&lt;code&gt;MEMORY.md&lt;/code&gt;)&lt;/strong&gt; solves this, we benchmarked a 3-module payment settlement pipeline (&lt;code&gt;validator.py&lt;/code&gt;, &lt;code&gt;settlement.py&lt;/code&gt;, &lt;code&gt;statement.py&lt;/code&gt;) containing &lt;strong&gt;5 subtle repository gotchas (7 domain invariants)&lt;/strong&gt; across two modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mode A (&lt;code&gt;Cold-Start Exploration&lt;/code&gt;):&lt;/strong&gt; No &lt;code&gt;MEMORY.md&lt;/code&gt; injected; the agent explores the codebase and diagnoses failures via standard test/audit feedback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mode B (&lt;code&gt;Episodic Gotchas Memory&lt;/code&gt;):&lt;/strong&gt; A &lt;strong&gt;5-item &lt;code&gt;MEMORY.md&lt;/code&gt; (&lt;code&gt;+442 tokens&lt;/code&gt;)&lt;/strong&gt; distilled from prior session failures is injected into the initial prompt.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Result
&lt;/h3&gt;

&lt;p&gt;Injecting just &lt;strong&gt;&lt;code&gt;+442 tokens&lt;/code&gt; of &lt;code&gt;MEMORY.md&lt;/code&gt;&lt;/strong&gt; reduced repository trap hits from &lt;strong&gt;&lt;code&gt;2 ➔ 0&lt;/code&gt;&lt;/strong&gt;, achieving a &lt;strong&gt;1-turn &lt;code&gt;20 / 20&lt;/code&gt; (100%) pass&lt;/strong&gt; on the hidden grading suite. Compared to Mode A (&lt;code&gt;17 / 20&lt;/code&gt; pass across 3 turns), Mode B cut cumulative input tokens by &lt;strong&gt;&lt;code&gt;-95.5%&lt;/code&gt; (&lt;code&gt;46,560&lt;/code&gt; ➔ &lt;code&gt;2,078&lt;/code&gt; tokens)&lt;/strong&gt;, API cost by &lt;strong&gt;&lt;code&gt;-83.7%&lt;/code&gt; (&lt;code&gt;$0.0454&lt;/code&gt; ➔ &lt;code&gt;$0.0074&lt;/code&gt;)&lt;/strong&gt;, and wall-clock time by &lt;strong&gt;&lt;code&gt;-54.8%&lt;/code&gt; (&lt;code&gt;2.21x&lt;/code&gt; faster)&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Mode A: Cold-Start Exploration (No &lt;code&gt;MEMORY.md&lt;/code&gt;)&lt;/th&gt;
&lt;th&gt;Mode B: Episodic Gotchas Memory (&lt;code&gt;MEMORY.md&lt;/code&gt; Injected)&lt;/th&gt;
&lt;th&gt;Delta / Improvement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hidden Grading Suite Score (20 Cases)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;17 / 20&lt;/code&gt; (85.0% — missed 3 edge cases)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;20 / 20&lt;/code&gt; (100% Perfect Pass)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+15.0 pt (Zero defects)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Repository Gotcha Traps Triggered&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;2 times&lt;/code&gt; (Turn 1, Turn 2)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;0 times&lt;/code&gt; (Avoided on Turn 1)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-100.0% (Zero traps)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LLM Calls (&lt;code&gt;model_calls&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3 calls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;1 call&lt;/code&gt; (1-shot completion)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-66.7% (3.00x faster convergence)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total File Edits (&lt;code&gt;file_edits&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;5 edits&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;3 edits&lt;/code&gt; (1 per module)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-40.0% reduction&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tool Output Volume (&lt;code&gt;tool_output_chars&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;56,605 chars&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;101 chars&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-99.8% (560x less noise)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Turn 1 Input / Output Tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;1,636&lt;/code&gt; in / &lt;code&gt;11&lt;/code&gt; out&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;2,078&lt;/code&gt; in / &lt;code&gt;1,560&lt;/code&gt; out&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;MEMORY.md&lt;/code&gt; overhead is only &lt;strong&gt;&lt;code&gt;+442&lt;/code&gt; in&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Turn 2 Input / Output Tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;15,153&lt;/code&gt; in / &lt;code&gt;1,220&lt;/code&gt; out&lt;/td&gt;
&lt;td&gt;— &lt;em&gt;(Completed on Turn 1)&lt;/em&gt;
&lt;/td&gt;
&lt;td&gt;Avoided Turn 1 failure log bloat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Turn 3 Input / Output Tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;29,771&lt;/code&gt; in / &lt;code&gt;1,569&lt;/code&gt; out&lt;/td&gt;
&lt;td&gt;— &lt;em&gt;(Completed on Turn 1)&lt;/em&gt;
&lt;/td&gt;
&lt;td&gt;Avoided Turn 2 failure log bloat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cumulative Input Tokens (&lt;code&gt;promptTokenCount&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;46,560 tokens&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;2,078 tokens&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-95.5% (22.41x token efficiency)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cumulative Output Tokens (&lt;code&gt;candidatesTokenCount&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2,800 tokens&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;1,560 tokens&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-44.3% reduction&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Elapsed Execution Time (&lt;code&gt;elapsed_seconds&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;30.16 sec&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;13.64 sec&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-54.8% (2.21x faster)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Estimated API Cost (&lt;code&gt;estimated_micro_usd&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;$0.0454&lt;/code&gt; (&lt;code&gt;45,421 micro-USD&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;$0.0074&lt;/code&gt; (&lt;code&gt;7,409 micro-USD&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-83.7% (6.13x cheaper)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  2. Experiment Architecture &amp;amp; Repository Gotchas Under Test
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+-------------------------------------------------------------------------+
| Proxmox Isolated VM224 (0 NICs, virtio-serial QGA, systemd UID split)   |
|  Target Task: 3-Module Settlement Pipeline Bugfix                       |
|               (validator.py / settlement.py / statement.py)             |
|                                                                         |
|  +-------------------------------------------------------------------+  |
|  | Mode A: ColdStartRunner (No MEMORY.md — Cold-Start Exploration)   |  |
|  |  - Turn 1: probe_repo_gotchas   (1,636 in / 28,317 chars trap log)|  |
|  |  - Turn 2: stage_partial_fix    (15,153 in / 27,975 chars log)    |  |
|  |  - Turn 3: submit_settlement    (29,771 in --&amp;gt; 17 / 20 passed)    |  |
|  +-------------------------------------------------------------------+  |
|                                                                         |
|  +-------------------------------------------------------------------+  |
|  | Mode B: EpisodicGotchasMemoryRunner (5-Item MEMORY.md [+442 tok]) |  |
|  |  - Turn 1: Reads 5-item MEMORY.md &amp;amp; submits all 3 modules         |  |
|  |            (2,078 in / 1,560 out --&amp;gt; 20 / 20 passed on 1st try!)  |  |
|  +-------------------------------------------------------------------+  |
|                                    |                                    |
|                                    v                                    |
|  +-------------------------------------------------------------------+  |
|  | Independent Grader (labjudge20): 20 Hidden Unit &amp;amp; E2E Test Cases  |  |
|  +-------------------------------------------------------------------+  |
+-------------------------------------------------------------------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The 5 Non-Obvious Repository Gotchas in the Initial Codebase
&lt;/h3&gt;

&lt;p&gt;The initial workspace inside &lt;code&gt;VM224&lt;/code&gt; contains three payment modules with subtle domain bugs and Python traps that are easy to miss on a cold read:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;validator.py&lt;/code&gt; (Transaction Validation &amp;amp; Normalization):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ALLOWED_CURRENCIES = ("USD", "EUR")&lt;/code&gt; is missing &lt;code&gt;"JPY"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Empty list &lt;code&gt;[]&lt;/code&gt; rejection is missing, and because &lt;strong&gt;&lt;code&gt;bool&lt;/code&gt; is a subclass of &lt;code&gt;int&lt;/code&gt; in Python (&lt;code&gt;isinstance(True, int) == True&lt;/code&gt;)&lt;/strong&gt;, &lt;code&gt;isinstance(v, bool)&lt;/code&gt; must be explicitly rejected before checking &lt;code&gt;isinstance(v, int)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The bounds check &lt;code&gt;if cnt &amp;lt;= 0 or cents &amp;lt;= 0 or not (0 &amp;lt;= bps &amp;lt; 1000):&lt;/code&gt; erroneously rejects &lt;strong&gt;&lt;code&gt;unit_cents == 0&lt;/code&gt; (&lt;code&gt;$0&lt;/code&gt; card authorization probes)&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;chargeback_bps == 1000&lt;/code&gt; (inclusive upper bound)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It mutates caller dictionaries in-place (&lt;code&gt;item["merchant_id"] = ...; out.append(item)&lt;/code&gt;) and leaks extra unvalidated keys (&lt;code&gt;extra&lt;/code&gt;) into the output.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;settlement.py&lt;/code&gt; (Batch Aggregation, Reserve &amp;amp; Tier Discounts):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Iterates with &lt;code&gt;for k in sorted(order):&lt;/code&gt;, destroying &lt;strong&gt;first-seen &lt;code&gt;(merchant_id, currency)&lt;/code&gt; ordering&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Applies the 10% chargeback reserve at &lt;code&gt;chargeback_bps &amp;gt;= 300&lt;/code&gt; instead of strictly &lt;code&gt;&amp;gt; 300&lt;/code&gt; (at exactly &lt;code&gt;300 bps&lt;/code&gt;, reserve must be &lt;code&gt;0&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Uses &lt;code&gt;subtotal &amp;gt; 15000&lt;/code&gt; instead of inclusive &lt;code&gt;&amp;gt;= 15000&lt;/code&gt;, omits the &lt;code&gt;10%&lt;/code&gt; discount for &lt;code&gt;ENTERPRISE&lt;/code&gt; below &lt;code&gt;15000&lt;/code&gt;, and forgets to cap &lt;code&gt;rebate_applied = min(fee_rebate, after_discount)&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;statement.py&lt;/code&gt; (Canonical Statement Formatter):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Uses &lt;code&gt;:&lt;/code&gt; instead of &lt;code&gt;#&lt;/code&gt; between merchant ID and currency (&lt;code&gt;{merchant_id}#{currency}:&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Formats zero discounts as &lt;code&gt;"0"&lt;/code&gt; instead of preserving the mandatory leading minus sign (&lt;code&gt;TIER_DISCOUNT: -0&lt;/code&gt;, &lt;code&gt;REBATE_APPLIED: -0&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  3. Inside the Prompts: What Mode B Saw vs. What Mode A Endured
&lt;/h2&gt;

&lt;h3&gt;
  
  
  3.1 The Exact 5-Item &lt;code&gt;MEMORY.md&lt;/code&gt; Injected into Mode B (&lt;code&gt;+442 tokens&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;In Mode B (&lt;code&gt;input-03.json&lt;/code&gt;), the harness prepended this exact 5-bullet &lt;code&gt;# MEMORY.md&lt;/code&gt; section to the initial prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# MEMORY.md — Repository Episodic Gotchas &amp;amp; Non-Obvious Invariants (Distilled from Session #1)&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; [GOTCHA-01 / validator.py] &lt;span class="sb"&gt;`ALLOWED_CURRENCIES`&lt;/span&gt; MUST include &lt;span class="sb"&gt;`"JPY"`&lt;/span&gt; (&lt;span class="sb"&gt;`("USD", "EUR", "JPY")`&lt;/span&gt;), empty &lt;span class="sb"&gt;`records`&lt;/span&gt; list MUST raise &lt;span class="sb"&gt;`ValueError`&lt;/span&gt;, and &lt;span class="sb"&gt;`isinstance(v, bool)`&lt;/span&gt; MUST be rejected before &lt;span class="sb"&gt;`isinstance(v, int)`&lt;/span&gt; because &lt;span class="sb"&gt;`bool`&lt;/span&gt; is a subclass of &lt;span class="sb"&gt;`int`&lt;/span&gt; in Python.
&lt;span class="p"&gt;2.&lt;/span&gt; [GOTCHA-02 / validator.py] Zero &lt;span class="sb"&gt;`unit_cents == 0`&lt;/span&gt; and boundary &lt;span class="sb"&gt;`chargeback_bps == 1000`&lt;/span&gt; are VALID (&lt;span class="sb"&gt;`tx_count &amp;gt; 0`&lt;/span&gt;, &lt;span class="sb"&gt;`unit_cents &amp;gt;= 0`&lt;/span&gt;, &lt;span class="sb"&gt;`0 &amp;lt;= chargeback_bps &amp;lt;= 1000`&lt;/span&gt;). Always return a brand-new 5-key dict without mutating caller dicts.
&lt;span class="p"&gt;3.&lt;/span&gt; [GOTCHA-03 / settlement.py] Preserve first-seen &lt;span class="sb"&gt;`(merchant_id, currency)`&lt;/span&gt; order (&lt;span class="sb"&gt;`for k in order:`&lt;/span&gt;, NEVER &lt;span class="sb"&gt;`sorted(order)`&lt;/span&gt;). The 10% reserve applies STRICTLY when &lt;span class="sb"&gt;`chargeback_bps &amp;gt; 300`&lt;/span&gt; (at &lt;span class="sb"&gt;`300`&lt;/span&gt; bps, &lt;span class="sb"&gt;`reserve_cents == 0`&lt;/span&gt;).
&lt;span class="p"&gt;4.&lt;/span&gt; [GOTCHA-04 / settlement.py] Tier discount threshold &lt;span class="sb"&gt;`subtotal &amp;gt;= 15000`&lt;/span&gt; is INCLUSIVE: &lt;span class="sb"&gt;`GROWTH`&lt;/span&gt; gets 10% (&lt;span class="sb"&gt;`&amp;gt;= 15000`&lt;/span&gt;), &lt;span class="sb"&gt;`ENTERPRISE`&lt;/span&gt; gets 20% (&lt;span class="sb"&gt;`&amp;gt;= 15000`&lt;/span&gt;) or 10% (&lt;span class="sb"&gt;`&amp;lt; 15000`&lt;/span&gt;), and &lt;span class="sb"&gt;`rebate_applied = min(fee_rebate, after_discount)`&lt;/span&gt;.
&lt;span class="p"&gt;5.&lt;/span&gt; [GOTCHA-05 / statement.py] Header delimiter between merchant and currency is &lt;span class="sb"&gt;`#`&lt;/span&gt; (&lt;span class="sb"&gt;`{merchant_id}#{currency}: tx=...`&lt;/span&gt;) and discount/rebate lines MUST always carry &lt;span class="sb"&gt;`-`&lt;/span&gt; even when zero (&lt;span class="sb"&gt;`TIER_DISCOUNT: -0`&lt;/span&gt;, &lt;span class="sb"&gt;`REBATE_APPLIED: -0`&lt;/span&gt;).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.2 The 56,605-Character Failure Trace That Flooded Mode A (&lt;code&gt;Cold-Start&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Without &lt;code&gt;MEMORY.md&lt;/code&gt;, Mode A called &lt;code&gt;probe_repo_gotchas&lt;/code&gt; on Turn 1 and &lt;code&gt;stage_partial_fix&lt;/code&gt; on Turn 2, accumulating &lt;strong&gt;&lt;code&gt;28,317&lt;/code&gt; characters&lt;/strong&gt; on Turn 1 and &lt;strong&gt;&lt;code&gt;27,975&lt;/code&gt; characters&lt;/strong&gt; on Turn 2 (totaling &lt;strong&gt;&lt;code&gt;56,605&lt;/code&gt; characters&lt;/strong&gt; of verbose audit stack traces) inside its conversation history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=== COLD-START REPOSITORY GOTCHA TRAP LOG (STAGE #1) ===
Status: FAILED (4 repository gotchas triggered due to missing cross-session MEMORY.md)
[COLD_START_GOTCHA_AUDIT_001] stage=1 invariant_probe=GOTCHA_02 trace_digest=0000000000000000000000000000000000000000000000000000000000000001
  File '/var/lib/ai-lab-e20-vm224-01/work_cold_start/settlement.py', line 21, in verify_repo_invariants
    AssertionError: Cold-start session rediscovered repository gotcha #2 via trial-and-error failure.
... (28,000+ chars of repetitive invariant audit traces) ...
TRIGGERED_GOTCHA [validator.py] (validator_contract_violation): Failed JPY currency, empty list check, bool rejection, zero unit_cents, 1000 bps, or mutated input dict.
TRIGGERED_GOTCHA [settlement.py] (settlement_order_or_reserve_boundary): Lines reordered by sorted(order) or 10% reserve charged at chargeback_bps == 300.
TRIGGERED_GOTCHA [settlement.py] (settlement_tier_discount_or_rebate_cap): Missed &amp;gt;=15000 inclusive discount boundary, ENTERPRISE 10% below 15000, or min(fee_rebate, after_discount) cap.
TRIGGERED_GOTCHA [statement.py] (statement_delimiter_or_signed_zero): Used ':' instead of '#' between merchant and currency or omitted '-' sign when discount/rebate is 0.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Code-Level Postmortem: Why Mode A Failed 3 out of 20 Test Cases
&lt;/h2&gt;

&lt;p&gt;Comparing the final submitted code bundles (&lt;code&gt;cold-start-bundle.json&lt;/code&gt; vs. &lt;code&gt;episodic-memory-bundle.json&lt;/code&gt;) reveals the exact mechanism of &lt;strong&gt;Attention Dilution&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# ❌ Mode A (Cold-Start, Turn 3 Final Submission — from cold-start-bundle.json)
&lt;/span&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;cnt&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;cents&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;bps&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;numeric bounds violated&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;merchant_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;currency&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# ✅ Mode B (Episodic Gotchas Memory, Turn 1 Final Submission — from episodic-memory-bundle.json)
&lt;/span&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;cnt&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;cents&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;bps&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;numeric bounds violated&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;merchant_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;currency&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tx_count&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cnt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;unit_cents&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cents&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;chargeback_bps&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;bps&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By Turn 3, Mode A was carrying &lt;strong&gt;29,771 input tokens&lt;/strong&gt; of noisy logs. While it managed to fix &lt;code&gt;settlement.py&lt;/code&gt;, &lt;code&gt;statement.py&lt;/code&gt;, &lt;code&gt;"JPY"&lt;/code&gt;, &lt;code&gt;bool&lt;/code&gt; rejection, and &lt;code&gt;chargeback_bps &amp;lt;= 1000&lt;/code&gt;, its diluted attention missed two fine-grained details in &lt;code&gt;validator.py&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Left &lt;code&gt;cents &amp;lt;= 0&lt;/code&gt; instead of &lt;code&gt;cents &amp;lt; 0&lt;/code&gt;:&lt;/strong&gt; Rejecting &lt;code&gt;unit_cents == 0&lt;/code&gt; (&lt;code&gt;$0&lt;/code&gt; auth probes) caused both unit test &lt;strong&gt;&lt;code&gt;validator_05_zero_unit_cents_allowed_negative_rejected&lt;/code&gt;&lt;/strong&gt; and E2E test &lt;strong&gt;&lt;code&gt;e2e_03_zero_amount_auth_statement&lt;/code&gt;&lt;/strong&gt; to fail.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Used `{&lt;/strong&gt;item, ...}&lt;code&gt; spread instead of constructing a clean 5-key dict:** Extra unvalidated keys from the input dict leaked into the normalized output, failing **&lt;/code&gt;validator_01_normalize_and_non_mutation`**.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Mode B, reading &lt;code&gt;[GOTCHA-02 / validator.py]&lt;/code&gt; inside a clean &lt;strong&gt;2,078-token&lt;/strong&gt; Turn 1 prompt, nailed every single invariant on the first try.&lt;/p&gt;

&lt;h3&gt;
  
  
  All 20 Hidden Test Case Results (Mode A vs. Mode B)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Test Case ID&lt;/th&gt;
&lt;th&gt;Invariant / Boundary Verified&lt;/th&gt;
&lt;th&gt;Mode A (&lt;code&gt;Cold-Start&lt;/code&gt;)&lt;/th&gt;
&lt;th&gt;Mode B (&lt;code&gt;MEMORY.md&lt;/code&gt;)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;validator_01_normalize_and_non_mutation&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Trim, uppercase, &lt;strong&gt;strip extra keys (strict 5-key dict)&lt;/strong&gt;, no caller mutation&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;❌ FAIL&lt;/strong&gt; (&lt;code&gt;**item&lt;/code&gt; leaked keys)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;validator_02_empty_and_non_list_rejected&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reject &lt;code&gt;[]&lt;/code&gt;, &lt;code&gt;None&lt;/code&gt;, and non-dict elements with &lt;code&gt;ValueError&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;code&gt;validator_03_blank_or_non_str_merchant_and_unknown_currency_rejected&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reject blank merchant ID / unknown currency; allow &lt;code&gt;JPY&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;&lt;code&gt;validator_04_tx_count_and_chargeback_bps_bounds_0_to_1000&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Allow &lt;code&gt;chargeback_bps&lt;/code&gt; &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;1000&lt;/code&gt; (inclusive); reject out-of-range&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;code&gt;validator_05_zero_unit_cents_allowed_negative_rejected&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Allow &lt;code&gt;unit_cents == 0&lt;/code&gt; (&lt;code&gt;$0&lt;/code&gt; auth)&lt;/strong&gt;; reject negative amounts&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;❌ FAIL&lt;/strong&gt; (&lt;code&gt;cents &amp;lt;= 0&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;&lt;code&gt;validator_06_bool_rejected_on_all_int_fields&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reject Python &lt;code&gt;bool&lt;/code&gt; (&lt;code&gt;True&lt;/code&gt;/&lt;code&gt;False&lt;/code&gt;) on all integer fields&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;&lt;code&gt;settlement_01_first_seen_order_and_aggregation&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Preserve first-seen &lt;code&gt;(merchant_id, currency)&lt;/code&gt; order and sum &lt;code&gt;tx_count&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;&lt;code&gt;settlement_02_conflicting_unit_cents_or_bps_rejected&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reject conflicting &lt;code&gt;unit_cents&lt;/code&gt; or &lt;code&gt;chargeback_bps&lt;/code&gt; for same key&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;&lt;code&gt;settlement_03_exact_chargeback_bps_300_vs_301_boundary&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exact boundary: &lt;code&gt;300 bps&lt;/code&gt; (0 reserve) vs. &lt;code&gt;301 bps&lt;/code&gt; (10% reserve)&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;&lt;code&gt;settlement_04_exact_15000_growth_discount_boundary&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;GROWTH&lt;/code&gt; tier boundary: &lt;code&gt;14999&lt;/code&gt; (0%) vs. &lt;code&gt;15000&lt;/code&gt; (10% discount)&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;&lt;code&gt;settlement_05_enterprise_tiered_10_vs_20_discount&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ENTERPRISE&lt;/code&gt; tier: &lt;code&gt;&amp;lt; 15000&lt;/code&gt; (10%) vs. &lt;code&gt;&amp;gt;= 15000&lt;/code&gt; (20%)&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;&lt;code&gt;settlement_06_floor_truncation_reserve_and_fee&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Integer floor division (&lt;code&gt;//&lt;/code&gt;) for reserve and wire fee&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;&lt;code&gt;settlement_07_rebate_capped_at_after_discount&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cap rebate via &lt;code&gt;min(fee_rebate, after_discount)&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;&lt;code&gt;settlement_08_invalid_tier_or_bool_rebate_rejected&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reject unknown tier names and boolean &lt;code&gt;fee_rebate&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;&lt;code&gt;settlement_09_lowercase_tier_and_multi_currency_grouping&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Normalize lowercase tier names and group multi-currency lines&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;&lt;code&gt;e2e_01_growth_below_15000_minus_zero_and_hash_separator&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;E2E: &lt;code&gt;#&lt;/code&gt; delimiter and &lt;code&gt;TIER_DISCOUNT: -0&lt;/code&gt; / &lt;code&gt;REBATE_APPLIED: -0&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;&lt;code&gt;e2e_02_enterprise_reserve_and_rebate_statement&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;E2E: Full &lt;code&gt;ENTERPRISE&lt;/code&gt; reserve + 20% discount + rebate statement&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;&lt;code&gt;e2e_03_zero_amount_auth_statement&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;E2E: End-to-end processing of &lt;code&gt;unit_cents == 0&lt;/code&gt; (&lt;code&gt;$0&lt;/code&gt; auth)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;❌ FAIL&lt;/strong&gt; (Rejected in Stage 1)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;&lt;code&gt;e2e_04_line_order_preserved_in_statement&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;E2E: Preserve first-seen line order in rendered statement&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;&lt;code&gt;e2e_05_error_propagation_across_stages&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;E2E: Propagate Stage 2 conflicting unit price &lt;code&gt;ValueError&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅ PASS&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;✅ PASS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;20 Hidden Cases&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;17 / 20&lt;/code&gt; (85.0%)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;20 / 20&lt;/code&gt; (100%)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  5. Practical Takeaway: How to Structure Your Own &lt;code&gt;MEMORY.md&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;442-token investment&lt;/strong&gt; saved &lt;strong&gt;44,482 input tokens&lt;/strong&gt; (a &lt;strong&gt;100x+ token ROI&lt;/strong&gt;) while eliminating 3 subtle edge-case bugs.&lt;/p&gt;

&lt;p&gt;To get the same result in your own repositories with Claude Code, Cursor, or custom agents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Don't turn &lt;code&gt;CLAUDE.md&lt;/code&gt; or &lt;code&gt;MEMORY.md&lt;/code&gt; into a 500-line textbook.&lt;/strong&gt; (As we proved in &lt;code&gt;E35&lt;/code&gt;, monolithic instruction files hurt performance.)&lt;/li&gt;
&lt;li&gt;Instead, maintain a &lt;strong&gt;10-to-20 line &lt;code&gt;MEMORY.md&lt;/code&gt;&lt;/strong&gt; containing &lt;em&gt;only&lt;/em&gt; &lt;strong&gt;&lt;code&gt;[GOTCHA-ID / filename] 1-line invariant&lt;/code&gt;&lt;/strong&gt; entries distilled from actual test failures or PR review catches:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# MEMORY.md (Repository Gotchas — Keep under 20 lines)&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [GOTCHA-01 / validator.py] &lt;span class="sb"&gt;`isinstance(x, bool)`&lt;/span&gt; is True for &lt;span class="sb"&gt;`int`&lt;/span&gt; in Python; always reject &lt;span class="sb"&gt;`bool`&lt;/span&gt; before checking &lt;span class="sb"&gt;`isinstance(x, int)`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; [GOTCHA-02 / validator.py] &lt;span class="sb"&gt;`unit_cents == 0`&lt;/span&gt; ($0 auth) and &lt;span class="sb"&gt;`chargeback_bps == 1000`&lt;/span&gt; are valid; construct a new 5-key dict (never &lt;span class="sb"&gt;`**item`&lt;/span&gt; or mutate in-place).
&lt;span class="p"&gt;-&lt;/span&gt; [GOTCHA-03 / settlement.py] Keep first-seen order (&lt;span class="sb"&gt;`for k in order:`&lt;/span&gt;); apply 10% reserve strictly when &lt;span class="sb"&gt;`chargeback_bps &amp;gt; 300`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; [GOTCHA-04 / statement.py] Use &lt;span class="sb"&gt;`#`&lt;/span&gt; between merchant and currency (&lt;span class="sb"&gt;`{mid}#{cur}:`&lt;/span&gt;), and format zero discount/rebate with a leading minus (&lt;span class="sb"&gt;`-0`&lt;/span&gt;).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🔗 Continue Reading the Series
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🚀 &lt;strong&gt;Master Benchmark Hub (All 41 Patterns Ranked):&lt;/strong&gt; &lt;a href="https://tappers.hashnode.dev/ai-agent-harness-patterns-benchmark" rel="noopener noreferrer"&gt;I Benchmarked 41 AI Agent Harness Patterns in Isolated VMs: How to Cut Tokens by 90% Without Losing Accuracy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🛡️ &lt;strong&gt;Methodology &amp;amp; Sandbox Architecture:&lt;/strong&gt; &lt;a href="https://tappers.hashnode.dev/air-gapped-proxmox-systemd-agent-sandbox" rel="noopener noreferrer"&gt;How to Benchmark AI Agents Without Eval Cheating or API Key Leaks: Designing a Proxmox &amp;amp; systemd Sandbox&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
      <category>harness</category>
    </item>
    <item>
      <title>How to Benchmark AI Agents Without Eval Cheating or API Key Leaks: Designing a Proxmox &amp; systemd Sandbox</title>
      <dc:creator>tappers</dc:creator>
      <pubDate>Sat, 31 Oct 2026 13:18:48 +0000</pubDate>
      <link>https://dev.to/tappers_/how-to-benchmark-ai-agents-without-eval-cheating-or-api-key-leaks-designing-a-proxmox-systemd-12ak</link>
      <guid>https://dev.to/tappers_/how-to-benchmark-ai-agents-without-eval-cheating-or-api-key-leaks-designing-a-proxmox-systemd-12ak</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;Methodology &amp;amp; Eval Infrastructure Deep Dive&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This article is the &lt;strong&gt;Methodology &amp;amp; Architecture companion&lt;/strong&gt; to our &lt;strong&gt;&lt;a href="https://tappers.hashnode.dev/ai-agent-harness-patterns-benchmark" rel="noopener noreferrer"&gt;AI Labo Agent Harness Engineering Benchmark Series (41 Patterns Tested)&lt;/a&gt;&lt;/strong&gt;.&lt;br&gt;
Here we explain how we designed an isolated evaluation infrastructure combining &lt;strong&gt;Proxmox VE (0-NIC VMs), QEMU Guest Agent (&lt;code&gt;virtio-serial&lt;/code&gt;), a budget-enforcing Mac relay, and Linux UID / &lt;code&gt;systemd&lt;/code&gt; sandboxing&lt;/strong&gt; to prevent test peeking, reward hacking, and API key leaks—along with a candid look at the &lt;strong&gt;current security boundaries and remaining limitations&lt;/strong&gt; of our setup.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;When benchmarking autonomous AI coding agents fairly and safely, engineers inevitably run into a &lt;strong&gt;three-way dilemma (trilemma)&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Eval Cheating / Reward Hacking:&lt;/strong&gt; If the AI agent and the grading test suite share the same user privileges and filesystem view, a capable model may inspect the test cases to hardcode edge-case branches or modify the test files (&lt;code&gt;pytest.skip()&lt;/code&gt;, weakening assertions) instead of fixing the underlying bug.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Key Exposure &amp;amp; Runaway Spend:&lt;/strong&gt; Passing &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; or &lt;code&gt;OPENAI_API_KEY&lt;/code&gt; directly into the guest environment creates a risk of credential leakage via logs/prompts and runaway billing if an agent enters an infinite retry loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network Isolation vs. Cloud LLM Access:&lt;/strong&gt; Stripping network interfaces (NICs) from the sandbox VM prevents unauthorized external traffic, but also cuts off direct HTTPS access to cloud LLM APIs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To solve these challenges simultaneously, we combined a mini-PC running &lt;strong&gt;Proxmox VE&lt;/strong&gt; with a &lt;strong&gt;macOS controller&lt;/strong&gt; over a 1-to-1 &lt;strong&gt;Tailscale&lt;/strong&gt; link to build the &lt;strong&gt;AI Labo Evaluation Sandbox&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Network-Isolated VMs (0 NICs) + Inspected Relay Proxy:&lt;/strong&gt; Experiment VMs have zero network interfaces. The sole external data path is structured JSON passed over QEMU Guest Agent (&lt;code&gt;virtio-serial&lt;/code&gt;) to a macOS relay that loads the API key from the OS Keychain into memory once and enforces strict call, token, and USD budget caps (&lt;strong&gt;zero API keys inside the VM&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OS-Level Separation via Linux UIDs and &lt;code&gt;systemd&lt;/code&gt; (&lt;code&gt;ProtectSystem=strict&lt;/code&gt; / &lt;code&gt;InaccessiblePaths&lt;/code&gt;):&lt;/strong&gt; While the agent (&lt;code&gt;labexp&lt;/code&gt;) runs, &lt;code&gt;ProtectSystem=strict&lt;/code&gt; mounts the filesystem read-only (except for pre-created target &lt;code&gt;.py&lt;/code&gt; files bound via &lt;code&gt;ReadWritePaths&lt;/code&gt;), and &lt;code&gt;InaccessiblePaths&lt;/code&gt; blocks access to the grading suite (&lt;code&gt;evaluation/&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;0.8s Cached ISO Generation + Disposable Full-Clone VMs:&lt;/strong&gt; Pre-verified &lt;code&gt;.deb&lt;/code&gt; packages (verified via &lt;code&gt;InRelease&lt;/code&gt; ➔ &lt;code&gt;Packages&lt;/code&gt; SHA-256 chains) and experiment payloads are burned into read-only &lt;code&gt;iso9660&lt;/code&gt; CD-ROM images in 0.8 seconds, mounted onto a fresh full clone of a stopped Debian 13 base VM, and executed end-to-end in &lt;strong&gt;60–90 seconds per experiment&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. Why Naive Single-User Execution Distorts Agent Benchmarks
&lt;/h2&gt;

&lt;p&gt;Anyone who has evaluated coding agents at scale has seen &lt;strong&gt;Reward Hacking&lt;/strong&gt; firsthand: the agent reports that all tests pass on Turn 1, but &lt;code&gt;git diff&lt;/code&gt; reveals that instead of fixing the bug, it modified the test runner or weakened an assertion.&lt;/p&gt;

&lt;p&gt;Running the &lt;strong&gt;Agent (Generator)&lt;/strong&gt; and the &lt;strong&gt;Grader (Verifier)&lt;/strong&gt; under the same user and writable filesystem introduces four structural failure modes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Failure Mode in Naive Setups&lt;/th&gt;
&lt;th&gt;Root Cause&lt;/th&gt;
&lt;th&gt;AI Labo Mitigation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1. Test Peeking (Eval Cheating)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;If hidden grading tests are readable by the agent's UID, file-search tools can read test inputs and hardcode answers.&lt;/td&gt;
&lt;td&gt;Separate UID (&lt;code&gt;labjudge&lt;/code&gt;, &lt;code&gt;mode 0750&lt;/code&gt;) + &lt;code&gt;systemd&lt;/code&gt; &lt;strong&gt;&lt;code&gt;InaccessiblePaths&lt;/code&gt;&lt;/strong&gt; denies access (&lt;code&gt;EACCES&lt;/code&gt;) to the grading directory during agent execution.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2. Tampering with Tests or Configs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A writable working directory allows the agent to overwrite test files, runners, or config files.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;&lt;code&gt;ProtectSystem=strict&lt;/code&gt;&lt;/strong&gt; mounts the filesystem read-only; &lt;code&gt;ReadWritePaths&lt;/code&gt; permits in-place writes &lt;em&gt;only&lt;/em&gt; to the existing inodes of target &lt;code&gt;.py&lt;/code&gt; files.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3. API Key Leaks &amp;amp; Unbounded Spend&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Storing API keys in guest environment variables risks exposure in logs and unthrottled API loops.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Zero NICs and zero API keys inside the VM.&lt;/strong&gt; The Mac relay enforces &lt;code&gt;maxOutputTokens&lt;/code&gt;, cumulative token limits, and micro-USD budget caps.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4. Cross-Experiment Environment Drift&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reusing the same environment across runs leaves behind temp files, caches, or altered state.&lt;/td&gt;
&lt;td&gt;Every experiment full-clones a stopped &lt;strong&gt;Debian 13 Golden Base VM&lt;/strong&gt; (&lt;code&gt;VM9300&lt;/code&gt;) and mounts immutable &lt;code&gt;iso9660&lt;/code&gt; CD-ROMs.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;Why Proxmox VMs + &lt;code&gt;systemd&lt;/code&gt; Instead of Docker Containers?&lt;/strong&gt;&lt;br&gt;
You &lt;em&gt;can&lt;/em&gt; achieve similar logical separation in Docker by splitting agent and grader containers, passing &lt;code&gt;--network none&lt;/code&gt; and &lt;code&gt;--read-only&lt;/code&gt;, and keeping secrets on a host proxy.&lt;br&gt;
We chose &lt;strong&gt;Proxmox VMs + &lt;code&gt;systemd&lt;/code&gt;&lt;/strong&gt; for two reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Kernel Isolation:&lt;/strong&gt; Avoiding shared host kernels between the controller/host and disposable guest environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full-Clone &amp;amp; ISO Reproducibility:&lt;/strong&gt; LVM full clones combined with immutable &lt;code&gt;iso9660&lt;/code&gt; virtual CD-ROMs make it trivial to pin and audit exact VM configuration SHA-256 digests before and after every run.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. System Architecture (Mac × Tailscale × Proxmox × 0-NIC VM)
&lt;/h2&gt;

&lt;p&gt;The infrastructure is split across a &lt;strong&gt;macOS Controller/Relay&lt;/strong&gt; and a &lt;strong&gt;Proxmox VE Host&lt;/strong&gt; connected via a 1-to-1 peer-restricted Tailscale VPN:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+-------------------------------------------------------------------------+
| 1. Controller &amp;amp; Relay Host (macOS)                                      |
|  - OS Keychain / 0400 Secret --&amp;gt; Loaded once into memory at startup     |
|  - Experiment Orchestrator   --&amp;gt; Drives Phase 1 (ISO) &amp;amp; Phase 2 (Run)   |
|  - Private API Relay         --&amp;gt; Enforces call, token &amp;amp; micro-USD caps  |
|  - Evidence Store            --&amp;gt; Verifies &amp;amp; saves 7 artifacts + SHA256  |
+------------------------------------+------------------------------------+
                                     |
         1-to-1 Peer-Restricted VPN  |  (SSH Control + Peer-Pinned HTTP)
                                     v
+-------------------------------------------------------------------------+
| 2. Virtualization Host (Proxmox VE Mini-PC)                             |
|  - Host Controller (driver.py)  --&amp;gt; Allowlisted qm/pvesh + Watchdogs    |
|  - Local ISO Builder            --&amp;gt; Verified .deb cache -&amp;gt; iso9660 CDs  |
|  - Golden Base VM (VM9300)      --&amp;gt; Stopped Debian 13 clone source      |
|                                                                         |
|  +-------------------------------------------------------------------+  |
|  | 3. Disposable Sandbox VM (Full Clone per Experiment / 0 NICs)     |  |
|  |  - serial0 (/dev/ttyS0) : One-way boot &amp;amp; QGA readiness signal     |  |
|  |  - virtio-serial (QGA)  : Bidirectional RPC via `qm guest exec`   |  |
|  |  - ide2 &amp;amp; ide3 (CD-ROM) : Read-only offline packages &amp;amp; payload    |  |
|  |                                                                   |  |
|  |  +-----------------------------+  +----------------------------+  |  |
|  |  | Agent Sandbox (UID: labexp) |  | Grader Sandbox (labjudge)  |  |  |
|  |  | - PrivateNetwork=yes        |  | - Runs AFTER agent exits   |  |  |
|  |  | - ProtectSystem=strict      |  | - Evaluates 20 hidden cases|  |  |
|  |  | - InaccessiblePaths=/opt/.. |  |   + 6 boundary mutants     |  |  |
|  |  |   /evaluation (EACCES)      |  | - Writes grader-output.json|  |  |
|  |  +-----------------------------+  +----------------------------+  |  |
|  +-------------------------------------------------------------------+  |
+-------------------------------------------------------------------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Full Component Matrix (15 Components, Privileges, and Security Roles)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Environment&lt;/th&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Execution Identity&lt;/th&gt;
&lt;th&gt;Primary Role&lt;/th&gt;
&lt;th&gt;Security &amp;amp; Integrity Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;External Cloud&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cloud LLM API&lt;/td&gt;
&lt;td&gt;Managed Service&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;countTokens&lt;/code&gt; &amp;amp; &lt;code&gt;generateContent&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Accepts HTTPS only from the Mac relay; unreachable from the guest VM.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mac Controller&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OS Keychain / Secret&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Security.framework&lt;/code&gt; / &lt;code&gt;0400&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Stores LLM API key&lt;/td&gt;
&lt;td&gt;Never written to &lt;code&gt;.env&lt;/code&gt; or VM disks; read once into relay memory at startup.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mac Controller&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Orchestrator&lt;/td&gt;
&lt;td&gt;Local user&lt;/td&gt;
&lt;td&gt;Runs Phase 1 (ISO) &amp;amp; Phase 2 (VM run)&lt;/td&gt;
&lt;td&gt;Invokes the Proxmox host driver over SSH and verifies final evidence hashes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mac Controller&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Private API Relay&lt;/td&gt;
&lt;td&gt;Local user (&lt;code&gt;serve_once.py&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Proxies LLM calls &amp;amp; enforces budgets&lt;/td&gt;
&lt;td&gt;Enforces &lt;strong&gt;max calls, input/output token caps (&lt;code&gt;maxOutputTokens&lt;/code&gt;), and micro-USD caps&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mac Controller&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Evidence Storage&lt;/td&gt;
&lt;td&gt;Local filesystem&lt;/td&gt;
&lt;td&gt;Stores 7 evidence files + SHA256 manifest&lt;/td&gt;
&lt;td&gt;Preserves tamper-evident records of prompts, actions, token usage, and test results.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Private VPN&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tailscale 1-to-1 Link&lt;/td&gt;
&lt;td&gt;Encrypted Mesh VPN&lt;/td&gt;
&lt;td&gt;Mac ⇔ Proxmox control &amp;amp; relay traffic&lt;/td&gt;
&lt;td&gt;Pins source peer IP (&lt;code&gt;100.x.x.x&lt;/code&gt;) so LAN or external hosts cannot hit the relay.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Proxmox Host&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Host Controller&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;root&lt;/code&gt; (&lt;code&gt;driver.py&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Clones VM, drives QGA, runs watchdogs&lt;/td&gt;
&lt;td&gt;Executes only allowlisted &lt;code&gt;qm&lt;/code&gt; / &lt;code&gt;pvesh&lt;/code&gt; commands with stage watchdogs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Proxmox Host&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Local ISO Builder&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;builder&lt;/code&gt; (&lt;code&gt;builder.py&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Packs verified &lt;code&gt;.deb&lt;/code&gt; cache &amp;amp; code into ISOs&lt;/td&gt;
&lt;td&gt;Verifies &lt;code&gt;.deb&lt;/code&gt; SHA-256 hashes from signed &lt;code&gt;InRelease&lt;/code&gt; ➔ &lt;code&gt;Packages&lt;/code&gt; metadata.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Proxmox Host&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Golden Base VM&lt;/td&gt;
&lt;td&gt;Stopped (&lt;code&gt;VM9300&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Clean Debian 13 clone source&lt;/td&gt;
&lt;td&gt;Kept stopped with pinned config SHA-256 to eliminate cross-run drift.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Proxmox Host&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Audit Broker VM&lt;/td&gt;
&lt;td&gt;Isolated VM (&lt;code&gt;VM100&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Holds ledger hash pins&lt;/td&gt;
&lt;td&gt;Verified before and after every experiment to ensure host state integrity.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sandbox VM (0 NIC)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;serial0&lt;/code&gt; (&lt;code&gt;/dev/ttyS0&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Kernel / Bootstrap&lt;/td&gt;
&lt;td&gt;One-way boot progress notification&lt;/td&gt;
&lt;td&gt;Emulated 16550 UART used &lt;em&gt;only&lt;/em&gt; during initial boot to signal when offline QGA installation finishes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sandbox VM (0 NIC)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;virtio-serial&lt;/code&gt; (QGA)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;root&lt;/code&gt; (&lt;code&gt;guest_rpc.py&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Bidirectional host-guest RPC channel&lt;/td&gt;
&lt;td&gt;Uses &lt;code&gt;org.qemu.guest_agent.0&lt;/code&gt; (&lt;code&gt;.qga&lt;/code&gt; socket) via &lt;code&gt;qm guest exec&lt;/code&gt; to exchange JSON.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sandbox VM (0 NIC)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Virtual CD-ROMs × 2&lt;/td&gt;
&lt;td&gt;Read-only (&lt;code&gt;iso9660&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Delivers &lt;code&gt;.deb&lt;/code&gt; deps (&lt;code&gt;ide2&lt;/code&gt;) &amp;amp; payload (&lt;code&gt;ide3&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Immutable media inside the guest; &lt;code&gt;install.py&lt;/code&gt; verifies payload SHA-256 before extraction.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sandbox VM (0 NIC)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Agent Sandbox&lt;/td&gt;
&lt;td&gt;Unprivileged &lt;code&gt;labexp&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Runs the AI agent under test (Mode A / B)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ProtectSystem=strict&lt;/code&gt; mounts &lt;code&gt;/&lt;/code&gt; read-only; &lt;code&gt;InaccessiblePaths&lt;/code&gt; blocks access to &lt;code&gt;evaluation/&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sandbox VM (0 NIC)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Grader Sandbox&lt;/td&gt;
&lt;td&gt;Unprivileged &lt;code&gt;labjudge&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Runs independent grading suite after agent exits&lt;/td&gt;
&lt;td&gt;Starts only after &lt;code&gt;agent.service&lt;/code&gt; stops; evaluates snapshots against 20 hidden test cases.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  3. Core Mechanism 1: OS-Level Separation via Linux UIDs and &lt;code&gt;systemd&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Inside each experiment VM, the &lt;strong&gt;Agent (&lt;code&gt;labexp&lt;/code&gt;)&lt;/strong&gt; and the &lt;strong&gt;Independent Grader (&lt;code&gt;labjudge&lt;/code&gt;)&lt;/strong&gt; run under separate Linux UIDs and separate &lt;code&gt;systemd&lt;/code&gt; mount namespaces.&lt;/p&gt;

&lt;p&gt;Before starting the agent, the root installer (&lt;code&gt;guest/install.py&lt;/code&gt;) sets strict filesystem ownership and permissions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Grading directory (&lt;code&gt;/opt/.../evaluation&lt;/code&gt;)&lt;/strong&gt;: Owned by &lt;code&gt;root:labjudge&lt;/code&gt; with mode &lt;code&gt;0750&lt;/code&gt; (files &lt;code&gt;0640&lt;/code&gt;), preventing &lt;code&gt;labexp&lt;/code&gt; from reading it even at the basic DAC level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Work directories (&lt;code&gt;work_cold_start/&lt;/code&gt;, &lt;code&gt;work_episodic_memory/&lt;/code&gt;)&lt;/strong&gt;: Owned by &lt;code&gt;root:root&lt;/code&gt; with mode &lt;code&gt;0555&lt;/code&gt; (read/traverse only). Only the 3 target Python files inside each directory (&lt;code&gt;validator.py&lt;/code&gt;, &lt;code&gt;settlement.py&lt;/code&gt;, &lt;code&gt;statement.py&lt;/code&gt;) are pre-created with &lt;code&gt;labexp&lt;/code&gt; ownership (&lt;code&gt;0644&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below are the actual &lt;code&gt;systemd&lt;/code&gt; unit files from experiment &lt;code&gt;E20&lt;/code&gt; (&lt;code&gt;VM224&lt;/code&gt;):&lt;/p&gt;

&lt;h3&gt;
  
  
  Agent Execution Unit (&lt;code&gt;ai-lab-e20-01-agent.service&lt;/code&gt;)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[Unit]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;Description&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;AI Lab E20 Episodic Gotchas Memory Isolated Agent Runner (VM224)&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nn"&gt;[Service]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;Type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;oneshot&lt;/span&gt;
&lt;span class="py"&gt;User&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;labexp20&lt;/span&gt;
&lt;span class="py"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;labexp20&lt;/span&gt;
&lt;span class="py"&gt;WorkingDirectory&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01&lt;/span&gt;
&lt;span class="py"&gt;ExecStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/usr/bin/python3 -I -B /opt/ai-lab-e20-vm224-01/guest/run_guest.py&lt;/span&gt;
&lt;span class="py"&gt;Restart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;no&lt;/span&gt;
&lt;span class="py"&gt;KillMode&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;control-group&lt;/span&gt;
&lt;span class="py"&gt;TimeoutStartSec&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;240&lt;/span&gt;
&lt;span class="py"&gt;NoNewPrivileges&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;PrivateTmp&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;PrivateDevices&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;PrivateNetwork&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;ProtectSystem&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;strict&lt;/span&gt;
&lt;span class="py"&gt;ProtectHome&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;CapabilityBoundingSet&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;
&lt;span class="py"&gt;AmbientCapabilities&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;
&lt;span class="c"&gt;# Under ProtectSystem=strict, ONLY outbox and the 6 pre-created target .py files are writable:
&lt;/span&gt;&lt;span class="py"&gt;ReadWritePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/outbox&lt;/span&gt;
&lt;span class="py"&gt;ReadWritePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/work_cold_start/validator.py&lt;/span&gt;
&lt;span class="py"&gt;ReadWritePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/work_cold_start/settlement.py&lt;/span&gt;
&lt;span class="py"&gt;ReadWritePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/work_cold_start/statement.py&lt;/span&gt;
&lt;span class="py"&gt;ReadWritePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/work_episodic_memory/validator.py&lt;/span&gt;
&lt;span class="py"&gt;ReadWritePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/work_episodic_memory/settlement.py&lt;/span&gt;
&lt;span class="py"&gt;ReadWritePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/work_episodic_memory/statement.py&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="c"&gt;# Grading code (evaluation/), initial fixtures, and evidence dirs are overlaid with 0000 mounts:
&lt;/span&gt;&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/root&lt;/span&gt;
&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/evidence&lt;/span&gt;
&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/grade&lt;/span&gt;
&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/opt/ai-lab-e20-vm224-01/evaluation&lt;/span&gt;
&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/opt/ai-lab-e20-vm224-01/fixtures&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Independent Grader Unit (&lt;code&gt;ai-lab-e20-01-grade.service&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Only after &lt;code&gt;agent.service&lt;/code&gt; terminates and the root RPC handler (&lt;code&gt;guest_rpc.py&lt;/code&gt;) copies a snapshot of the edited files into &lt;code&gt;grade/&lt;/code&gt; does the grader service launch as &lt;code&gt;labjudge20&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[Unit]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;Description&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;AI Lab E20 Episodic Gotchas Memory Isolated Grader (VM224)&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nn"&gt;[Service]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;Type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;oneshot&lt;/span&gt;
&lt;span class="py"&gt;User&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;labjudge20&lt;/span&gt;
&lt;span class="py"&gt;Group&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;labjudge20&lt;/span&gt;
&lt;span class="py"&gt;WorkingDirectory&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/grade&lt;/span&gt;
&lt;span class="py"&gt;ExecStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/usr/bin/python3 -I -B /opt/ai-lab-e20-vm224-01/evaluation/grade_comparison.py&lt;/span&gt;
&lt;span class="py"&gt;Restart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;no&lt;/span&gt;
&lt;span class="py"&gt;KillMode&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;control-group&lt;/span&gt;
&lt;span class="py"&gt;TimeoutStartSec&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;30&lt;/span&gt;
&lt;span class="py"&gt;NoNewPrivileges&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;PrivateTmp&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;PrivateDevices&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;PrivateNetwork&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;ProtectSystem&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;strict&lt;/span&gt;
&lt;span class="py"&gt;ProtectHome&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;CapabilityBoundingSet&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;
&lt;span class="py"&gt;AmbientCapabilities&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;
&lt;span class="c"&gt;# The grader can only write to the single grader-output.json file:
&lt;/span&gt;&lt;span class="py"&gt;ReadWritePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/grader-output.json&lt;/span&gt;
&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/root&lt;/span&gt;
&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/evidence&lt;/span&gt;
&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/inbox&lt;/span&gt;
&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/outbox&lt;/span&gt;
&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/work_cold_start&lt;/span&gt;
&lt;span class="py"&gt;InaccessiblePaths&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/var/lib/ai-lab-e20-vm224-01/work_episodic_memory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This layered setup enforces three protections during agent execution:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Blocking Access to Grading Contents (DAC &lt;code&gt;0750&lt;/code&gt; + &lt;code&gt;InaccessiblePaths&lt;/code&gt;):&lt;/strong&gt;
&lt;code&gt;InaccessiblePaths&lt;/code&gt; bind-mounts an empty directory with &lt;code&gt;0000&lt;/code&gt; permissions over the target path in the unit's mount namespace. While listing &lt;code&gt;/opt/ai-lab-.../&lt;/code&gt; still shows the directory entry &lt;code&gt;evaluation&lt;/code&gt;, any attempt to read or traverse into it fails immediately with &lt;code&gt;Permission denied (EACCES)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preventing File Creation, Deletion, or Rename (&lt;code&gt;ProtectSystem=strict&lt;/code&gt; + Root-Owned &lt;code&gt;0555&lt;/code&gt; Workdir):&lt;/strong&gt;
The primary mechanism blocking file creation or deletion is &lt;code&gt;ProtectSystem=strict&lt;/code&gt;, which mounts the entire filesystem read-only and bind-mounts only the 6 listed &lt;code&gt;.py&lt;/code&gt; files as writable (backed up by root-owned &lt;code&gt;0555&lt;/code&gt; directory permissions so &lt;code&gt;labexp&lt;/code&gt; cannot &lt;code&gt;chmod&lt;/code&gt; the parent directory). Running Python with &lt;code&gt;-I&lt;/code&gt; (isolated mode) also disables user site-packages and &lt;code&gt;PYTHONPATH&lt;/code&gt; injection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured JSON Actions Only:&lt;/strong&gt;
In our benchmark suite (&lt;code&gt;E04&lt;/code&gt;–&lt;code&gt;E44&lt;/code&gt;), the agent does not execute arbitrary shell commands; both the Mac relay (&lt;code&gt;serve_once.py&lt;/code&gt;) and guest harness (&lt;code&gt;pipeline_checks.py&lt;/code&gt;) validate structured JSON tool calls against a strict schema, verify &lt;code&gt;ast.parse()&lt;/code&gt; syntax, and overwrite existing file inodes in-place via &lt;code&gt;os.open(..., os.O_WRONLY | os.O_TRUNC | os.O_NOFOLLOW)&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;How We Use Mutation Testing (&lt;code&gt;Mutation Kill Rate&lt;/code&gt;)&lt;/strong&gt;&lt;br&gt;
In experiments where the agent submits both production code and a test suite (&lt;code&gt;test_suite.py&lt;/code&gt; in &lt;code&gt;E06&lt;/code&gt; Blind TDD, &lt;code&gt;E07&lt;/code&gt;, &lt;code&gt;E08&lt;/code&gt;, &lt;code&gt;E10&lt;/code&gt;), passing functional tests isn't enough—we also need to know if the agent wrote weak, self-serving tests.&lt;br&gt;
Our grader (&lt;code&gt;judges.py&lt;/code&gt;) runs the agent's &lt;code&gt;test_suite.py&lt;/code&gt; against &lt;strong&gt;6 deliberate boundary mutants&lt;/strong&gt; of the reference implementation (e.g., changing &lt;code&gt;&amp;gt;= 10000&lt;/code&gt; to &lt;code&gt;&amp;gt; 10000&lt;/code&gt;, removing &lt;code&gt;isinstance(x, bool)&lt;/code&gt; checks, omitting &lt;code&gt;-0&lt;/code&gt; formatting) to measure the exact &lt;strong&gt;Mutation Kill Rate (&lt;code&gt;0/6&lt;/code&gt; to &lt;code&gt;6/6&lt;/code&gt;)&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  4. Core Mechanism 2: Dual Serial Channels (&lt;code&gt;serial0&lt;/code&gt; vs. &lt;code&gt;virtio-serial&lt;/code&gt;) &amp;amp; Budget-Gated Relay
&lt;/h2&gt;

&lt;p&gt;Because the experiment VM has &lt;strong&gt;zero network interfaces&lt;/strong&gt; (verified at boot by asserting that &lt;code&gt;/sys/class/net&lt;/code&gt; contains only &lt;code&gt;lo&lt;/code&gt;), it is a &lt;strong&gt;network-isolated VM whose sole external channel is an inspected host-mediated relay&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We use two distinct serial mechanisms between the Proxmox host and the guest VM for different phases of the lifecycle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;serial0&lt;/code&gt; (&lt;code&gt;/dev/ttyS0&lt;/code&gt; inside guest — emulated 16550 UART):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Role:&lt;/strong&gt; Used &lt;em&gt;exclusively&lt;/em&gt; for one-way boot progress notifications during the initial 25-second offline bootstrap (before &lt;code&gt;qemu-guest-agent&lt;/code&gt; is installed from the CD-ROM). The host controller (&lt;code&gt;driver.py&lt;/code&gt;) monitors &lt;code&gt;/var/run/qemu-server/&amp;lt;vmid&amp;gt;.serial0&lt;/code&gt; until it receives the &lt;code&gt;common_prepared_QGA_acceptance_pending&lt;/code&gt; JSON marker.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;virtio-serial&lt;/code&gt; (&lt;code&gt;org.qemu.guest_agent.0&lt;/code&gt; / &lt;code&gt;.qga&lt;/code&gt; socket — QEMU Guest Agent):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Role:&lt;/strong&gt; Used for all subsequent bidirectional RPC (&lt;code&gt;qm guest exec &amp;lt;vmid&amp;gt;&lt;/code&gt;), including payload installation, polling the agent's &lt;code&gt;Outbox&lt;/code&gt;, delivering LLM responses to the &lt;code&gt;Inbox&lt;/code&gt;, and retrieving the 7 final evidence files.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  End-to-End Execution Lifecycle (60–90 Seconds per Experiment)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Phase &amp;amp; Actor&lt;/th&gt;
&lt;th&gt;Operation&lt;/th&gt;
&lt;th&gt;Typical Duration / Security Gate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Phase 1: ISO Build&lt;/strong&gt;&lt;br&gt;(Mac ➔ Proxmox)&lt;/td&gt;
&lt;td&gt;Packs SHA256-verified &lt;code&gt;.deb&lt;/code&gt; cache and experiment payload into read-only &lt;code&gt;iso9660&lt;/code&gt; image.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;0.8s&lt;/strong&gt; (with warm package cache)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Phase 2: Pre-Flight&lt;/strong&gt;&lt;br&gt;(Mac &amp;amp; Proxmox)&lt;/td&gt;
&lt;td&gt;Mac loads API key from Keychain into memory; Proxmox verifies &lt;code&gt;VM9300&lt;/code&gt; &amp;amp; broker ledger hashes.&lt;/td&gt;
&lt;td&gt;Zero API keys written to disk&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Clone &amp;amp; Offline Boot&lt;/strong&gt;&lt;br&gt;(Proxmox ➔ VM)&lt;/td&gt;
&lt;td&gt;Full-clones &lt;code&gt;VM9300&lt;/code&gt;, attaches 2 CD-ROMs (&lt;code&gt;ide2&lt;/code&gt;, &lt;code&gt;ide3&lt;/code&gt;), verifies &lt;code&gt;0 NICs&lt;/code&gt;, boots VM, installs QGA offline.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;25s&lt;/strong&gt; (notifies host via &lt;code&gt;serial0&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Workspace Setup&lt;/strong&gt;&lt;br&gt;(Proxmox ➔ QGA)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;install.py&lt;/code&gt; verifies payload SHA-256, sets &lt;code&gt;0750&lt;/code&gt; on &lt;code&gt;evaluation/&lt;/code&gt; and &lt;code&gt;0555&lt;/code&gt; on &lt;code&gt;work/&lt;/code&gt;, starts &lt;code&gt;agent.service&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;Enforces UID &amp;amp; &lt;code&gt;systemd&lt;/code&gt; locks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Agent Turn Loop&lt;/strong&gt;&lt;br&gt;(VM ⇔ PVE ⇔ Mac ⇔ LLM)&lt;/td&gt;
&lt;td&gt;Polls &lt;code&gt;Outbox&lt;/code&gt; via QGA ➔ Mac relay checks &lt;code&gt;countTokens&lt;/code&gt; &amp;amp; &lt;code&gt;maxOutputTokens&lt;/code&gt; ➔ calls Gemini API ➔ delivers action via &lt;code&gt;deliver_and_request&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;15–40s&lt;/strong&gt; (1-trip QGA batching)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;6&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Independent Grading&lt;/strong&gt;&lt;br&gt;(Proxmox ➔ QGA ➔ VM)&lt;/td&gt;
&lt;td&gt;After &lt;code&gt;agent.service&lt;/code&gt; stops, copies snapshot to &lt;code&gt;grade/&lt;/code&gt; and runs &lt;code&gt;grade.service&lt;/code&gt; as &lt;code&gt;labjudge&lt;/code&gt;.&lt;/td&gt;
&lt;td&gt;Runs 20 hidden tests + 6 mutants&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;7&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Evidence &amp;amp; Shutdown&lt;/strong&gt;&lt;br&gt;(VM ➔ PVE ➔ Mac)&lt;/td&gt;
&lt;td&gt;Collects 7 JSON artifacts + &lt;code&gt;manifest.json&lt;/code&gt;, verifies SHA-256 on Mac, gracefully shuts down VM (&lt;code&gt;qm shutdown&lt;/code&gt;).&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Tamper-evident&lt;/strong&gt; archive locked&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  External Token Accounting &amp;amp; Pre-Call Budget Enforcement (&lt;code&gt;usage.json&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Because the Mac relay (&lt;code&gt;serve_once.py&lt;/code&gt;) mediates every LLM call outside the VM, the agent cannot tamper with token accounting. Before each &lt;code&gt;generateContent&lt;/code&gt; call, the relay calls &lt;code&gt;countTokens&lt;/code&gt; to verify that &lt;code&gt;cumulative_inputs + prompt_tokens &amp;lt;= MAX_INPUT_TOKENS&lt;/code&gt; and &lt;code&gt;cumulative_outputs + maxOutputTokens &amp;lt;= MAX_OUTPUT_TOKENS&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Upon receiving the response, the relay extracts &lt;code&gt;promptTokenCount&lt;/code&gt;, &lt;code&gt;candidatesTokenCount&lt;/code&gt;, and &lt;strong&gt;&lt;code&gt;thoughtsTokenCount&lt;/code&gt; (reasoning tokens)&lt;/strong&gt; from &lt;code&gt;usageMetadata&lt;/code&gt;, computing &lt;code&gt;billed_out = candidatesTokenCount + thoughtsTokenCount&lt;/code&gt; and recording exact costs in &lt;strong&gt;micro-USD (&lt;code&gt;1e-6 USD&lt;/code&gt;)&lt;/strong&gt; against a hard session cap (e.g., &lt;code&gt;350,000 micro-USD&lt;/code&gt; = &lt;code&gt;$0.35&lt;/code&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Known Limitations &amp;amp; Future Security Roadmap
&lt;/h2&gt;

&lt;p&gt;While this architecture is highly effective for benchmarking structured-action coding agents, evaluating &lt;strong&gt;untrusted, adversarial agents with arbitrary code/shell execution&lt;/strong&gt; requires addressing several remaining security boundaries. We document these limitations openly for anyone building on this design:&lt;/p&gt;

&lt;h3&gt;
  
  
  Limitation 1: [Critical] The Grader (&lt;code&gt;labjudge&lt;/code&gt;) Directly &lt;code&gt;exec&lt;/code&gt;s Agent-Submitted Code in the Same Process
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Current Behavior &amp;amp; Risk:&lt;/strong&gt;
During agent execution (&lt;code&gt;labexp&lt;/code&gt;), &lt;code&gt;InaccessiblePaths&lt;/code&gt; prevents the agent from reading &lt;code&gt;evaluation/judges.py&lt;/code&gt;. However, once the agent finishes, &lt;code&gt;judges.py&lt;/code&gt; runs as &lt;code&gt;labjudge&lt;/code&gt; and calls &lt;code&gt;exec(compile(code_bytes, ...), ns)&lt;/code&gt; on the submitted &lt;code&gt;validator.py&lt;/code&gt; inside the grader process.
If an adversarial agent planted a Trojan payload inside &lt;code&gt;validator.py&lt;/code&gt; that executes upon import/call—such as reading &lt;code&gt;/opt/.../evaluation/judges.py&lt;/code&gt;, inspecting the caller stack frame, or writing a fake passing JSON directly to &lt;code&gt;/var/lib/.../grader-output.json&lt;/code&gt; (which is writable by &lt;code&gt;labjudge&lt;/code&gt; via &lt;code&gt;ReadWritePaths&lt;/code&gt;)—that payload would execute with &lt;code&gt;labjudge&lt;/code&gt; privileges during grading. &lt;em&gt;(In our 41 experiments, all submitted code bundles are archived in &lt;code&gt;mode-a/b-bundle.json&lt;/code&gt; and verified to contain only pure domain logic, but the architectural boundary itself is porous against active malice.)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Planned Remediation (Decoupling Untrusted Runner from Trusted Scorer):&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;Split grading into two separate processes/UIDs: an &lt;strong&gt;Untrusted Test Runner&lt;/strong&gt; (which imports the candidate code with zero access to &lt;code&gt;judges.py&lt;/code&gt; or &lt;code&gt;grader-output.json&lt;/code&gt;) and a &lt;strong&gt;Trusted Scorer&lt;/strong&gt; (&lt;code&gt;root&lt;/code&gt; or a separate UID).&lt;/li&gt;
&lt;li&gt;Pass test input vectors to the Untrusted Runner over a pipe (&lt;code&gt;stdin&lt;/code&gt;/&lt;code&gt;stdout&lt;/code&gt;), compare the returned JSON outputs against expected values in the Trusted Scorer, and have only the Trusted Scorer write &lt;code&gt;grader-output.json&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Limitation 2: Denylist (&lt;code&gt;InaccessiblePaths&lt;/code&gt;) Blind Spots &amp;amp; Mount Visibility
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Current Behavior &amp;amp; Risk:&lt;/strong&gt;
&lt;code&gt;InaccessiblePaths&lt;/code&gt; is a &lt;strong&gt;denylist&lt;/strong&gt; mechanism. If any unredacted copy of the experiment payload remains accessible elsewhere (for example, on the mounted &lt;code&gt;iso9660&lt;/code&gt; CD-ROM path if not unmounted or restricted before agent launch), a shell-capable agent could read grading assets from the mount source.
Additionally, the current unit file can be hardened further:

&lt;ul&gt;
&lt;li&gt;Adding &lt;code&gt;ProtectProc=invisible&lt;/code&gt; to hide &lt;code&gt;/proc&lt;/code&gt; command-line arguments of other processes (such as root's &lt;code&gt;guest_rpc.py&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Adding &lt;code&gt;RestrictAddressFamilies=none&lt;/code&gt; (since &lt;code&gt;PrivateNetwork=yes&lt;/code&gt; blocks TCP/IP and abstract sockets, but filesystem UNIX domain sockets remain reachable unless address families are restricted).&lt;/li&gt;
&lt;li&gt;Adding &lt;code&gt;MemoryMax=&lt;/code&gt;, &lt;code&gt;TasksMax=&lt;/code&gt;, and &lt;code&gt;LimitFSIZE=&lt;/code&gt; to prevent fork bombs or disk-filling DoS writes to &lt;code&gt;outbox/&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Planned Remediation:&lt;/strong&gt;
Transition from a denylist (&lt;code&gt;InaccessiblePaths&lt;/code&gt;) to an &lt;strong&gt;allowlist root filesystem&lt;/strong&gt; (&lt;code&gt;TemporaryFileSystem=/&lt;/code&gt; + minimal &lt;code&gt;BindReadOnlyPaths=&lt;/code&gt;) and audit the unit with &lt;code&gt;systemd-analyze security&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Limitation 3: Tamper-Evident vs. Tamper-Proof Evidence
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The SHA-256 manifest (&lt;code&gt;manifest.json&lt;/code&gt;) makes the 7 evidence files &lt;strong&gt;tamper-evident&lt;/strong&gt; across transit and storage, but it is not cryptographically &lt;strong&gt;tamper-proof&lt;/strong&gt; against a host administrator who recalculates both the file and manifest hashes.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Two Real-World Operational Gotchas We Hit (and How We Fixed Them)
&lt;/h2&gt;

&lt;p&gt;While running 40+ consecutive VM benchmarks, we encountered two non-obvious operational traps worth sharing:&lt;/p&gt;

&lt;h3&gt;
  
  
  Gotcha 1: QGA Timeouts When Passing Non-ASCII Strings Directly to &lt;code&gt;qm guest exec -c&lt;/code&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What We Observed
&lt;/h4&gt;

&lt;p&gt;When invoking &lt;code&gt;/usr/sbin/qm guest exec &amp;lt;vmid&amp;gt; -- /usr/bin/python3 -c &amp;lt;script_source&amp;gt;&lt;/code&gt; from the Proxmox host, early builds of &lt;code&gt;E21&lt;/code&gt; that included Japanese UTF-8 characters inside Python docstrings consistently failed with &lt;code&gt;VM qga command 'guest-exec' failed - got timeout&lt;/code&gt; (exit code 255), leaving &lt;code&gt;guest-ping&lt;/code&gt; unresponsive afterward.&lt;/p&gt;

&lt;h4&gt;
  
  
  Analysis &amp;amp; Best Practice Workaround
&lt;/h4&gt;

&lt;p&gt;While &lt;code&gt;virtio-serial&lt;/code&gt; itself is a byte stream and Proxmox's QGA client prepends &lt;code&gt;guest-sync-delimited&lt;/code&gt; (&lt;code&gt;\xff&lt;/code&gt; delimiter resynchronization), passing large multi-kilobyte scripts containing multi-byte UTF-8 characters directly as command-line arguments to Proxmox's &lt;code&gt;/usr/sbin/qm guest exec&lt;/code&gt; CLI (which is implemented in Perl under the hood) triggered encoding/buffer handling stalls.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Our Fix:&lt;/strong&gt; We enforced a unit-tested &lt;strong&gt;100% Pure ASCII (&lt;code&gt;all(b &amp;lt; 128)&lt;/code&gt;) policy&lt;/strong&gt; on the bootstrap scripts passed via &lt;code&gt;-c&lt;/code&gt; (&lt;code&gt;guest_rpc.py&lt;/code&gt; and &lt;code&gt;install.py&lt;/code&gt;) and passed all experiment payloads as &lt;strong&gt;Base64-encoded JSON (&lt;code&gt;payload_b64&lt;/code&gt;) over &lt;code&gt;stdin&lt;/code&gt;&lt;/strong&gt;. Across 40+ subsequent VM runs, we observed zero QGA timeouts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;General Recommendation:&lt;/strong&gt; Avoid passing raw multi-line script strings to &lt;code&gt;qm guest exec -- python3 -c "..."&lt;/code&gt;. Instead, pass a tiny Base64 decoder one-liner (&lt;code&gt;python3 -c "import base64,sys;exec(base64.b64decode(sys.stdin.read()))"&lt;/code&gt;) or write the file via &lt;code&gt;guest-file-write&lt;/code&gt; first.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Gotcha 2: False-Positive LLM Safety Filter Blocks (&lt;code&gt;PROHIBITED_CONTENT&lt;/code&gt;) During Infra Debugging
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What We Observed
&lt;/h4&gt;

&lt;p&gt;While using an AI coding assistant on our development machine to debug Proxmox socket states and systemd sandbox rules (not inside the benchmarked VMs themselves), the Gemini API occasionally blocked responses with:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;This request was blocked by Gemini's filters. They can occasionally trigger by mistake on safe coding, security, or biology-related queries.&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Analysis &amp;amp; Workaround
&lt;/h4&gt;

&lt;p&gt;This is a known false positive (&lt;code&gt;promptFeedback.blockReason: "PROHIBITED_CONTENT"&lt;/code&gt;) documented on the Google AI Developers Forum that cannot be disabled via standard safety threshold sliders. Because the safety classifier evaluates the full conversation history, accumulating multiple inline snippets referencing raw hypervisor sockets (&lt;code&gt;*.qmp&lt;/code&gt;, &lt;code&gt;*.qga&lt;/code&gt;) and namespace boundary checks (&lt;code&gt;InaccessiblePaths&lt;/code&gt;, &lt;code&gt;runuser&lt;/code&gt;) likely resembled VM-escape or privilege-escalation exploit development.&lt;br&gt;
Switching our debugging workflow to invoke only standard &lt;code&gt;/usr/sbin/qm guest exec&lt;/code&gt; CLI wrappers and pre-committed scripts eliminated these false positives completely (and zero filter blocks ever occurred inside the 41 benchmark runs).&lt;/p&gt;




&lt;h2&gt;
  
  
  7. The 7 Tamper-Evident Artifacts Collected per Run
&lt;/h2&gt;

&lt;p&gt;Every metric reported in our benchmark series (&lt;code&gt;E04&lt;/code&gt;–&lt;code&gt;E44&lt;/code&gt;) is extracted directly from the 7 JSON files collected from the VM and verified against &lt;code&gt;manifest.json&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;run-summary.json&lt;/code&gt;&lt;/strong&gt;: High-level comparison of Mode A vs. Mode B (tests passed, turns, elapsed seconds, tool output chars).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;usage.json&lt;/code&gt;&lt;/strong&gt;: External relay ledger recording &lt;code&gt;promptTokenCount&lt;/code&gt;, &lt;code&gt;candidatesTokenCount&lt;/code&gt;, &lt;code&gt;thoughtsTokenCount&lt;/code&gt;, and &lt;code&gt;estimated_micro_usd&lt;/code&gt; per call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;execution-traces.json&lt;/code&gt;&lt;/strong&gt;: Turn-by-turn log of tool calls, output character counts, and sensor/hook triggers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;independent-tests.json&lt;/code&gt;&lt;/strong&gt;: Individual pass/fail results for all 20 hidden test cases (plus mutation kill audits where applicable).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;mode-a-bundle.json&lt;/code&gt;&lt;/strong&gt;: Full snapshot of the final Python files submitted by the baseline agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;mode-b-bundle.json&lt;/code&gt;&lt;/strong&gt;: Full snapshot of the final Python files submitted by the harnessed agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;actions.json&lt;/code&gt;&lt;/strong&gt;: Normalized JSON action payloads returned by the model on every turn.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  🔗 Explore the Benchmark Results
&lt;/h3&gt;

&lt;p&gt;Ready to see what we discovered when we ran &lt;strong&gt;41 agent harness patterns&lt;/strong&gt; through this sandbox? Check out the master benchmark index and our #1 ranked pattern deep dive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚀 &lt;strong&gt;Master Benchmark Hub:&lt;/strong&gt; &lt;a href="https://tappers.hashnode.dev/ai-agent-harness-patterns-benchmark" rel="noopener noreferrer"&gt;I Benchmarked 41 AI Agent Harness Patterns in Isolated VMs: How to Cut Tokens by 90% Without Losing Accuracy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🥇 &lt;strong&gt;Rank #1 Deep Dive (&lt;code&gt;E20&lt;/code&gt;):&lt;/strong&gt; &lt;a href="https://tappers.hashnode.dev/e20-episodic-gotchas-memory" rel="noopener noreferrer"&gt;Stop Your Coding Agent From Stepping on the Same Rake Twice: Cold-Start Exploration vs. a 5-Item &lt;code&gt;MEMORY.md&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>proxmox</category>
      <category>sandbox</category>
    </item>
    <item>
      <title>I Benchmarked 41 AI Agent Harness Patterns in Isolated VMs: How to Cut Tokens by 90% Without Losing Accuracy</title>
      <dc:creator>tappers</dc:creator>
      <pubDate>Sat, 31 Oct 2026 13:18:44 +0000</pubDate>
      <link>https://dev.to/tappers_/i-benchmarked-41-ai-agent-harness-patterns-in-isolated-vms-how-to-cut-tokens-by-90-without-losing-55f1</link>
      <guid>https://dev.to/tappers_/i-benchmarked-41-ai-agent-harness-patterns-in-isolated-vms-how-to-cut-tokens-by-90-without-losing-55f1</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;Living Benchmark Index (Last Updated: October 31, 2026 | Verified in Isolated Sandbox VMs: 41 Patterns)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Across X/Twitter, Hacker News, and engineering blogs from OpenAI, Anthropic, Google, Martin Fowler (Thoughtworks), and Databricks, dozens of &lt;strong&gt;"Agent Harness Engineering"&lt;/strong&gt; patterns have been proposed to make coding agents (Claude Code, Cursor, Codex, custom agents) faster, cheaper, and more reliable.&lt;/p&gt;

&lt;p&gt;To find out &lt;strong&gt;which patterns actually work—and which ones make things worse&lt;/strong&gt;, we built an isolated Proxmox VM benchmark infrastructure (&lt;strong&gt;AI Labo&lt;/strong&gt;) and ran controlled A/B experiments across &lt;strong&gt;41 harness patterns (&lt;code&gt;E04&lt;/code&gt;–&lt;code&gt;E44&lt;/code&gt;)&lt;/strong&gt; using identical models, identical initial codebases, a hidden 20-case grading suite, and mutation testing.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  0. Introduction: What Is "Harness Engineering"?
&lt;/h2&gt;

&lt;p&gt;Every engineer deploying AI coding agents in production eventually hits the same wall:&lt;br&gt;
&lt;strong&gt;"Why does the exact same frontier model (Claude, GPT, or Gemini) write a flawless patch in one turn today, and tomorrow burn 80,000 tokens editing the wrong files before breaking the test suite?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When we started this benchmark series (&lt;code&gt;E04&lt;/code&gt;–&lt;code&gt;E24&lt;/code&gt;), we weren't setting out to define a new discipline—we were simply testing practical agent workflow ideas from developer communities bottom-up. As the data accumulated, we realized that our findings converged directly on what OpenAI, Anthropic, Google, and Thoughtworks call &lt;strong&gt;"Harness Engineering"&lt;/strong&gt;. We then expanded the suite to cover industry-standard patterns (&lt;code&gt;E25&lt;/code&gt;–&lt;code&gt;E42&lt;/code&gt;) and cross-model / cross-generation scaling laws (&lt;code&gt;E43&lt;/code&gt;–&lt;code&gt;E44&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;At its core, Harness Engineering boils down to a single equation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Agent = Model (Probabilistic Reasoning Core) + Harness (Deterministic Control System)&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;An LLM is a non-deterministic token predictor. Turning it into a reliable engineering system requires wrapping it in a &lt;strong&gt;Harness&lt;/strong&gt; composed of three control layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;🧭 Guides (Feed-Forward Control — Before Writing Code):&lt;/strong&gt; Steering the agent onto the right path &lt;em&gt;before&lt;/em&gt; it generates a patch (e.g., directory-pointer &lt;code&gt;AGENTS.md&lt;/code&gt;, AST call-graph injection, two-phase read-only plan locks, spec-first gates).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🛡️ Sensors (Feedback Control — After Writing Code):&lt;/strong&gt; Deterministically catching errors, regressions, and reward-hacking &lt;em&gt;after&lt;/em&gt; an edit so the agent can self-correct (e.g., AST pre-commit hooks, actionable fix-hint linters, cryptographic test locks, loop-detection circuit breakers).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🧹 Context Hygiene (Attention &amp;amp; Memory Management):&lt;/strong&gt; Ruthlessly stripping noise that dilutes model attention (e.g., CLI test output token killers, failed-attempt rollback pruning, Tree-sitter skeleton context, episodic &lt;code&gt;MEMORY.md&lt;/code&gt; gotchas).&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;🛡️ &lt;strong&gt;Methodology &amp;amp; Anti-Cheating Sandbox Architecture&lt;/strong&gt;&lt;br&gt;
All 41 A/B experiments were executed inside disposable &lt;strong&gt;Debian 13 Proxmox VMs with zero network interfaces (0 NICs)&lt;/strong&gt;, controlled via QEMU Guest Agent (&lt;code&gt;virtio-serial&lt;/code&gt;) and a budget-enforcing Mac relay, with &lt;strong&gt;Linux UID + &lt;code&gt;systemd&lt;/code&gt; (&lt;code&gt;ProtectSystem=strict&lt;/code&gt; / &lt;code&gt;InaccessiblePaths&lt;/code&gt;) isolation&lt;/strong&gt; separating the AI agent (&lt;code&gt;labexp&lt;/code&gt;) from the hidden grading suite (&lt;code&gt;labjudge&lt;/code&gt;).&lt;br&gt;
👉 For a full technical deep dive into our evaluation infrastructure—including actual &lt;code&gt;systemd&lt;/code&gt; unit files and security boundary limitations—read our companion post: &lt;strong&gt;&lt;a href="https://tappers.hashnode.dev/air-gapped-proxmox-systemd-agent-sandbox" rel="noopener noreferrer"&gt;How to Benchmark AI Agents Without Eval Cheating or API Key Leaks: Designing a Proxmox &amp;amp; systemd Sandbox&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. Top 7 High-Impact Patterns (Ranked by Token Reduction &amp;amp; Accuracy)
&lt;/h2&gt;

&lt;p&gt;Among all &lt;strong&gt;41 verified patterns (&lt;code&gt;E04&lt;/code&gt;–&lt;code&gt;E44&lt;/code&gt;)&lt;/strong&gt;, these 7 patterns delivered the most dramatic improvements in &lt;strong&gt;input token reduction&lt;/strong&gt;, &lt;strong&gt;first-turn pass rate (zero rework)&lt;/strong&gt;, and &lt;strong&gt;defect/mutant detection&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rank&lt;/th&gt;
&lt;th&gt;Pattern Name (Experiment ID)&lt;/th&gt;
&lt;th&gt;Input Token Reduction&lt;/th&gt;
&lt;th&gt;API Cost Reduction&lt;/th&gt;
&lt;th&gt;Speedup&lt;/th&gt;
&lt;th&gt;Key Empirical Finding&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🥇 #1&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;&lt;a href="https://tappers.hashnode.dev/e20-episodic-gotchas-memory" rel="noopener noreferrer"&gt;Episodic Gotchas Memory (&lt;code&gt;MEMORY.md&lt;/code&gt;)&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;E20&lt;/code&gt;: Injecting 5 repo-specific gotchas)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;-95.5%&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;46,560&lt;/code&gt; ➔ &lt;code&gt;2,078&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-83.7%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.21x faster&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cold-start exploration hit 2 repo traps and stalled at &lt;code&gt;17/20&lt;/code&gt;; injecting a &lt;strong&gt;442-token &lt;code&gt;MEMORY.md&lt;/code&gt;&lt;/strong&gt; achieved a &lt;strong&gt;1-turn &lt;code&gt;20/20&lt;/code&gt; pass&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🥈 #2&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Tree-sitter Skeleton Context&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;E21&lt;/code&gt;: Signature-only dependency context)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;-94.9%&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;45,270&lt;/code&gt; ➔ &lt;code&gt;2,316&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-82.6%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.34x faster&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Feeding full dependency implementations (78k chars) degraded accuracy to &lt;code&gt;17/20&lt;/code&gt;; passing &lt;strong&gt;only function signatures &amp;amp; type contracts&lt;/strong&gt; hit &lt;code&gt;20/20&lt;/code&gt; in 1 turn.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🥉 #3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;CLI Test Output Token Killer&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;E16&lt;/code&gt;: Structured JSON failure-diff filter)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;-94.1%&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;92,385&lt;/code&gt; ➔ &lt;code&gt;5,445&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-87.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.54x faster&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stripping &lt;code&gt;PASS&lt;/code&gt; lines and ANSI noise from raw &lt;code&gt;pytest&lt;/code&gt; output (&lt;code&gt;117,391&lt;/code&gt; ➔ &lt;code&gt;1,604&lt;/code&gt; chars) enabled a clean 1-shot fix.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Error-Trace Pruning (Failed-Attempt Rollback)&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;E19&lt;/code&gt;: Pruning failed patches &amp;amp; stack traces)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;-93.0%&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;59,944&lt;/code&gt; ➔ &lt;code&gt;4,210&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-80.3%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.57x faster&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Leaving failed code patches in history triggers self-imitation bias; &lt;strong&gt;pruning failed diffs into a 1-line lesson&lt;/strong&gt; improved token efficiency by 14.2x.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Progressive Tool Schema Search&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;E14&lt;/code&gt;: On-demand MCP tool loading)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;-92.7%&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;79,773&lt;/code&gt; ➔ &lt;code&gt;5,844&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-84.8%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.94x faster&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Eliminated the "schema tax" of injecting 32 MCP tool schemas every turn and reduced &lt;strong&gt;decoy tool misfires from &lt;code&gt;2 ➔ 0&lt;/code&gt;&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#6&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Milestone Context Compaction&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;E12&lt;/code&gt;: Save-game JSON state reset)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;-91.9%&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;35,869&lt;/code&gt; ➔ &lt;code&gt;2,922&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-72.2%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.10x faster&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Accumulating full chat history caused spec drift (&lt;code&gt;18/20&lt;/code&gt;); &lt;strong&gt;compacting state to JSON at milestones&lt;/strong&gt; achieved &lt;code&gt;20/20&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#7&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Advisor-Executor Model Routing&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;E18&lt;/code&gt;: Upfront architectural guidance memo)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;-84.9%&lt;/strong&gt;&lt;br&gt;(&lt;code&gt;27,699&lt;/code&gt; ➔ &lt;code&gt;4,172&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-71.5%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.78x faster&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Injecting a cross-module design memo on Turn 1 eliminated &lt;strong&gt;2 unplanned rework retries (&lt;code&gt;2 ➔ 0&lt;/code&gt;)&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  2. Why Does the "Harness" Matter More Than the Prompt?
&lt;/h2&gt;

&lt;p&gt;Across all 41 experiments, five structural anti-patterns consistently caused token explosions and accuracy failures—and five deterministic harness mechanisms solved them:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;❌ Common Agent Anti-Pattern (Token Bloat &amp;amp; Drift)&lt;/th&gt;
&lt;th&gt;✨ Verified Harness Solution (AI Labo)&lt;/th&gt;
&lt;th&gt;Measured Impact&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1. Dumping all tools &amp;amp; full history into a single free loop&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Stage-Gated Directed Graphs (&lt;code&gt;E04&lt;/code&gt;) &amp;amp; Progressive Tool Search (&lt;code&gt;E14&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Input tokens &lt;code&gt;-74%&lt;/code&gt; to &lt;code&gt;-93%&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2. Splitting tightly coupled tasks across role-based subagents&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Subagent Folding + Progressive Skill Disclosure (&lt;code&gt;E05&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.66x faster, zero handoff loss&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3. Letting the same agent write code, write tests, and self-review&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Blind TDD (&lt;code&gt;E06&lt;/code&gt;) / Adversarial Critic (&lt;code&gt;E10&lt;/code&gt;) / Reproduction-First Gate (&lt;code&gt;E22&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Mutant kill rate &lt;code&gt;0%&lt;/code&gt; ➔ &lt;code&gt;100%&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4. Appending raw CLI test logs &amp;amp; failed patches to chat history&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;CLI Token Killer (&lt;code&gt;E16&lt;/code&gt;) / Trace Pruning (&lt;code&gt;E19&lt;/code&gt;) / AST Skeletons (&lt;code&gt;E09&lt;/code&gt;, &lt;code&gt;E21&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Input tokens &lt;code&gt;-93%&lt;/code&gt; to &lt;code&gt;-95%&lt;/code&gt;, 1-shot pass&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;5. Stuffing 20+ negative prohibitions into a monolithic &lt;code&gt;CLAUDE.md&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Deterministic Pre-Commit AST Hooks (&lt;code&gt;E11&lt;/code&gt;) + Positive Few-Shot (&lt;code&gt;E24&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0 architectural rule violations (&lt;code&gt;100%&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Key Insight 1: Stage-Gated Graphs Work, but Role-Based Subagents Backfire (&lt;code&gt;E04&lt;/code&gt; vs. &lt;code&gt;E05&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In &lt;strong&gt;&lt;code&gt;E04&lt;/code&gt; (Loops vs. Graphs)&lt;/strong&gt;, replacing a single free-form loop with a stage-gated &lt;strong&gt;Directed Graph&lt;/strong&gt; (resetting context after each module's deterministic verifier passes) cut input tokens by &lt;strong&gt;-74.4%&lt;/strong&gt; and execution time by &lt;strong&gt;-48.0%&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Conversely, in &lt;strong&gt;&lt;code&gt;E05&lt;/code&gt; (Subagent Folding)&lt;/strong&gt;, splitting the exact same pipeline into &lt;strong&gt;role-based subagents&lt;/strong&gt; (Architect ➔ Implementer ➔ QA) passing natural-language handoff summaries caused a "Telephone Game" effect: subtle formatting invariants (like signed zero &lt;code&gt;-0&lt;/code&gt;) were lost in summarization, triggering rework that made the multi-agent setup &lt;strong&gt;2.66x slower&lt;/strong&gt; and &lt;strong&gt;2.2x more expensive&lt;/strong&gt; than a folded single loop with on-demand skill loading.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Insight 2: Self-Testing and Self-Review Yield a 0% Mutation Kill Rate (&lt;code&gt;E06&lt;/code&gt;, &lt;code&gt;E08&lt;/code&gt;, &lt;code&gt;E10&lt;/code&gt;, &lt;code&gt;E22&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In &lt;strong&gt;&lt;code&gt;E06&lt;/code&gt; (Blind TDD)&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;E10&lt;/code&gt; (Adversarial Critic)&lt;/strong&gt;, when a single agent context wrote both the implementation and the unit tests (or reviewed its own code), the agent unconsciously wrote weak "happy-path" tests tailored to pass its own bugs—resulting in a &lt;strong&gt;&lt;code&gt;0/6 (0%)&lt;/code&gt; mutation kill rate&lt;/strong&gt; against boundary mutants.&lt;/li&gt;
&lt;li&gt;Isolating the test author into a &lt;strong&gt;Blind Tester (&lt;code&gt;E06&lt;/code&gt;)&lt;/strong&gt; that sees only &lt;code&gt;SPEC.md&lt;/code&gt; (never the implementation), enforcing &lt;strong&gt;Spec-First SDD (&lt;code&gt;E08&lt;/code&gt;)&lt;/strong&gt;, using an &lt;strong&gt;Adversarial Critic (&lt;code&gt;E10&lt;/code&gt;)&lt;/strong&gt; rewarded for finding counterexamples, or locking production files until a failing reproduction test is recorded (&lt;strong&gt;Reproduction-First Gate &lt;code&gt;E22&lt;/code&gt;&lt;/strong&gt;) pushed test mutation kill rates and hidden-suite accuracy to &lt;strong&gt;&lt;code&gt;100%&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Insight 3: 90% of Input Tokens Are Wasted on Exploration, Unused Schemas, and Raw Logs (&lt;code&gt;E09&lt;/code&gt;, &lt;code&gt;E14&lt;/code&gt;, &lt;code&gt;E16&lt;/code&gt;, &lt;code&gt;E19&lt;/code&gt;, &lt;code&gt;E21&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Across every experiment, the actual fixed Python code generated by the LLM was only &lt;strong&gt;1,200 to 1,800 output tokens&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Why did baseline agents consume 30,000 to 92,000 input tokens? Because of &lt;strong&gt;blind grep exploration (&lt;code&gt;E09&lt;/code&gt;)&lt;/strong&gt;, &lt;strong&gt;30 unused MCP tool schemas (&lt;code&gt;E14&lt;/code&gt;)&lt;/strong&gt;, &lt;strong&gt;76 passing test lines in raw terminal output (&lt;code&gt;E16&lt;/code&gt;)&lt;/strong&gt;, &lt;strong&gt;failed code diffs left in context (&lt;code&gt;E19&lt;/code&gt;)&lt;/strong&gt;, and &lt;strong&gt;full source bodies of dependency files (&lt;code&gt;E21&lt;/code&gt;)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Filtering these deterministically in the harness cuts API costs by &lt;strong&gt;80%–95%&lt;/strong&gt; while simultaneously preventing Lost-in-the-Middle attention degradation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Insight 4: A Cheap Model + Great Harness Beats an Unharnessed Frontier Model (&lt;code&gt;E43&lt;/code&gt; &amp;amp; &lt;code&gt;E44&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In &lt;strong&gt;&lt;code&gt;E43&lt;/code&gt; (Cross-Model Giant Killing)&lt;/strong&gt;, we pitted an unharnessed frontier model (&lt;strong&gt;&lt;code&gt;gemini-4-argon&lt;/code&gt;&lt;/strong&gt;) in a raw loop against a model costing 1/8th as much (&lt;strong&gt;&lt;code&gt;gemini-3.1-flash-lite&lt;/code&gt;&lt;/strong&gt;) equipped with our combined golden harness (&lt;code&gt;E09&lt;/code&gt; AST Map + &lt;code&gt;E20&lt;/code&gt; &lt;code&gt;MEMORY.md&lt;/code&gt; + &lt;code&gt;E21&lt;/code&gt; Skeleton + &lt;code&gt;E11&lt;/code&gt; Hook + &lt;code&gt;E16&lt;/code&gt; Token Killer + &lt;code&gt;E39&lt;/code&gt; Remediation Sensor).&lt;/li&gt;
&lt;li&gt;The harnessed lightweight model achieved &lt;strong&gt;&lt;code&gt;20/20&lt;/code&gt; (100%) in 1 turn (&lt;code&gt;5.6s&lt;/code&gt;, &lt;code&gt;$0.0029&lt;/code&gt;)&lt;/strong&gt;, beating the unharnessed frontier model (&lt;strong&gt;&lt;code&gt;15/20&lt;/code&gt; in 3 turns, &lt;code&gt;39.1s&lt;/code&gt;, &lt;code&gt;$0.1538&lt;/code&gt;&lt;/strong&gt;)—delivering &lt;strong&gt;better accuracy at 6.95x the speed and -98.1% lower cost&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;&lt;code&gt;E44&lt;/code&gt; (Model Evolution vs. Harness Boundary)&lt;/strong&gt;, testing across four model generations (&lt;code&gt;2.5-flash&lt;/code&gt; ➔ &lt;code&gt;3.5-flash&lt;/code&gt; ➔ &lt;code&gt;3.8-flash&lt;/code&gt; ➔ &lt;code&gt;4-argon&lt;/code&gt;) revealed that while &lt;strong&gt;syntax-assist harnesses&lt;/strong&gt; (like diff format helpers) gradually become less critical as models improve, &lt;strong&gt;repository-knowledge &amp;amp; physical guardrail harnesses&lt;/strong&gt; (&lt;code&gt;MEMORY.md&lt;/code&gt;, output filters, circuit breakers, cryptographic test locks) remain indispensable even for the latest frontier models.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Master Benchmark Table: All 41 Patterns (&lt;code&gt;E04&lt;/code&gt;–&lt;code&gt;E44&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;(Note: Each experiment represents a controlled &lt;code&gt;n=1&lt;/code&gt; A/B case study on a 3-module domain pipeline evaluated against 20 hidden test cases. Detailed deep-dive posts are linked as they are published.)&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;Harness Pattern&lt;/th&gt;
&lt;th&gt;Baseline (Mode A)&lt;/th&gt;
&lt;th&gt;Harnessed (Mode B)&lt;/th&gt;
&lt;th&gt;Empirical A/B Result (Hidden 20-Case Suite)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🕸️ E04&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Loops vs. Graphs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Single free-form ReAct loop with all tools and full history&lt;/td&gt;
&lt;td&gt;Stage-gated Directed Graph with per-stage deterministic verifiers and context resets&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; | Calls: &lt;code&gt;7 ➔ 3&lt;/code&gt; (-57.1%) \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🪆 E05&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Subagent Folding&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Role-based subagents (Architect/Coder/QA) passing handoff summaries&lt;/td&gt;
&lt;td&gt;Single folded loop with on-demand Progressive Skill Disclosure&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass, Folded wins&lt;/strong&gt; | Calls: &lt;code&gt;5 ➔ 2&lt;/code&gt; (-60.0%) \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🧪 E06&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Blind TDD Worktrees&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Single agent writing both tests and implementation in one context&lt;/td&gt;
&lt;td&gt;Agent 1 (Blind Tester) writes tests from spec only; Agent 2 implements in separate worktree&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;19/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;⚙️ E07&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Code-Mode Dynamic Workflows&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Iterating multi-module audits inside a single chat history&lt;/td&gt;
&lt;td&gt;Agent writes a deterministic orchestrator script invoking fresh worker contexts&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;18/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;📐 E08&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Spec-First SDD&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vibe coding directly from a high-level prompt with iterative fixes&lt;/td&gt;
&lt;td&gt;Locking a strict contract (&lt;code&gt;SPEC.md&lt;/code&gt;) and change plan before unlocking code edits&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;19/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt; (0 rework)&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🗺️ E09&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;AST Dependency Map vs. Raw Grep&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Giving the agent &lt;code&gt;grep&lt;/code&gt; and file-read tools to explore on its own&lt;/td&gt;
&lt;td&gt;Pre-injecting a 0-token deterministic AST symbol &amp;amp; call-graph mini-map&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;⚔️ E10&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Adversarial Critic (Maker-Checker)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Asking the implementing agent to self-review before submitting&lt;/td&gt;
&lt;td&gt;Separate Adversarial Critic agent rewarded for writing falsifying counterexample tests&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 impl&lt;/strong&gt; | &lt;strong&gt;Test Mutant Kill Rate: Self-Review &lt;code&gt;0/6 (0%)&lt;/code&gt; ➔ Adversarial Critic &lt;code&gt;6/6 (100%)&lt;/code&gt;&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🛡️ E11&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Architecture Guardrail Hooks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Listing coding rules &amp;amp; line limits in a long system prompt&lt;/td&gt;
&lt;td&gt;Enforcing AST architecture rules &amp;amp; line limits via a deterministic Pre-Commit Hook&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 functional&lt;/strong&gt; | &lt;strong&gt;Arch Rule Compliance: Prompt-only &lt;code&gt;4/5&lt;/code&gt; (violated line cap) ➔ AST Hook &lt;code&gt;5/5 (100%)&lt;/code&gt;&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🗜️ E12&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Milestone Context Compaction&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Accumulating all file reads and logs across multi-step tasks&lt;/td&gt;
&lt;td&gt;Resetting chat history at milestones into a compact JSON state object&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;18/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🏆 E13&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Parallel Best-of-N Tournament&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Retrying sequential fixes inside a single stuck session&lt;/td&gt;
&lt;td&gt;Running 2 parallel lightweight branches + deterministic benchmark judge selection&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; | Judge selected &lt;code&gt;O(n)&lt;/code&gt; &lt;code&gt;0.96ms&lt;/code&gt; branch over &lt;code&gt;202.95ms&lt;/code&gt; &lt;code&gt;O(n²)&lt;/code&gt; branch \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🔍 E14&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Progressive Tool Schema Search&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Injecting all 32 MCP tool JSON schemas on every turn&lt;/td&gt;
&lt;td&gt;Providing a lightweight &lt;code&gt;search_tools&lt;/code&gt; meta-tool to load schemas on demand&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;✂️ E15&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Search-Replace Blocks vs. Unified Diff&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Outputting standard Unified Diffs (&lt;code&gt;@@ -l,s +l,s @@&lt;/code&gt;) or full rewrites&lt;/td&gt;
&lt;td&gt;Outputting line-number-free &lt;code&gt;SEARCH/REPLACE&lt;/code&gt; anchor blocks&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🧹 E16&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;CLI Test Output Token Killer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Returning raw &lt;code&gt;pytest&lt;/code&gt; stdout (76 PASS lines + ANSI + deep traces)&lt;/td&gt;
&lt;td&gt;Wrapper strips passing tests and returns only compact JSON failure diffs&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;💡 E17&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Actionable Fix-Suggestion Linter&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Returning bare compiler/linter error codes (&lt;code&gt;E402 Invalid state&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Injecting a concrete 1-line &lt;code&gt;💡 Fix Hint&lt;/code&gt; code recipe directly into the linter error&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🧭 E18&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Advisor-Executor Model Routing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Running a single worker prompt across all planning and editing turns&lt;/td&gt;
&lt;td&gt;Injecting a concise architectural memo from an Advisor on Turn 1 before Executor edits&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; | Rework retries: &lt;code&gt;2 ➔ 0&lt;/code&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🌿 E19&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Error-Trace Pruning (Failed Rollback)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Keeping failed code patches and long error traces in chat history&lt;/td&gt;
&lt;td&gt;Pruning failed patches on test failure and leaving only a 1-line negative lesson&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; | Input tokens: &lt;code&gt;59,944 ➔ 4,210&lt;/code&gt; (&lt;strong&gt;-93.0%&lt;/strong&gt;, 14.2x efficiency) | Time: &lt;strong&gt;-36.3%&lt;/strong&gt; | Cost: &lt;strong&gt;-80.3%&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🧠 E20&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;a href="https://tappers.hashnode.dev/e20-episodic-gotchas-memory" rel="noopener noreferrer"&gt;Episodic Gotchas Memory (&lt;code&gt;MEMORY.md&lt;/code&gt;)&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Starting every task cold and rediscovering repo traps via test failures&lt;/td&gt;
&lt;td&gt;Injecting a 5-item (&lt;code&gt;+442&lt;/code&gt; token) &lt;code&gt;MEMORY.md&lt;/code&gt; of repo gotchas distilled from prior runs&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;17/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🦴 E21&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Tree-sitter Skeleton Context&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Loading full implementation bodies of peripheral dependency files&lt;/td&gt;
&lt;td&gt;Folding dependency bodies into function signatures, types, and docstrings only&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;17/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🚦 E22&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Reproduction-First Gate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Letting the agent immediately patch production code upon reading an issue&lt;/td&gt;
&lt;td&gt;Locking production files until a minimal bug-reproducing test fails (Red) first&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;17/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;📦 E23&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Atomic Multi-File Batch Edit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Editing one file at a time and running tests in broken intermediate states&lt;/td&gt;
&lt;td&gt;Applying coupled multi-file patch sets atomically in a single turn before testing&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;17/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;✨ E24&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Positive Few-Shot vs. Negative Rules&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Listing 20+ negative prohibitions ("NEVER do X") in the system prompt&lt;/td&gt;
&lt;td&gt;Replacing negative rules with a single 20-line affirmative Golden Code Example&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;16/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;⚡ E25&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Prefix-Stable Prompt Caching&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mutating timestamps and task tables at the top of the system prompt&lt;/td&gt;
&lt;td&gt;Freezing an append-only prefix and appending state diffs only at the tail&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;17/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🔒 E26&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Two-Phase Read-Only Plan Lock&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Allowing interleaved Read and Write tool calls from Turn 1&lt;/td&gt;
&lt;td&gt;Physically locking Write tools during Phase 1 exploration until plan approval&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;17/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🗂️ E27&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Structured Hypothesis Table&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Debugging complex multi-bug failures via unstructured monologue&lt;/td&gt;
&lt;td&gt;Requiring a structured &lt;code&gt;THINK.md&lt;/code&gt; Hypothesis Elimination Matrix before editing&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;19/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🔌 E28&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Loop-Detection Circuit Breaker&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Allowing unguarded retry loops on repeated test failures&lt;/td&gt;
&lt;td&gt;Detecting oscillating edits (&lt;code&gt;A➔B➔A&lt;/code&gt;), rolling back, and forcing a strategy shift&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🎯 E29&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Root-Cause Error Clustering&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Dumping 50 cascading downstream type/runtime errors raw&lt;/td&gt;
&lt;td&gt;Clustering cascading errors via dependency graph into 1 root-cause signature error&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; | Calls: &lt;code&gt;3 ➔ 1&lt;/code&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;⏩ E30&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Dependency-Scoped Incremental Tests&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Running the entire repository test suite after every single file edit&lt;/td&gt;
&lt;td&gt;Running only AST-impacted tests per edit and gating full suite at final submit&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;16/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🌳 E31&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Parameterized AST Codemod Tool&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Manually editing 15+ call sites across files via text replacement&lt;/td&gt;
&lt;td&gt;Providing a deterministic AST transformation primitive (&lt;code&gt;ast_transform_calls&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🔍 E32&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Pre-Submit Blast-Radius &amp;amp; Diff Audit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Accepting &lt;code&gt;SUBMIT&lt;/code&gt; immediately once functional tests pass&lt;/td&gt;
&lt;td&gt;Auditing &lt;code&gt;git diff&lt;/code&gt; for debug leftovers, out-of-scope symbol edits, and entropy&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;16/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🎲 E33&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Property-Based Fuzzing Sensor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Validating patches against fixed hand-written example unit tests only&lt;/td&gt;
&lt;td&gt;Running an invariant property fuzzer that feeds minimal falsifying counterexamples&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; | Calls: &lt;code&gt;3 ➔ 1&lt;/code&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;📸 E34&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Runtime Variable-Snapshot Injection&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Returning standard stack traces (file, line number, exception message)&lt;/td&gt;
&lt;td&gt;Injecting live &lt;code&gt;locals()&lt;/code&gt; variable snapshots at the failing frame into the trace&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;16/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;📖 E35&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Directory-Pointer &lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stuffing a 500-line monolithic encyclopedia &lt;code&gt;AGENTS.md&lt;/code&gt; into initial context&lt;/td&gt;
&lt;td&gt;Using a 30-line pointer &lt;code&gt;AGENTS.md&lt;/code&gt; that routes the agent to scoped docs on demand&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;19/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🤝 E36&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Shift-Handover Harness&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Passing unstructured chat summary text across multi-session resets&lt;/td&gt;
&lt;td&gt;Enforcing a 3-artifact mechanical handover (&lt;code&gt;feature_list.json&lt;/code&gt;, &lt;code&gt;init.sh&lt;/code&gt;, &lt;code&gt;progress.txt&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;19/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🪜 E37&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Hypothesis-Pivot Ladder&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Allowing blind micro-retries when the exact same error repeats&lt;/td&gt;
&lt;td&gt;Locking current approach on repeated error signature, restoring via git, forcing 3 new hypotheses&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;19/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🔐 E38&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Cryptographic Test-Tampering Lock&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Asking the agent via prompt not to modify or weaken existing tests&lt;/td&gt;
&lt;td&gt;Enforcing SHA-256 hash locks on test files to physically reject test tampering&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;19/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🧭 E39&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Guides &amp;amp; Sensors Remediation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Returning standard linter/compiler errors on architectural layer violations&lt;/td&gt;
&lt;td&gt;Pairing upfront boundary maps (Guides) with DI remediation code recipes on violation (Sensors)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;19/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🐾 E40&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Behavioral Action-Sequence Gate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Judging only end-to-end test outcomes regardless of investigation steps&lt;/td&gt;
&lt;td&gt;Blocking symbol edits unless &lt;code&gt;find_references&lt;/code&gt; / &lt;code&gt;grep&lt;/code&gt; was executed on that symbol first&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🪶 E41&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Zero-Tax Minimal Primitives (Pi-Style)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Heavy wrapper with 15+ custom tool schemas and verbose instructions&lt;/td&gt;
&lt;td&gt;Stripping tools down to 2 minimal primitives (&lt;code&gt;bash&lt;/code&gt; and &lt;code&gt;file_edit&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;19/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🧹 E42&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Post-Green Entropy Sweep Pass&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stopping immediately as soon as functional tests turn green&lt;/td&gt;
&lt;td&gt;Triggering an automated 1-turn cleanup pass (deduping helpers, naming alignment) after green&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: &lt;code&gt;19/20&lt;/code&gt; ➔ &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;⚔️ E43&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Cross-Model Giant Killing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Unharnessed frontier model (&lt;code&gt;gemini-4-argon&lt;/code&gt;) in a raw loop&lt;/td&gt;
&lt;td&gt;1/8th-cost &lt;code&gt;gemini-3.1-flash-lite&lt;/code&gt; equipped with combined Golden Harnesses (&lt;code&gt;E09+E11+E16+E20+E21+E39&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Accuracy: Frontier Raw &lt;code&gt;15/20&lt;/code&gt; vs. Flash-Lite Harnessed &lt;code&gt;20/20&lt;/code&gt;&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;🧬 E44&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Model Evolution vs. Harness Boundary&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Syntax-only harnesses across model generations (&lt;code&gt;2.5&lt;/code&gt; ➔ &lt;code&gt;3.5&lt;/code&gt; ➔ &lt;code&gt;3.8&lt;/code&gt; ➔ &lt;code&gt;4-Argon&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Repo-knowledge &amp;amp; physical guardrail harnesses (&lt;code&gt;E16+E20+E28+E35+E38&lt;/code&gt;) across generations&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Both 20/20 Pass&lt;/strong&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  4. A 5-Point Checklist You Can Apply to Your Agent Harness Tomorrow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never return raw CLI test or linter stdout to the LLM (&lt;code&gt;E16&lt;/code&gt; / &lt;code&gt;E17&lt;/code&gt;)&lt;/strong&gt;
Wrap your test runner to strip passing tests and ANSI codes. Return only a structured JSON of failed assertions plus a 1-line &lt;code&gt;💡 Fix Hint&lt;/code&gt; showing the expected helper or pattern.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replace negative prompt prohibitions with Pre-Commit Hooks and 1 Golden Example (&lt;code&gt;E11&lt;/code&gt; / &lt;code&gt;E24&lt;/code&gt;)&lt;/strong&gt;
Listing 20 "DO NOT do X" rules in &lt;code&gt;CLAUDE.md&lt;/code&gt; triggers the Pink Elephant effect. Show one 20-line affirmative code example and enforce constraints mechanically via AST save/commit hooks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintain a 5-to-15 line &lt;code&gt;MEMORY.md&lt;/code&gt; of repository-specific gotchas (&lt;code&gt;E20&lt;/code&gt; / &lt;code&gt;E35&lt;/code&gt;)&lt;/strong&gt;
Instead of a 500-line encyclopedia, keep &lt;code&gt;AGENTS.md&lt;/code&gt; as a 30-line directory pointer and maintain a tiny &lt;code&gt;MEMORY.md&lt;/code&gt; listing only non-obvious domain invariants that previously caused test failures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use line-number-free &lt;code&gt;SEARCH/REPLACE&lt;/code&gt; blocks + Atomic Multi-File Batches (&lt;code&gt;E15&lt;/code&gt; / &lt;code&gt;E23&lt;/code&gt;)&lt;/strong&gt;
Unified diffs (&lt;code&gt;@@ -l,s +l,s @@&lt;/code&gt;) frequently fail due to LLM line-counting errors. Apply multi-file interface changes atomically in a single turn before running verification tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate the Test Author context from the Implementer context (&lt;code&gt;E06&lt;/code&gt; / &lt;code&gt;E22&lt;/code&gt;)&lt;/strong&gt;
Never trust an agent to grade its own homework in the same context. Lock production files until a reproduction test fails (&lt;code&gt;E22&lt;/code&gt;), or generate tests in a blind worktree that only sees the spec (&lt;code&gt;E06&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  🔗 Explore the Series
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🛡️ &lt;strong&gt;Methodology &amp;amp; Sandbox Architecture:&lt;/strong&gt; &lt;a href="https://tappers.hashnode.dev/air-gapped-proxmox-systemd-agent-sandbox" rel="noopener noreferrer"&gt;How to Benchmark AI Agents Without Eval Cheating or API Key Leaks: Designing a Proxmox &amp;amp; systemd Sandbox&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🥇 &lt;strong&gt;Rank #1 Deep Dive (&lt;code&gt;E20&lt;/code&gt;):&lt;/strong&gt; &lt;a href="https://tappers.hashnode.dev/e20-episodic-gotchas-memory" rel="noopener noreferrer"&gt;Stop Your Coding Agent From Stepping on the Same Rake Twice: Cold-Start Exploration vs. a 5-Item &lt;code&gt;MEMORY.md&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
      <category>harness</category>
    </item>
  </channel>
</rss>
