# MYELIN: Budget Prompting for Persistent Memory Agents: v1.2 → v1.3

From v1.2 (2 Jun) to v1.3 (2 Jun): 11,984 words to 12,198 words, 283 words in new or rewritten paragraphs and 69 taken out, 15 paragraphs changed.

## Change note of v1.3

**Four figures added; future-work wording updated**

This version adds the paper's first four figures: the request lifecycle, the budget pressure levels, the techniques as rings around caching, and the map of how techniques help or hurt each other. Promises about "v1.0" become promises about "a future revision", and a few sentences are tightened.

- Author and date move into the file header.
- The abstract claim changes from "without measurable degradation" to "with no degradation" we have seen.

## Changed paragraphs

Marks: [-removed-] {+added+}.

### MYELIN: Budget Prompting for Persistent Memory Agents

[-# MYELIN: Budget Prompting for Persistent Memory Agents-]

### Top

[-**Authors:** Oscar Serra, Jarvis (TinkerClaw) **Date:** June 2026 (v1.2)-] **Internal codename:** MYELIN **Keywords:** budget prompting, token economics, persistent agents, prompt caching, context management, cost optimization, LLM billing, agent architecture

### MYELIN: Budget Prompting for Persistent Memory Agents

[-----]

### Abstract

This paper presents **Budget Prompting** — a family of 20 techniques that collectively reduce the per-turn cost of persistent memory agents by 3–5× [-without measurable-] {+with no+} degradation in agent intelligence or personality [-coherence.-] {+coherence that we have been able to observe.+} We organize these techniques into five categories: **model routing** (sending cheap work to cheap models), **context economics** (minimizing what enters the context window), **output economics** (minimizing what the model generates), **temporal amortization** (spreading expensive operations across many turns), and **billing arbitrage** (exploiting pricing structure discontinuities).

### Abstract

[-A new section in this revision draws-] {+We also draw+} on the March 2026 Claude Code source exposure — Anthropic shipped a 59.8 MB source map in `@anthropic-ai/claude-code@2.1.88`, exposing ~512,000 lines of [-TypeScript. We examined-] {+TypeScript — examining+} the relevant compaction and budget code directly. The [-leak-] {+exposure+} is [-strong-] external validation: Anthropic's production agent independently arrived at the same three-tier compaction architecture MYELIN proposes, and ships several techniques (cache-pinned micro-compaction, forked-agent cache sharing, diminishing-returns budget tracking) that we had theorized but not confirmed at scale.

### 1.1 Scope and Methodology

Where we have numbers, we give [-them. Where we're estimating,-] {+them; where we estimate,+} we say [-so. Where-] {+so; where+} a technique is designed but unimplemented, we mark [-it clearly.-] {+it.+} The [-goal of this-] paper [-is to document-] {+documents+} the full taxonomy and architecture [-with-] {+against+} production data from a longitudinal single-deployment case study [-(N=1). We report real cost figures where available and clearly mark estimates.-] {+(N=1).+}

### 4.1 The Request Lifecycle

{+![Figure 1. The Budget Prompting request lifecycle. An incoming request is classified for model and thinking budget (A1, A2), assembled with a frozen memory snapshot and search-based injection (B5, B3), pruned and compacted if oversized (B6, B4, B7, B2), checked against the prompt cache (B1) and the token-bucket pacer (D4, D3), run through inference with output controls (C1), and finally writes memory to a staging area with a security scan (B5, F1) before updating pacing accounting.](images/fig-pipeline.png)+}

### 4.2 Budget Pressure Cascade

{+![Figure 2. The five-level budget pressure cascade. As 7-day rolling utilisation climbs from GREEN (<50%) to CRITICAL (>95%), the system progressively downshifts model tier, disables extended thinking, and skips lower-priority work. Each level inherits every restriction below it; critical cron jobs run at all levels, background jobs are the first to be dropped.](images/fig-cascade.png)+}

### 4.3 The Caching Stability Core

{+![Figure 3. Techniques arranged as concentric rings around the caching stability core. Ring 0 (B1 + B5) establishes the stable prefix; each outer ring — context management, request routing, output control, temporal smoothing, protection — operates without disturbing the prefix beneath it. Distance from the centre tracks how directly a technique touches the cached prompt.](images/fig-rings.png)+}

### 4.4 Interaction Matrix

{+![Figure 4. The technique interaction map. Solid edges mark synergies (combined effect exceeds the sum of parts), dashed edges mark tensions (one technique undermines another). The densest synergy cluster is the caching core (B1–B5–B6); the principal tensions all trace back to prefix stability versus freshness, responsiveness, or quality.](images/fig-composition.png)+}

### 5.3 Proposed Evaluation Protocol

[-For v1.0 of this paper, we plan:-]

### 5.3 Proposed Evaluation Protocol

{+A controlled study, planned for a future revision, will follow this protocol:+}

### 6. Results (Preliminary)

*This section contains preliminary data from production operation. [-Full-] {+Controlled+} benchmarks are planned for [-v1.0.*-] {+a future revision.*+}

### 9.2 Rigorous Evaluation

[-The v1.0 paper-] {+A future revision+} will [-include:-] {+add:+} - Controlled ablation studies for each technique category - Statistical analysis with confidence intervals - Quality metrics (SyncScore, task completion) with before/after comparison - Cache hit rate instrumentation for precise measurement

### References

*MYELIN [-v1.2-] {+v1.3+} — TinkerClaw Working Papers, J12* *© 2026 Oscar Serra, Jarvis. All rights reserved.*
