Context rot as a systems problem, not a prompt problem
As a session's context window fills, AI quality quietly degrades. Better prompts, pruning, and resets only manage that symptom — so Amplifier attacks it at the systems-architecture level instead.
First, the shipped primitive that makes architecture-level control real.
Its two-parameter context system controls how much parent context a task inherits and which content. context_depth: none hands a task a fresh window — the clean slate used to isolate context.
Architecture-level control exists. So why isn't cleaning one window enough?
The context-simple module compacts messages in place: at a 0.92 token threshold it keeps system messages plus the recent 30%. Useful — but the one window still fills and rots.
Managing one long window is symptom management. The deeper fix isolates context instead.
A documented pattern: agents are context sinks. One sub-agent burns a ~20-file, ~20k-token exploration in its own window and returns only a distilled ~500-token summary — the parent stays clean.
Exploration cost is quarantined off the orchestrator. Next: where the memory lives.
A working session is stateless by doctrine — "zero context from previous sessions." STATE.yaml and CONTEXT-TRANSFER.md let a fresh agent re-orient cold and pick up exactly where the last left off.
Memory is off the fragile window and on disk. So the orchestrator can refuse to rot.
By doctrine it does no heavy work — it never reads source, writes code, runs tests, or debugs; it only delegates and reads/writes state. And it watches its own token pressure, self-spawning a fresh instance rather than degrading.
Structural isolation over discipline. Does it survive real production work?
Safeguard is the flagship dev-machine target. It shipped 215 completed features across 2,324 commits — 233 authored by autonomous agents — each session re-orienting cold from a 260-line STATE.yaml. No window was ever allowed to rot.
Fresh-session-by-design survived hundreds of features. Here's the portable rule.
Don't discipline one long window — isolate context by architecture. Fresh sessions per unit of work, disposable sub-agents as sinks, cold reviewers, and files as memory. Then every session starts sharp by design.
Data as of: April 6, 2026 (safeguard HEAD)
Feature status: Shipped — delegate context control, context-sink pattern, thin-orchestrator self-spawn, stateless sessions + recipes, file-based state, and model routing all verified in live repos.
Repos: microsoft/amplifier-foundation & microsoft/amplifier-module-context-simple (foil); ramparte origins for amplifier-bundle-self-driving, amplifier-bundle-dev-machine, amplifier-bundle-routing-matrix, amplifier-safeguard.
Commands run (every metric re-derived from live output):
cat modules/tool-delegate/README.md; grep -n context_depth .../__init__.py — context_depth none|recent|all, default "recent"grep -n 'Agents are context sinks' context/agents/delegation-instructions.md — 20 file reads = 20k tokens → 500-token summarysed -n '1,60p;230,270p' context/orchestration-doctrine.md — no-heavy-work doctrine; 60% / 80% self-spawn thresholdssed -n '1,20p' templates/working-session-instructions.md — stateless agent, zero context from previous sessionshead -6 STATE.yaml; wc -l STATE.yaml — safeguard phase 10, epoch 4240, F-939; 260 lines, 215 featuresgit log --oneline | wc -l — 2,324 commits; git log --format='%an' | sort | uniq -c — 168 Amplifier Dev Machine + 65 Safeguard Monitor = 233grep 'compact_threshold|protected_recent' .../__init__.py — foil: 0.92 threshold, 0.30 protected recentGaps / corrections: The delegate tool default is "recent" (not "none"); "none" is set explicitly by workers, reviewers, and recipes. Self-spawn thresholds are 60% / 80% (no steady-state 30-40% figure). "233 autonomous-agent commits" replaces any "thousands of sessions" claim (session ≠ commit count).
Primary contributors: Brian Krabach (delegate tool, routing-matrix); Sam Schillace (self-driving 8/8, safeguard 2,091, dev-machine 80); Marc Goodner (dev-machine 76).