"<!DOCTYPE html>\n<html lang=\"zh\" data-theme=\"light\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>fulltext.txt — Vercel Design System</title>\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n<link href=\"https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap\" rel=\"stylesheet\">\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css\">\n<style>\n\n:root {\n  /* Vercel Palette */\n  --geist-foreground: #171717;\n  --geist-background: #ffffff;\n  --geist-secondary: #4d4d4d;\n  --geist-tertiary: #666666;\n  --geist-quaternary: #808080;\n  --geist-border: #ebebeb;\n  --geist-surface-tint: #fafafa;\n  \n  /* Workflow Accents */\n  --develop-blue: #0a72ef;\n  --preview-pink: #de1d8d;\n  --ship-red: #ff5b4f;\n  \n  /* Interactive & Status */\n  --link-blue: #0072f5;\n  --ds-focus-color: hsla(212, 100%, 48%, 1);\n  --badge-blue-bg: #ebf5ff;\n  --badge-blue-text: #0068d6;\n  \n  /* Shadow-as-Border Philosophy */\n  --shadow-border: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;\n  --shadow-border-hover: rgba(0, 0, 0, 0.16) 0px 0px 0px 1px;\n  --shadow-card: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 2px, #fafafa 0px 0px 0px 1px;\n  --shadow-card-hover: rgba(0, 0, 0, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.06) 0px 4px 6px, #fafafa 0px 0px 0px 1px;\n  --shadow-card-full: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 2px 2px, rgba(0, 0, 0, 0.04) 0px 8px 8px -8px, #fafafa 0px 0px 0px 1px;\n  --shadow-ring: rgb(235, 235, 235) 0px 0px 0px 1px;\n  \n  /* Radius Scale */\n  --radius-xs: 2px;\n  --radius-sm: 4px;\n  --radius-md: 6px;\n  --radius-lg: 8px;\n  --radius-xl: 12px;\n  --radius-pill: 9999px;\n}\n\n[data-theme=\"dark\"] {\n  --geist-foreground: #ededed;\n  --geist-background: #000000;\n  --geist-secondary: #a1a1a1;\n  --geist-tertiary: #888888;\n  --geist-quaternary: #666666;\n  --geist-border: #222222;\n  --geist-surface-tint: #0a0a0a;\n  \n  --shadow-border: rgba(255, 255, 255, 0.14) 0px 0px 0px 1px;\n  --shadow-border-hover: rgba(255, 255, 255, 0.28) 0px 0px 0px 1px;\n  --shadow-card: rgba(255, 255, 255, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.4) 0px 2px 4px, #111111 0px 0px 0px 1px;\n  --shadow-card-hover: rgba(255, 255, 255, 0.2) 0px 0px 0px 1px, rgba(0, 0, 0, 0.5) 0px 6px 12px, #111111 0px 0px 0px 1px;\n  --shadow-card-full: rgba(255, 255, 255, 0.12) 0px 0px 0px 1px, rgba(0, 0, 0, 0.5) 0px 8px 16px -4px, #111111 0px 0px 0px 1px;\n  --shadow-ring: rgb(40, 40, 40) 0px 0px 0px 1px;\n  \n  --badge-blue-bg: rgba(10, 114, 239, 0.15);\n  --badge-blue-text: #70b5ff;\n}\n\n* { box-sizing: border-box; }\nhtml { scroll-behavior: smooth; }\nbody {\n  margin: 0;\n  font-family: \"Geist\", Arial, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n  background-color: var(--geist-background);\n  color: var(--geist-foreground);\n  font-feature-settings: \"liga\" 1;\n  -webkit-font-smoothing: antialiased;\n  min-height: 100vh;\n}\n\na {\n  color: inherit;\n  text-decoration: none;\n  transition: color 0.15s ease;\n}\n\n/* 导航栏 (Vercel Clean Sticky Nav) */\n.vercel-nav {\n  position: sticky;\n  top: 0;\n  background-color: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  z-index: 100;\n  padding: 0 24px;\n  height: 64px;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n}\n.nav-brand {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n.vercel-triangle {\n  width: 22px;\n  height: 19px;\n  fill: var(--geist-foreground);\n}\n.nav-title {\n  font-size: 16px;\n  font-weight: 600;\n  letter-spacing: -0.32px;\n  color: var(--geist-foreground);\n}\n.nav-badge-pill {\n  font-family: \"Geist Mono\", ui-monospace, monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  background: var(--badge-blue-bg);\n  color: var(--badge-blue-text);\n  padding: 2px 8px;\n  border-radius: var(--radius-pill);\n}\n\n.nav-links {\n  display: flex;\n  align-items: center;\n  gap: 24px;\n}\n.nav-link {\n  font-size: 14px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  text-decoration: none;\n  transition: color 0.15s;\n}\n.nav-link:hover, .nav-link.active {\n  color: var(--geist-foreground);\n}\n.nav-link.active {\n  font-weight: 600;\n}\n\n.nav-actions {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n\n/* 按钮规范 */\n.btn-primary-dark {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border: none;\n  padding: 8px 16px;\n  border-radius: var(--radius-md);\n  font-size: 14px;\n  font-weight: 500;\n  cursor: pointer;\n  text-decoration: none;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  transition: opacity 0.15s;\n}\n.btn-primary-dark:hover {\n  opacity: 0.9;\n}\n.btn-secondary-white {\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  box-shadow: var(--shadow-border);\n  border: none;\n  padding: 8px 16px;\n  border-radius: var(--radius-md);\n  font-size: 14px;\n  font-weight: 500;\n  cursor: pointer;\n  text-decoration: none;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  transition: background 0.15s, box-shadow 0.15s;\n}\n.btn-secondary-white:hover {\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border-hover);\n}\n.theme-toggle-btn {\n  background: transparent;\n  border: none;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  width: 36px;\n  height: 36px;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: var(--geist-foreground);\n}\n\n/* 核心容器 */\n.vercel-container {\n  max-width: 1200px;\n  margin: 0 auto;\n  padding: 56px 24px 100px;\n}\n\n/* Hero Section (Gallery Emptiness + Negative Letter-spacing) */\n.vercel-hero {\n  text-align: center;\n  max-width: 860px;\n  margin: 0 auto 56px;\n}\n.hero-stage-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  padding: 4px 14px;\n  border-radius: var(--radius-pill);\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  margin-bottom: 24px;\n}\n.stage-dot {\n  width: 7px;\n  height: 7px;\n  border-radius: 50%;\n}\n.vercel-hero h1 {\n  font-size: 48px;\n  font-weight: 600;\n  line-height: 1.05;\n  letter-spacing: -2.4px;\n  color: var(--geist-foreground);\n  margin: 0 0 16px;\n}\n.vercel-hero p {\n  font-size: 20px;\n  font-weight: 400;\n  line-height: 1.80;\n  color: var(--geist-secondary);\n  margin: 0 auto 28px;\n}\n\n/* Workflow Pipeline (Develop -> Preview -> Ship) */\n.workflow-pipeline {\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  gap: 16px;\n  margin-bottom: 48px;\n}\n@media (max-width: 768px) {\n  .workflow-pipeline { grid-template-columns: 1fr; }\n}\n.workflow-step {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px 22px;\n  transition: box-shadow 0.2s;\n}\n.workflow-step:hover {\n  box-shadow: var(--shadow-card-hover);\n}\n.step-mono-label {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  margin-bottom: 8px;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n.step-title {\n  font-size: 20px;\n  font-weight: 600;\n  letter-spacing: -0.96px;\n  color: var(--geist-foreground);\n  margin-bottom: 6px;\n}\n.step-desc {\n  font-size: 14px;\n  color: var(--geist-secondary);\n  line-height: 1.5;\n}\n\n/* Metric Cards (Section 4 Spec) */\n.metric-grid {\n  display: grid;\n  grid-template-columns: repeat(4, 1fr);\n  gap: 16px;\n  margin-bottom: 48px;\n}\n@media (max-width: 900px) {\n  .metric-grid { grid-template-columns: repeat(2, 1fr); }\n}\n.metric-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n}\n.metric-number {\n  font-size: 40px;\n  font-weight: 600;\n  line-height: 1.0;\n  letter-spacing: -2.4px;\n  color: var(--geist-foreground);\n  margin-bottom: 8px;\n  font-feature-settings: \"tnum\" 1;\n}\n.metric-label {\n  font-size: 14px;\n  color: var(--geist-secondary);\n  line-height: 1.4;\n}\n\n/* VAD 专栏 Banner (Ship Red & Vercel Clean) */\n.vad-showcase {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-xl);\n  padding: 32px;\n  margin-bottom: 48px;\n  position: relative;\n}\n.vad-header-row {\n  display: flex;\n  align-items: baseline;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  gap: 12px;\n  margin-bottom: 12px;\n}\n.vad-header-row h2 {\n  font-size: 32px;\n  font-weight: 600;\n  letter-spacing: -1.28px;\n  color: var(--geist-foreground);\n  margin: 0;\n}\n.vad-pillars-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n  gap: 14px;\n  margin-top: 24px;\n}\n.vad-pillar-item {\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  padding: 14px 16px;\n}\n.vad-pillar-title {\n  font-size: 14px;\n  font-weight: 600;\n  color: var(--ship-red);\n  margin-bottom: 4px;\n}\n.vad-pillar-text {\n  font-size: 13px;\n  color: var(--geist-secondary);\n  line-height: 1.5;\n}\n.vad-filter-bar {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  margin: 24px 0 16px;\n  padding: 12px 16px;\n  background: var(--geist-surface-tint);\n  border-radius: var(--radius-md);\n  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);\n}\n.vad-filter-btn {\n  font-family: 'Geist', sans-serif;\n  font-size: 13px;\n  font-weight: 500;\n  padding: 6px 14px;\n  border-radius: 9999px;\n  border: none;\n  background: transparent;\n  color: var(--geist-secondary);\n  cursor: pointer;\n  transition: all 0.15s ease;\n}\n.vad-filter-btn:hover {\n  color: var(--geist-foreground);\n  background: rgba(0,0,0,0.05);\n}\n.vad-filter-btn.active {\n  background: #171717;\n  color: #ffffff;\n}\n.vad-search-input {\n  font-family: 'Geist', sans-serif;\n  font-size: 13px;\n  padding: 7px 12px;\n  border-radius: 6px;\n  border: 1px solid var(--geist-border);\n  background: #ffffff;\n  color: var(--geist-foreground);\n  width: 280px;\n  outline: none;\n  transition: border-color 0.15s, box-shadow 0.15s;\n}\n.vad-search-input:focus {\n  border-color: #0a72ef;\n  box-shadow: 0 0 0 2px rgba(10, 114, 239, 0.2);\n}\n\n/* 控制栏：搜索、视图、筛选 */\n.control-bar {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  margin-bottom: 24px;\n  flex-wrap: wrap;\n}\n.search-input-wrap {\n  position: relative;\n  flex: 1;\n  max-width: 480px;\n}\n.search-input {\n  width: 100%;\n  height: 40px;\n  padding: 0 38px 0 14px;\n  font-family: \"Geist\", sans-serif;\n  font-size: 14px;\n  color: var(--geist-foreground);\n  background: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  border: none;\n  border-radius: var(--radius-md);\n  outline: none;\n  transition: box-shadow 0.15s;\n}\n.search-input:focus {\n  outline: 2px solid var(--ds-focus-color);\n  box-shadow: none;\n}\n.search-kbd {\n  position: absolute;\n  right: 12px;\n  top: 50%;\n  transform: translateY(-50%);\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  color: var(--geist-quaternary);\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  padding: 2px 6px;\n  border-radius: var(--radius-sm);\n}\n\n.view-switcher {\n  display: flex;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  background: var(--geist-background);\n  padding: 2px;\n}\n.view-btn {\n  background: transparent;\n  border: none;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-tertiary);\n  padding: 6px 12px;\n  border-radius: var(--radius-sm);\n  cursor: pointer;\n  transition: color 0.15s, background 0.15s;\n}\n.view-btn.active {\n  background: var(--geist-surface-tint);\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n/* 筛选芯片行 (Filter Pill Strip) */\n.filter-group-strip {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  margin-bottom: 28px;\n  padding: 16px 20px;\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-lg);\n}\n.filter-row {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  flex-wrap: wrap;\n}\n.filter-label-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  color: var(--geist-quaternary);\n  min-width: 68px;\n}\n.pill-badge {\n  background: var(--geist-background);\n  color: var(--geist-secondary);\n  box-shadow: var(--shadow-border);\n  border: none;\n  padding: 3px 12px;\n  border-radius: var(--radius-pill);\n  font-size: 12px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: all 0.15s;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n}\n.pill-badge:hover {\n  color: var(--geist-foreground);\n  box-shadow: var(--shadow-border-hover);\n}\n.pill-badge.active {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  font-weight: 600;\n  box-shadow: none;\n}\n.pill-badge.active-blue {\n  background: var(--develop-blue);\n  color: #ffffff;\n  box-shadow: none;\n}\n.pill-badge.active-red {\n  background: var(--ship-red);\n  color: #ffffff;\n  box-shadow: none;\n}\n\n/* Bento Grid Cards (Section 4 & 6 Spec) */\n.card-grid-bento {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n  gap: 16px;\n}\n.vercel-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  transition: box-shadow 0.2s, transform 0.2s;\n  text-decoration: none;\n  color: inherit;\n  overflow: hidden;\n  min-width: 0;\n  word-break: break-word;\n}\n.vercel-card:hover {\n  box-shadow: var(--shadow-card-hover);\n  transform: translateY(-2px);\n}\n.card-top {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-bottom: 12px;\n  gap: 8px;\n}\n.card-tag-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  font-weight: 500;\n  text-transform: uppercase;\n  color: var(--geist-quaternary);\n  letter-spacing: 0.5px;\n}\n.status-pill-badge {\n  padding: 2px 8px;\n  border-radius: var(--radius-pill);\n  font-size: 11px;\n  font-weight: 500;\n  flex-shrink: 0;\n}\n.pub-accepted { background: #ebfdf2; color: #027a48; }\n.pub-workshop { background: #eff8ff; color: #175cd3; }\n.pub-submitted { background: #fff8e6; color: #b54708; }\n.pub-preprint { background: #f2f4f7; color: #475467; }\n.pub-other { background: #f9f5ff; color: #6941c6; }\n\n[data-theme=\"dark\"] .pub-accepted { background: rgba(2, 122, 72, 0.2); color: #32d583; }\n[data-theme=\"dark\"] .pub-workshop { background: rgba(23, 92, 211, 0.2); color: #84caff; }\n[data-theme=\"dark\"] .pub-submitted { background: rgba(181, 71, 8, 0.2); color: #fec84b; }\n[data-theme=\"dark\"] .pub-preprint { background: rgba(71, 84, 103, 0.2); color: #98a2b3; }\n[data-theme=\"dark\"] .pub-other { background: rgba(105, 65, 198, 0.2); color: #d6bbfb; }\n\n/* 必读标杆徽章 (Vercel Amber Accent) */\n.milestone-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 3px;\n  padding: 2px 7px;\n  border-radius: var(--radius-pill);\n  font-size: 11px;\n  font-weight: 600;\n  white-space: nowrap;\n  flex-shrink: 0;\n  transition: all 0.15s ease;\n}\n.milestone-badge.ms-idea, .milestone-badge:not([class*=\"ms-\"]) {\n  color: #b54708;\n  background: #fff8e6;\n  border: 1px solid rgba(247, 144, 9, 0.35);\n  box-shadow: 0 1px 2px rgba(181, 71, 8, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-idea, [data-theme=\"dark\"] .milestone-badge:not([class*=\"ms-\"]) {\n  color: #fec84b;\n  background: rgba(181, 71, 8, 0.22);\n  border-color: rgba(254, 200, 75, 0.35);\n}\n.milestone-badge.ms-writing {\n  color: #6941c6;\n  background: #f9f5ff;\n  border: 1px solid rgba(105, 65, 198, 0.3);\n  box-shadow: 0 1px 2px rgba(105, 65, 198, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-writing {\n  color: #d6bbfb;\n  background: rgba(105, 65, 198, 0.22);\n  border-color: rgba(214, 187, 251, 0.35);\n}\n.milestone-badge.ms-value {\n  color: #027a48;\n  background: #ebfdf2;\n  border: 1px solid rgba(2, 122, 72, 0.3);\n  box-shadow: 0 1px 2px rgba(2, 122, 72, 0.05);\n}\n[data-theme=\"dark\"] .milestone-badge.ms-value {\n  color: #32d583;\n  background: rgba(2, 122, 72, 0.22);\n  border-color: rgba(50, 213, 131, 0.35);\n}\n\n/* 论文正文图表与插图卡片样式 (Geist Design) */\n.paper-figure, .article-body figure {\n  margin: 32px auto;\n  text-align: center;\n  max-width: 100%;\n}\n.paper-figure img, .article-body img {\n  max-width: 96%;\n  height: auto;\n  border-radius: var(--radius-md);\n  border: 1px solid var(--geist-border);\n  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);\n  background: #ffffff;\n  transition: transform 0.2s ease, box-shadow 0.2s ease;\n  display: block;\n  margin: 0 auto;\n}\n.paper-figure img:hover, .article-body img:hover {\n  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);\n}\n.paper-figure figcaption, .article-body figcaption {\n  font-size: 13px;\n  color: var(--geist-secondary);\n  margin-top: 10px;\n  line-height: 1.6;\n  font-style: italic;\n  max-width: 850px;\n  margin-left: auto;\n  margin-right: auto;\n}\n\n/* VAD 视图切换器 View Switcher */\n.vad-view-switcher {\n  display: inline-flex;\n  padding: 3px;\n  background: var(--geist-secondary-bg);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  margin-bottom: 20px;\n  gap: 2px;\n}\n.view-switch-btn {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  padding: 6px 14px;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-secondary);\n  border-radius: 6px;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.view-switch-btn:hover {\n  color: var(--geist-foreground);\n  background: rgba(0, 0, 0, 0.04);\n}\n[data-theme=\"dark\"] .view-switch-btn:hover {\n  background: rgba(255, 255, 255, 0.06);\n}\n.view-switch-btn.active {\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  font-weight: 600;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n/* 关系图谱 Graph View Styles */\n.graph-container {\n  position: relative;\n  width: 100%;\n  height: 720px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: var(--radius-lg);\n  overflow: hidden;\n  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);\n  margin-bottom: 40px;\n}\n.graph-toolbar {\n  position: absolute;\n  top: 14px;\n  left: 14px;\n  right: 14px;\n  z-index: 10;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  padding: 8px 14px;\n  border-radius: 8px;\n  box-shadow: 0 4px 16px rgba(0,0,0,0.06);\n  flex-wrap: wrap;\n  gap: 8px;\n}\n.graph-tool-title {\n  font-size: 13px;\n  font-weight: 700;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  color: var(--geist-foreground);\n}\n.graph-filter-group {\n  display: flex;\n  gap: 6px;\n  align-items: center;\n  flex-wrap: wrap;\n}\n.graph-chip {\n  font-size: 11px;\n  padding: 3px 8px;\n  border-radius: 4px;\n  border: 1px solid var(--geist-border);\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  cursor: pointer;\n  transition: all 0.15s ease;\n}\n.graph-chip:hover { background: var(--geist-secondary-bg); }\n.graph-chip.active {\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border-color: var(--geist-foreground);\n}\n.graph-search-input {\n  padding: 3px 8px;\n  font-size: 11px;\n  border-radius: 4px;\n  border: 1px solid var(--geist-border);\n  background: var(--geist-background);\n  color: var(--geist-foreground);\n  outline: none;\n  width: 150px;\n}\n#vad-graph-svg {\n  width: 100%;\n  height: 100%;\n  cursor: grab;\n}\n#vad-graph-svg:active { cursor: grabbing; }\n.graph-legend {\n  position: absolute;\n  bottom: 14px;\n  left: 14px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  padding: 10px 14px;\n  font-size: 11px;\n  box-shadow: 0 4px 16px rgba(0,0,0,0.06);\n  z-index: 10;\n  line-height: 1.6;\n  pointer-events: none;\n}\n.graph-legend-row { display: flex; align-items: center; gap: 8px; }\n.graph-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }\n.graph-info-drawer {\n  position: absolute;\n  top: 66px;\n  right: 14px;\n  width: 310px;\n  max-height: 620px;\n  background: var(--geist-background);\n  border: 1px solid var(--geist-border);\n  border-radius: 8px;\n  box-shadow: 0 8px 30px rgba(0,0,0,0.12);\n  z-index: 10;\n  padding: 16px;\n  overflow-y: auto;\n  display: none;\n  backdrop-filter: blur(10px);\n  transition: transform 0.2s ease, opacity 0.2s ease;\n}\n.graph-drawer-close {\n  position: absolute;\n  top: 10px;\n  right: 12px;\n  cursor: pointer;\n  font-size: 16px;\n  color: var(--geist-tertiary);\n}\n.graph-drawer-badge {\n  display: inline-block;\n  padding: 2px 6px;\n  border-radius: 4px;\n  font-size: 10px;\n  font-weight: 600;\n  margin-bottom: 6px;\n}\n.graph-drawer-title {\n  font-size: 13px;\n  font-weight: 700;\n  line-height: 1.4;\n  margin-bottom: 8px;\n  color: var(--geist-foreground);\n}\n.graph-drawer-meta {\n  font-size: 11px;\n  color: var(--geist-secondary);\n  margin-bottom: 12px;\n}\n.graph-drawer-core {\n  font-size: 12px;\n  line-height: 1.6;\n  color: var(--geist-foreground);\n  background: var(--geist-secondary-bg);\n  padding: 8px 10px;\n  border-radius: 6px;\n  margin-bottom: 12px;\n  border: 1px solid var(--geist-border);\n}\n.graph-drawer-link {\n  display: block;\n  text-align: center;\n  padding: 7px 12px;\n  background: var(--geist-foreground);\n  color: var(--geist-background);\n  border-radius: 6px;\n  font-size: 12px;\n  font-weight: 600;\n  text-decoration: none;\n  transition: opacity 0.15s ease;\n  margin-bottom: 6px;\n}\n.graph-drawer-link:hover { opacity: 0.85; }\n.graph-drawer-pdf-link {\n  display: block;\n  text-align: center;\n  padding: 6px 12px;\n  background: var(--geist-secondary-bg);\n  color: var(--geist-foreground);\n  border: 1px solid var(--geist-border);\n  border-radius: 6px;\n  font-size: 11px;\n  font-weight: 500;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.graph-drawer-pdf-link:hover { background: var(--geist-border); }\n.node-circle {\n  cursor: pointer;\n  transition: r 0.2s, stroke-width 0.2s;\n}\n.node-label {\n  font-size: 10px;\n  font-weight: 600;\n  fill: var(--geist-foreground);\n  pointer-events: none;\n  text-shadow: 0 1px 2px var(--geist-background);\n}\n.link-line {\n  stroke: var(--geist-border);\n  stroke-opacity: 0.6;\n  stroke-width: 1.2;\n  transition: stroke 0.2s, stroke-width 0.2s, stroke-opacity 0.2s;\n}\n.link-label {\n  font-size: 9px;\n  fill: var(--geist-tertiary);\n  pointer-events: none;\n  text-anchor: middle;\n}\n\n/* 引用框与警示框 Alerts */\n.callout-alert {\n  margin: 20px 0;\n  padding: 14px 18px;\n  border-radius: var(--radius-md);\n  transition: all 0.15s ease;\n}\n.callout-important, .callout-idea {\n  border-left: 4px solid #b54708;\n  background: rgba(181, 71, 8, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(247, 144, 9, 0.3);\n}\n[data-theme=\"dark\"] .callout-important, [data-theme=\"dark\"] .callout-idea {\n  border-left-color: #fec84b;\n  background: rgba(181, 71, 8, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(254, 200, 75, 0.25);\n}\n.callout-writing {\n  border-left: 4px solid #6941c6;\n  background: rgba(105, 65, 198, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(105, 65, 198, 0.3);\n}\n[data-theme=\"dark\"] .callout-writing {\n  border-left-color: #d6bbfb;\n  background: rgba(105, 65, 198, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(214, 187, 251, 0.25);\n}\n.callout-value {\n  border-left: 4px solid #027a48;\n  background: rgba(2, 122, 72, 0.06);\n  box-shadow: inset 0 0 0 1px rgba(2, 122, 72, 0.3);\n}\n[data-theme=\"dark\"] .callout-value {\n  border-left-color: #32d583;\n  background: rgba(2, 122, 72, 0.18);\n  box-shadow: inset 0 0 0 1px rgba(50, 213, 131, 0.25);\n}\n\n.card-title {\n  font-size: 16.5px;\n  font-weight: 600;\n  line-height: 1.42;\n  letter-spacing: -0.4px;\n  color: var(--geist-foreground);\n  margin: 0 0 10px;\n  word-break: break-word;\n  overflow-wrap: anywhere;\n  hyphens: auto;\n}\n.card-title a {\n  color: var(--geist-foreground);\n  text-decoration: none;\n  display: inline;\n  transition: color 0.15s ease;\n}\n.card-title a:hover {\n  color: var(--develop-blue);\n  text-decoration: none;\n}\n.card-id-mono {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-quaternary);\n  margin-right: 5px;\n}\n.card-meta-row {\n  display: flex;\n  gap: 6px;\n  flex-wrap: wrap;\n  margin-bottom: 12px;\n}\n.meta-token {\n  font-size: 12px;\n  color: var(--geist-tertiary);\n  background: var(--geist-surface-tint);\n  box-shadow: var(--shadow-ring);\n  padding: 2px 7px;\n  border-radius: var(--radius-sm);\n  white-space: nowrap;\n}\n.card-body-text {\n  font-size: 13.5px;\n  color: var(--geist-secondary);\n  line-height: 1.6;\n  margin-bottom: 16px;\n  flex-grow: 1;\n  word-break: break-word;\n  overflow-wrap: anywhere;\n}\n.card-body-text strong {\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n.card-footer {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  border-top: 1px solid var(--geist-border);\n  padding-top: 14px;\n}\n.card-link-action {\n  font-size: 13.5px;\n  font-weight: 500;\n  color: var(--link-blue);\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  text-decoration: none;\n  transition: all 0.15s ease;\n}\n.card-link-action:hover {\n  opacity: 0.85;\n  transform: translateX(2px);\n}\na.meta-token {\n  transition: all 0.15s ease;\n  cursor: pointer;\n  text-decoration: none;\n}\na.meta-token:hover {\n  background: var(--geist-selection);\n  color: var(--geist-foreground);\n  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);\n}\n\n/* 紧凑列表视图 (List View) */\n.card-list-view {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n.list-row-item {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-md);\n  padding: 12px 18px;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  transition: box-shadow 0.15s;\n}\n.list-row-item:hover {\n  box-shadow: var(--shadow-card-hover);\n}\n\n/* 阅读详情页 (Report Detail) */\n.reading-container {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) 260px;\n  gap: 40px;\n  align-items: start;\n}\n@media (max-width: 960px) {\n  .reading-container { grid-template-columns: 1fr; }\n  .reading-sidebar { display: none; }\n}\n\n.report-header-card {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 28px 32px;\n  margin-bottom: 28px;\n}\n.crumb-bar {\n  font-size: 13px;\n  color: var(--geist-tertiary);\n  margin-bottom: 10px;\n}\n.report-title {\n  font-size: 32px;\n  font-weight: 600;\n  letter-spacing: -1.28px;\n  margin: 0 0 16px;\n  color: var(--geist-foreground);\n}\n.report-action-buttons {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  flex-wrap: wrap;\n  border-top: 1px solid var(--geist-border);\n  padding-top: 16px;\n  margin-top: 16px;\n}\n\n.article-body {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-lg);\n  padding: 36px 42px 80px;\n  font-size: 16px;\n  line-height: 1.75;\n  color: var(--geist-foreground);\n}\n.article-body h1, .article-body h2, .article-body h3 {\n  color: var(--geist-foreground);\n  scroll-margin-top: 80px;\n}\n.article-body h1 { font-size: 28px; font-weight: 600; letter-spacing: -1.28px; border-bottom: 1px solid var(--geist-border); padding-bottom: 8px; margin-top: 32px; }\n.article-body h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.96px; border-bottom: 1px solid var(--geist-border); padding-bottom: 6px; margin-top: 36px; }\n.article-body h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.32px; margin-top: 26px; }\n.article-body table {\n  width: 100%;\n  border-collapse: collapse;\n  margin: 24px 0;\n  font-size: 14px;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  overflow: hidden;\n}\n.article-body th, .article-body td {\n  padding: 10px 14px;\n  text-align: left;\n  border-bottom: 1px solid var(--geist-border);\n}\n.article-body th {\n  background: var(--geist-surface-tint);\n  font-weight: 600;\n  color: var(--geist-foreground);\n}\n.article-body blockquote {\n  border-left: 2px solid var(--geist-foreground);\n  margin: 20px 0;\n  padding: 8px 18px;\n  color: var(--geist-secondary);\n  font-style: normal;\n}\n.article-body code {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 13.5px;\n  box-shadow: var(--shadow-ring);\n  background: var(--geist-surface-tint);\n  padding: 2px 6px;\n  border-radius: var(--radius-sm);\n}\n.article-body pre {\n  position: relative;\n  background: #000000;\n  color: #ededed;\n  box-shadow: var(--shadow-border);\n  border-radius: var(--radius-md);\n  padding: 18px;\n  margin: 24px 0;\n  overflow-x: auto;\n}\n.article-body pre code {\n  background: transparent;\n  box-shadow: none;\n  padding: 0;\n  color: inherit;\n  font-size: 13px;\n}\n.copy-code-btn {\n  position: absolute;\n  top: 8px;\n  right: 10px;\n  font-family: \"Geist Mono\", monospace;\n  font-size: 11px;\n  background: #171717;\n  color: #ffffff;\n  border: 1px solid #333333;\n  padding: 3px 8px;\n  border-radius: var(--radius-sm);\n  cursor: pointer;\n}\n\n/* 侧边大纲 (TOC) */\n.reading-sidebar {\n  position: sticky;\n  top: 80px;\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card);\n  border-radius: var(--radius-lg);\n  padding: 20px;\n  max-height: calc(100vh - 100px);\n  overflow-y: auto;\n}\n.sidebar-toc-title {\n  font-family: \"Geist Mono\", monospace;\n  font-size: 12px;\n  font-weight: 500;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  color: var(--geist-quaternary);\n  margin-bottom: 12px;\n}\n.reading-sidebar ul {\n  list-style: none;\n  padding-left: 0;\n  margin: 0;\n  font-size: 13px;\n}\n.reading-sidebar li {\n  margin: 6px 0;\n}\n.reading-sidebar ul ul {\n  padding-left: 14px;\n}\n.reading-sidebar a {\n  color: var(--geist-secondary);\n  text-decoration: none;\n  transition: color 0.15s;\n}\n.reading-sidebar a:hover, .reading-sidebar a.active {\n  color: var(--geist-foreground);\n  font-weight: 600;\n}\n\n/* 后台管理 (/admin) */\n.admin-card-container {\n  background: var(--geist-background);\n  box-shadow: var(--shadow-card-full);\n  border-radius: var(--radius-lg);\n  padding: 32px;\n  margin-bottom: 32px;\n}\n.form-row-2 {\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n  gap: 16px;\n  margin-bottom: 16px;\n}\n@media (max-width: 600px) {\n  .form-row-2 { grid-template-columns: 1fr; }\n}\n.form-field {\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  margin-bottom: 16px;\n}\n.form-field label {\n  font-size: 13px;\n  font-weight: 500;\n  color: var(--geist-foreground);\n}\n.form-field input, .form-field select, .form-field textarea {\n  font-family: \"Geist\", sans-serif;\n  font-size: 14px;\n  padding: 9px 12px;\n  background: var(--geist-background);\n  box-shadow: var(--shadow-border);\n  border: none;\n  border-radius: var(--radius-md);\n  color: var(--geist-foreground);\n  outline: none;\n}\n.form-field input:focus, .form-field select:focus, .form-field textarea:focus {\n  outline: 2px solid var(--ds-focus-color);\n  box-shadow: none;\n}\n\n/* 语法高亮 (Console Blue / Purple / Pink) */\n.codehilite .k, .codehilite .kd, .codehilite .kn { color: #eb367f; font-weight: 500; }\n.codehilite .s, .codehilite .s1, .codehilite .s2 { color: #0070f3; }\n.codehilite .nf, .codehilite .na { color: #7928ca; font-weight: 500; }\n.codehilite .c, .codehilite .c1 { color: #666666; font-style: italic; }\n.codehilite .mi, .codehilite .mf { color: #ff5b4f; }\n\n</style>\n\n</head>\n<body>\n\n    <nav class=\"vercel-nav\">\n      <div class=\"nav-brand\">\n        <a href=\"/\" style=\"display:flex;align-items:center;gap:10px;text-decoration:none\">\n          <svg class=\"vercel-triangle\" viewBox=\"0 0 76 65\" fill=\"none\">\n            <path d=\"M37.5274 0L75.0548 65H0L37.5274 0Z\" fill=\"currentColor\"/>\n          </svg>\n          <span class=\"nav-title\">Agent Harness KB</span>\n        </a>\n        <span class=\"nav-badge-pill\">Geist 2.0</span>\n      </div>\n\n      <div class=\"nav-links\">\n        <a class=\"nav-link \" href=\"/\">全景总览</a>\n        <a class=\"nav-link \" href=\"/vad\" style=\"color:var(--ship-red)\">🎯 VAD 专栏 (144)</a>\n        <a class=\"nav-link\" href=\"https://m0rtzz.github.io/paper-notes/\" target=\"_blank\" rel=\"noopener\">顶会 669 篇 ↗</a>\n        <a class=\"nav-link\" href=\"/download/all\">整库打包</a>\n        \n      </div>\n\n      <div class=\"nav-actions\">\n        \n        <button class=\"theme-toggle-btn\" id=\"theme-toggle-btn\" onclick=\"toggleTheme()\" title=\"切换亮暗主题\">🌙</button>\n      </div>\n    </nav>\n    \n<main class=\"vercel-container\">\n\n        <div class=\"report-header-card\">\n          <div class=\"crumb-bar\"><a href=\"/\">Home</a> / <b>fulltext.txt</b></div>\n          <h1 class=\"report-title\">fulltext.txt</h1>\n          <div class=\"report-action-buttons\">\n            <a class=\"btn-primary-dark\" href=\"?dl=1\">Download Text</a>\n          </div>\n        </div>\n        <article class=\"article-body\"><pre><code>AutoSaddler: Automatic Harness Optimization with\nDurable Updates from Agent Execution Traces\n\narXiv:2608.23041v1 [cs.AI] 24 Aug 2026\n\nSungho Park1∗ Wonjoong Kim2∗ Rongyuan Tan3∗ Jue Zhang4† Wook-Shin Han1†\nPengfei Gao4 Chanyoung Park2 Yongqiang Yao4 Rao Fu4 Elsie Nallipogu4\nQingwei Lin4 Saravan Rajmohan4 Dongmei Zhang4\n1\n\nPOSTECH\n\n2\nKAIST 3 Southern University of Science and Technology 4 Microsoft\njuezhang@microsoft.com wshan@dblab.postech.ac.kr\n\nAbstract\nLLM agents remain unreliable on long-horizon tasks, where small local failures\ncan compound over extended interactions and lead to overall task failure. Although\nexternal harnesses can substantially improve robustness, harness design remains a\nmanual and expensive process that requires searching over a large space of prompts,\ntool configurations, and control logic. We propose AutoSaddler, an automatic\nharness optimization framework that formulates harness improvement as an offline\nlearning problem and iteratively updates the harness using failure signals from minibatches. AutoSaddler combines failure-trace diagnosis, structured patch generation\nthat treats the harness as code, and validation-based update selection. Experiments\non GAIA2, SWE-Bench Pro, and Terminal-Bench 2.0 show that AutoSaddler\nsubstantially improves agent performance over the corresponding base harnesses,\nachieving gains of 9.0, 9.6, and 10.0 percentage points, respectively. Ablation\nstudies further suggest that effective harness optimization benefits from three\ningredients: deep debugging rather than shallow reflection, targeted modifications\nrather than unconstrained editing, and generalization-aware selection rather than\ntrajectory-specific repair. Together, these results suggest that automatic harness\noptimization is a promising path toward more performant and reliable agent systems.\nProject website and code will be available at https://aka.ms/AutoSaddler-website.\n\n1\n\nIntroduction\n\nLarge Language Models (LLMs) have improved rapidly in capability in the past years. Despite this\nprogress, they continue to exhibit “jagged intelligence”: strong performance on some tasks coexists\nwith poor performance on others that appear closely related or even simpler. This unevenness creates\na fundamental reliability challenge for agentic applications, especially in autonomous, multi-step,\nand long-horizon settings, where success depends on sustained competence across many consecutive\ndecisions. In response, an emerging line of work seeks to build external harness layers around LLMs\nto make agent behavior more robust on long-horizon tasks [61, 3, 5, 31, 21]. Empirical evidence\nsuggests that a well-designed harness can substantially improve agent performance [21].\nManual harness tuning, however, is time-consuming and difficult to scale. It requires exploring a large\ndesign space, including prompt specifications, tool configurations, and other system-level choices.\nMoreover, evaluating each candidate harness is costly, since the agent may need to execute many\nsteps before task success or failure becomes clear. Analyzing the resulting long-horizon trajectories\nis itself nontrivial and often requires substantial manual effort. These challenges create a strong need\n∗ Work done during an internship at Microsoft.\n† Corresponding authors.\n\nPreprint.\n\n\f75\n\n70\n65\n60\n55\n50\n\nAutoSaddler\nMeta-Harness\nGEPA\n\n45\n0\n\n500\n\n1000\n\n1500\n\n2000\n\nTotal Tasks Executed\n\nBest Dev Set Accuracy (%)\n\nBest Dev Set Accuracy (%)\n\n75\n\n70\n65\n60\n55\n50\n\nAutoSaddler\nMeta-Harness\nGEPA\n\n45\n\n2500\n\n0\n\n(a) Compute Efficiency\n\n500\n\n1000\n\n1500\n\n2000\n\nTotal Traces Leveraged for Optimization\n\n2500\n\n(b) Learning Efficiency\n\nFigure 1: Comparison of optimization performance and efficiency on GAIA2. (a) AutoSaddler\nreaches 72.3% dev accuracy with ∼1,000 total task executions, whereas GEPA and Meta-Harness\nsaturate at 64.6% and 61.5%, respectively, despite consuming ∼2,800 task executions. (b) When\nmeasured by the number of execution rollouts leveraged for optimization, AutoSaddler achieves its\nbest performance after consuming only 147 traces, ∼10× fewer than Meta-Harness (1,400 traces).\nfor automated harness optimization methods that can efficiently adapt the harness when switching to\na new underlying LLM or deploying the agent in a new domain.\nIn this work, we formulate automatic harness optimization as an offline learning problem and introduce\nAutoSaddler, a framework that iteratively refines the harness using failure signals from batches\nof training tasks. At each iteration, we first construct a candidate harness from the accumulated\nexploration history and evaluate it on the training examples in the current mini-batch. We then\ndiagnose failed agent trajectories and use the resulting insights to guide patch generation, treating\nthe harness itself as code. For each accepted harness update, we further assess generalization on a\nvalidation set. Together, these components enable AutoSaddler to optimize harnesses in a principled\nand scalable manner, while promoting updates that generalize beyond the observed training samples.\nWe evaluate AutoSaddler on three agent benchmarks: GAIA2 [10], SWE-Bench Pro [9], and TerminalBench 2.0 [28]. Across all three benchmarks, AutoSaddler substantially improves long-horizon agent\nperformance. It surpasses the corresponding base harness by 9.0 percentage points on GAIA2,\n9.6 points on SWE-Bench Pro, and 10.0 points on Terminal-Bench 2.0, and exceeds the strongest\nautomated baseline by 7.4, 4.4, and 6.7 points, respectively. Ablations and qualitative analysis further\nsupport the design rationale of AutoSaddler, showing that effective harness optimization depends on\nthree key ingredients. First, in-depth diagnosis is necessary because long-horizon failures require\ndeep debugging rather than shallow reflection on agent execution failures. Second, structured\nintervention is important because the large and diverse harness space favors targeted modifications\nover unconstrained editing. Third, generalization-aware selection is critical because improving\nperformance over a task distribution requires retaining broadly useful updates rather than repairing a\nsingle trajectory.\nOur main contributions are summarized as follows:\n• We formulate automatic harness optimization as an offline learning problem over prompts, tools,\nand middleware, leveraging failure signals from agent execution traces.\n• We introduce AutoSaddler, which combines evidence-grounded diagnosis, structured patching,\nand generalization-aware selection to produce durable harness updates.\n• We conduct extensive experiments on three challenging agent benchmarks, demonstrating the\neffectiveness of the proposed approach in improving long-horizon agent performance.\n\n2\n\nRelated Work\n\nAuto Prompt Optimization. Automatic optimization of LLM-based systems has been extensively\nstudied in the context of prompt optimization, including gradient-free search [62], textual-gradient\nand mini-batch methods [36], history-aware and evolutionary optimization [47, 14, 1], planning2\n\n\fbased search [43], programming abstractions [18], autodiff-style optimization [50], and Bayesian\nmulti-prompt tuning [32]. While AutoSaddler draws on this line of work, harness optimization is\nbroader than prompt optimization: long-horizon traces often require deeper diagnosis than simple\nreflection, and the search space spans prompts, tools, and runtime control logic.\nSelf-Evolving Agents and Experience-Based Improvement. Learning from failure traces is\nrelated to experience-based agent improvement [60] and self-evolving agents [2], where experience\nis used to build libraries [6], create tools [37, 45], and construct memory, skills, or knowledge\nbases [33, 19, 29]. Unlike these typically online continual-learning approaches, we focus on offline\nharness optimization for generalization across environments.\nSome prior work further emphasizes self-referentiality, i.e., whether the meta-agent coincides with\nthe task agent, as in Darwin-Gödel Machines [54, 55], Gödel agents [49], and Huxley-Gödel Machines [42]. In contrast, we do not impose such constraints, as our objective is to improve the task\nagent’s external harness under a finite rollout budget rather than to model self-referential dynamics.\nAgent Systems and Harness Optimization. Automatic optimization of the external layers of\nLLM-based systems builds on a broad line of prior work, including LLM inference hyperparameter\ntuning [41, 11], workflow optimization [56, 64, 44], and system optimization by treating the system\nitself as code [59, 16]. More recently, this line of work has expanded to optimizing the full agent\nharness [22, 25, 34, 40]. One prominent work is Meta-Harness [22], which likewise employs a\ncoding agent to build an end-to-end optimization pipeline. In contrast, we place greater emphasis on\nstructured patching and on a systematic training pipeline that explicitly accounts for generalization.\nRecent contemporaneous studies 3 have further expanded automatic harness optimization through\nobservability-driven evolution [23], diagnosis- and weakness-guided repair [7, 52], Bayesian configuration search [38], historical-experience recalibration [13], self-supervised retrospective optimization [35], generalization-oriented constrained evolution [57], experience-driven test-time adaptation [17], and joint optimization of harnesses and model weights [15, 8]. Collectively, these works\nexplore complementary aspects of harness optimization, while AutoSaddler emphasizes the joint\nroles of in-depth diagnosis, structured intervention, and generalization-aware selection.\nAgent Trace Failure Diagnosis and Repair. Long-horizon agent traces with complex tool interactions have motivated work on failure diagnosis [58, 51, 26, 12, 53]. These methods primarily target\nsingle-trace diagnosis and often assume traces fit within the LLM context window, limiting their\napplicability to very long traces and mini-batch diagnosis. We instead build on the Claude Agent\nSDK (CA-SDK) [4], leveraging its file access and context management capabilities. Recent work\nalso studies trace-level interventions for repairing failed runs [27, 63]. Unlike such task-specific “hot\nfixes”, our goal is to produce persistent harness repairs that improve future behavior.\nLLM-Driven Evolutionary Search. Our candidate selection method uses LLMs to select and\nrecombine patches from prior candidates based on exploration history, aligning with recent LLMaugmented evolutionary algorithms [1, 30, 39, 46, 24]. We instantiate this idea with CA-SDK-based\ncandidate selection, leaving specialized LLM-driven evolutionary algorithms for future work.\n\n3\n\nPreliminaries\n\nAgentic Task and Execution Trace. We consider agentic tasks that require multi-step reasoning,\nrepeated tool use, and environment interaction. Let x ∈ X be a task description sampled from a task\ndistribution T , and assume that task instances in X are stateless and independent.\nConditioned on a harness parameter θ, executing the task agent on a task x induces a stochastic\nexecution process. We write (τ, ŷ) ∼ Pθ (· | x), where τ is the execution trace and ŷ is the final\noutput. Equivalently, the harness Hθ defines the conditional execution distribution Pθ (τ, ŷ | x).\nThis stochasticity captures randomness from LLM sampling, tool-use decisions, and environment\ninteractions.\n3 These works appeared during the final stage of this work preparation or the subsequent peer-review period.\n\n3\n\n\fOptimization Space: Agent Harness. Although the term harness is often used colloquially to\nrefer to everything outside the LLM that contributes to effective agent behavior, its precise scope\nis still evolving in the community [61]. In this work, following harness engineering practices\nin LangChain [21], we focus on three classes of harness parameters and do not consider other\ncomponents, such as memory or skill curation, since our setting assumes tasks are largely stateless\nand independent. Formally, we define the optimization space as:\nθ = (θprompt , θtool , θmiddleware ) ∈ Θ,\n\n(1)\n\nwhere θprompt specifies the instructions and system prompts, θtool defines the available tools and their\ninterfaces, and θmiddleware captures runtime control logic, including hooks and agent-loop behavior.\nObjective: Budget-Constrained Optimization. Our population objective is to maximize expected\ntask performance over the target task distribution. Let µ(ŷ, y ∗ ) be a task-level metric, such as accuracy\nor pass/fail success, that evaluates the final output ŷ against the gold answer y ∗ . Since executing a\nharnessed LLM agent may be stochastic, we define\nJ(θ) = E(x,y∗ )∼T E(τ,ŷ)∼Pθ (·|x) [µ(ŷ, y ∗ )],\n\nθ∗ = arg max J(θ),\nθ∈Θ\n\nwhere θ∗ denotes the optimized harness.\nIn practice, J(θ) is not directly observable and each execution consumes a rollout. Given a rollout\nbudget K, AutoSaddler searches over a set of candidate harnesses VK ⊂ Θ explored within that\nbudget. For a finite dataset D, we use the empirical estimate\n1\nJbD (θ) =\n|D|\n\nR\n\nX\n(xi ,yi∗ )∈D\n\ni\n1 X\nµ(ŷi,r , yi∗ ),\nRi r=1\n\n(τi,r , ŷi,r ) ∼ Pθ (· | xi ),\n\nwhere Ri is the number of repeated executions for task i. AutoSaddler returns the candidate with the\nhighest development-set empirical score among candidates evaluated within the rollout budget:\nθ̂AS = arg max JbDdev (θ).\nθ∈VK,dev\n\nThe final reported test performance is then JbDtest (θ̂AS ).\n\n4\n\nProposed Method: AutoSaddler\n\nWe now present AutoSaddler, an iterative framework for automatic harness optimization of LLM\nagents. We begin with an overview of the workflow and then describe each key component in detail.\nOverview. We formulate harness optimization as an offline learning problem. This formulation\nreflects the practical setting in which agent harnesses are typically tuned during development before\nbeing deployed to production. Since training may involve many tasks and rollout-based evaluation is\nexpensive, we adopt a mini-batch training paradigm, following standard machine learning practice\nand prior work on automatic prompt optimization [36, 1].\nSpecifically, we partition the task set X into training, development, and test splits, denoted by Dtrain ,\nDdev , and Dtest , respectively. As illustrated in Figure 2, each iteration n begins by evaluating the\ncurrent harness Hn , parameterized by θn , on a mini-batch Bn ⊂ Dtrain ( 1 ). The workflow then\nenters the Diagnosis–Patch Session, which analyzes failed execution traces in the mini-batch and\nderives a structured patch ∆θn , producing an updated harness Hn′ = Hn + ∆θn ( 2 ). The patched\nharness is verified on the same mini-batch ( 3 ); we regard the patch as a mini-batch improvement if\nJbBn (Hn′ ) &gt; JbBn (Hn ). When this criterion is satisfied, we further evaluate Hn′ on Ddev to estimate\nwhether the update generalizes beyond the observed mini-batch ( 4 ).\nRegardless of whether the patch is accepted, the Reflection Session compares pre- and post-patch\ntraces; records fixed, regressed, still-failing, and still-passing cases ( 5 ); and stores the resulting\nlessons and scores in EvoDAG, a directed acyclic graph that tracks the evolution history of harness\nupdates ( 6 ). The Evolution Session then uses EvoDAG to propose the next candidate harness Hn+1\n( 7 ). After the rollout budget K is exhausted, AutoSaddler returns the candidate with the highest\n4\n\n\fTask Agent\n(LLM + Harness)\n\nTraining\nSet\n\nDev\nSet\n\nDiagnosis\n– Patch Agent\n\nReflection\nAgent\n\nIf improved\n\nDiagnosis – Patch\n\nVerify\n\nExploration\nPhase\nRefinement\nPhase\n\nPrompt\nTool\nMiddleware\n\nMini Batch\n\n𝑯′𝒏\n\nIf not\n\n𝑯𝒏\n\nLessons from\nReflection\n\nHarness Improved!\n\nDiagnosis – Patch Session\n\nTest\n\nEvolution\nAgent\n\nEvolution Session\n…\n\n𝑯𝒏+𝟏\n…\n𝑯𝟏\n\n𝑯𝟐\n\nEvoDAG 𝑯𝒏−𝟏\n\n𝑯𝒏\n\nExtract\nLessons\n\nTRACES\nBefore/After\nPatch\n\nReflection Session\n\nFigure 2: Overview of AutoSaddler. The iterative optimization loop: the current harness is tested on\na mini-batch, diagnosed and patched across harness components, verified for improvement, and then\nreflected upon to extract lessons into the EvoDAG, which guides the evolution of the next harness.\n\nempirical development-set score among all candidates evaluated on Ddev . The selected harness is\nthen evaluated once on the held-out test set and is not further modified using test feedback.\nThis workflow mirrors standard mini-batch learning, but adapts it to textual harness optimization.\nThe Diagnosis–Patch–Verification steps ( 2 and 3 ) play the role of backpropagation under textual\ngradients: because textual error signals are not automatically checked like numerical gradients,\neach update requires explicit hypothesis generation, harness intervention, and empirical verification.\nEvoDAG and the Evolution Session play an optimizer-like role by accumulating reflection signals to\nperform history-aware harness evolution. We detail this analogy and its discrepancies in Appendix A.\nDiagnosis-Patch Session. During this session, the execution traces from the mini-batch, including\nboth successful and failed runs, are passed to the Diagnosis-Patch Agent for failure diagnosis and\npatch generation. We do not separate diagnosis from patch generation, allowing the agent to fully\nleverage the contextual information gathered during diagnosis when producing patches. Our diagnosis\nprocedure is designed to be principled and evidence-based. In addition to each failure trace, we\nprovide the agent with the harness codebase θn and structured guidance that enables it to progressively\nretrieve relevant trace details, thereby mitigating the long-context challenges posed by long agent\ntrajectories. Based on this evidence, the agent identifies the suspected root cause, considers alternative\nhypotheses, and proposes recommendations for patch generation.\nPatch generation is likewise structured. Specifically, the agent produces a structured patch ∆θn\nthat targets one or more harness components. Rather than allowing unconstrained edits over the full\nharness codebase, we expose only the source files that implement the harness’s functional logic, while\nprohibiting access to code related to evaluation or benchmark data. We further organize the patch\nspace into three categories: Prompt, Tool, and Middleware, each corresponding to a distinct layer of\nthe agent harness. Table 1 enumerates the subtypes of each category and provides their descriptions.\nWe further divide these patch types into two higher-level groups: Capability Patches and Steering\nPatches. Capability Patches modify executable code or orchestration logic, whereas Steering Patches\nconsist of textual edits that leave the underlying code unchanged, including modifications to prompts,\ntool descriptions, and hook reminder texts. Since these two patch groups may affect the harness in\ndifferent ways, we introduce Phased Patch Scheduling, analogous to learning-rate scheduling in\nstandard model training. In this schedule, optimization begins with a Capability Patch phase and then\ntransitions to a Steering Patch phase. Additional details on Phased Patch Scheduling are provided in\nAppendix A, while the diagnosis and patch-generation instructions are described in Appendix P.\n5\n\n\fTable 1: Adopted patch categories, with subtypes labeled as Capability (C) or Steering (S) Patch.\nCategory\n\nSubtype\n\nDescription\n\nPrompt\nPatch\n\nPrompt Rule Addition (S)\nPrompt Rule Modification (S)\n\nAdd or modify behavioral rules in the system prompt.\nRevise existing prompt rules to resolve conflicts or sharpen guidance.\n\nTool\nPatch\n\nNew Tool Addition (C)\nArgument Modification (C)\nImplementation Fix (C)\nTool Description Fix (S)\n\nAdd a new tool when no existing tool supports the required action.\nAdd or fix tool parameters to enhance filtering or selection capabilities.\nFix bugs or extend internal tool functionality to produce correct results.\nModify tool docstrings to avoid tool misuse.\n\nMiddleware\nPatch\n\nPreToolUse Hook (S)\nInfrastructure Change (C)\nAgent Loop Logic Change (C)\n\nInject a just-in-time reminder before a specific tool call.\nModify agent configuration, iteration budget, or environment settings.\nAdd preprocessing steps or budget reminders to the agent loop.\n\nReflection Session. After evaluating the patched harness Hn′ on the same mini-batch, and optionally\non the development set, we enter the Reflection Session to extract lessons from the current harness\nupdate. Specifically, the Reflection Agent is instructed to compare agent performance before and\nafter applying the patch on the mini-batch. The resulting outcomes are grouped into four categories:\n“fixed”, “regressed”, “still-failing”, and “still-passing”. For each category, we provide targeted\nself-reflection questions to elicit insights into why the patch was effective, which failure patterns it\naddressed, why regressions occurred, why the patch was insufficient, or whether the patch had any\neffect at all. The agent may also inspect trace details during reflection. Furthermore, if the patch\ntriggers an extended evaluation on the development set, we additionally prompt reflection on the\ndevelopment-set performance, with particular emphasis on whether and how the patch generalizes\nbeyond the mini-batch. These lessons, together with the patch description, mini-batch results, and\nevaluation metric results µ(Hn′ ), are stored as node-level attributes in the EvoDAG to facilitate\nharness evolution. More details on the reflection instructions can be found in Appendix P.\nEvolution Session. The EvoDAG is a directed acyclic graph G = (V, E) that serves as the\ncumulative memory of the optimization process. Each node vn ∈ V corresponds to a previously\nexplored harness and is annotated with its associated lessons and performance signals. Each directed\nedge e ∈ E represents the diff ∆θ between a parent harness and its descendant.\nDuring the Evolution Session, the Evolution Agent consults the full EvoDAG to synthesize a new\nharness Hn+1 . Rather than continuing solely from Hn′ , the agent can compose elements from any\nsubset of previously explored harnesses, guided by the accumulated lessons stored in the graph. This\nmerge operation is analogous to evolutionary search, enabling the framework to escape local optima\nby recombining successful components across different lineages in the optimization history. The\nresulting harness Hn+1 is then evaluated on a fresh mini-batch in the next iteration. Further details of\nthe evolution instructions are provided in Appendix P.\nDesign Rationale. Overall, AutoSaddler is designed around three requirements for effective automatic harness optimization: in-depth diagnosis, structured intervention, and generalization-aware\nselection. The Diagnosis-Patch Session supports in-depth diagnosis by grounding updates in explicit\nanalysis of long-horizon execution traces and the harness codebase, enabling deep debugging rather\nthan shallow reflection. The patch taxonomy and phased schedule support structured intervention\nby restricting optimization to targeted changes over prompts, tools, and middleware, rather than\nunconstrained editing. The Reflection and Evolution Sessions support generalization-aware selection\nby combining mini-batch verification, optional development-set evaluation, and EvoDAG-based\nmemory, so that retained updates are more likely to generalize beyond a single trajectory. Together,\nthese components turn harness optimization into an iterative process of diagnosing failures, applying\ntargeted updates, and retaining changes that are more likely to generalize.\n\n5\n\nExperiments\n\n5.1\n\nExperimental Setup\n\nBenchmarks and Base Harness Systems. We evaluate AutoSaddler on three diverse benchmarks:\nGAIA2 [10], SWE-Bench Pro (SBP) [9], and Terminal-Bench 2.0 (TB2) [28]. GAIA2 evaluates\n6\n\n\fTable 2: Test-set Pass@1 results on GAIA2, reported as mean ± standard deviation over three runs.\nValues in parentheses indicate the number of tasks; boldface denotes the best result.\nGAIA2 Universe (Pass@1)\n\nHarness (Type)\n\n21 (107)\n\n22 (112)\n\nAvg.\n\n27 (81)\n\nDefault Agent (Manual)\nGEPA (Auto)\nMeta-Harness (Auto)\nAutoSaddler (Auto)\n\n54.8 ± 4.8\n51.5 ± 4.9\n52.7 ± 4.3\n53.0 ± 1.5\n60.1 ± 3.9\n47.9 ± 3.4\n56.4 ± 0.7\n54.6 ± 2.5\n53.0 ± 1.1\n51.5 ± 5.2\n56.0 ± 0.7\n53.2 ± 2.2\n61.4 ± 2.4 60.7 ± 2.4 64.6 ± 3.1 62.0 ± 1.2\n\nw/o In-depth Diagnosis (Auto)\nw/o Structured Intervention (Auto)\nw/o Generalization-Aware Selection (Auto)\n\n56.7 ± 4.2\n58.9 ± 2.5\n53.3 ± 1.9\n\n57.1 ± 3.9\n53.3 ± 7.6\n44.9 ± 6.7\n\n60.1 ± 5.0\n59.3 ± 3.3\n54.7 ± 4.0\n\n57.8 ± 3.8\n56.9 ± 3.8\n50.6 ± 4.0\n\nTable 3: Test-set Pass@1 results on SWE-Bench Pro and Terminal-Bench 2.0, reported as mean ±\nstandard deviation over three runs. Parentheses indicate the number of tasks; bold denotes the best\nresult per column.\nTerminal-Bench 2.0 (Pass@1)\n\nSWE-Bench Pro (Pass@1)\nHarness (Type)\n\nAnsible (96)\n\nFlipt (85)\n\nSWE-agent (Manual) 40.6 ± 1.9\n31.0 ± 3.5\nGEPA (Auto)\n50.0 ± 1.3\n32.2 ± 1.4\nMeta-Harness (Auto) 36.9 ± 2.9\n31.3 ± 1.7\nAutoSaddler (Auto) 58.0 ± 1.8 36.5 ± 1.8\n\nElement-web (56)\n\nAvg.\n\n41.1 ± 1.7\n45.2 ± 0.6\n38.7 ± 0.8\n43.5 ± 1.6\n\n37.3 ± 4.8\n42.5 ± 1.2\n35.3 ± 2.0\n46.9 ± 1.8\n\nHarness (Type)\n\nTest-Split (40)\n\nTerminus 2 (Manual)\nTerminus KIRA (Manual)\nGEPA (Auto)\nMeta-Harness (Auto)\nAutoSaddler (Iter2) (Auto)\nAutoSaddler (Iter34) (Auto)\n\n40.0 ± 0.0\n47.5 ± 2.5\n42.5 ± 2.5\n43.3 ± 5.8\n45.0 ± 0.0\n50.0 ± 0.0\n\ngeneral-purpose assistant capabilities in a simulated smartphone environment spanning 10 distinct\nUniverses, each emulating a persona’s daily digital life. We use the default ReAct-based agent\nprovided by GAIA2 as the base harness. SBP targets enterprise-scale software engineering tasks\ndrawn from popular repositories, for which we use SWE-agent [48] as the base harness. Finally, TB2\ncomprises 89 realistic tasks across domains including system administration, machine learning, and\ncybersecurity; for TB2, we adopt Terminus 2 as the base harness.\n\nImplementation and Baseline Methods. We implement the three agents in AutoSaddler (i.e.,\nthe Diagnosis-Patch Agent, Reflection Agent, and Evolution Agent) using Claude Agent SDK (CASDK) [4]. Detailed agent instructions are provided in Appendix P, and EvoDAG implementation\ndetails are given in Appendix B. We compare AutoSaddler against GEPA [1] and Meta-Harness [22].\nGEPA is a prompt-centric baseline that iteratively optimizes system prompts. By contrast, MetaHarness shifts the optimization target from prompts to the agent harness, using a minimal system\ndesign and adopting CA-SDK for end-to-end system optimization. Since only TB2 was evaluated by\nMeta-Harness, we adapt GEPA to GAIA2 and TB2, and Meta-Harness to GAIA2; adaptation details\nare provided in Appendix B.\n\nExperimental Protocol and Data Splits. Unless otherwise noted, all optimization methods use\nClaude Opus 4.6 as the underlying LLM with default endpoint settings. To evaluate generalization,\nwe ensure that the training, development, and test sets contain tasks from distinct task groups.\nFor example, in SBP, the training set consists of tasks from qutebrowser; the development set\ncontains tasks from Vuls and NodeBB; and the test set comprises tasks from Ansible, Flipt, and\nElement-web. This split enables us to evaluate generalization across repositories. Additional details\non the data splits for all three benchmarks are provided in Appendix B. Unless otherwise noted, for\neach optimization method, we perform a single evolution run on the training and development sets,\nand conduct three repeated runs when evaluating on the test sets.4 We report Pass@1 success rates as\nthe evaluation metric.\n7\n\n\f5.2\n\nMain Results\n\nWe report Pass@1 success rates on the test sets for GAIA2 in Table 2, and for SBP and TB2 in\nTable 3. Two main observations are made. First, AutoSaddler discovers more effective harnesses\nthan the corresponding base harnesses across all three benchmarks. Specifically, AutoSaddler\nimproves over the default agent on GAIA2 by +9.0 pp (53.0% → 62.0%), over SWE-agent on SBP\nby +8.4 pp (37.3% → 46.9%), and over Terminus 2 on TB2 by +10.0 pp (40.0% → 50.0%). Second,\nAutoSaddler outperforms the automated baselines GEPA and Meta-Harness. Compared with the\nstrongest automated baseline on each benchmark, AutoSaddler achieves gains of +7.4 pp on GAIA2\n(54.6% vs. 62.0%), +6.2 pp on SBP (42.5% vs. 46.9%), and +4.4 pp on TB2 (43.3% vs. 50.0%). On\nTB2, AutoSaddler also surpasses the manually expert-tuned harness, Terminus KIRA [20], by +2.5 pp\n(47.5% vs. 50.0%).\nWe further verify robustness to optimization stochasticity and training-distribution shift. An independent AutoSaddler run on GAIA2 achieves 58.6% Pass@1, remaining well above the base harness and\nrerun baselines (Appendix C), while optimization on a different training universe achieves 57.4%, a\n+5.9 pp gain over the base harness (Appendix D).\nBeyond cross-task-group evaluation, we further analyze cross-model transferability. Specifically,\nwe replace the underlying LLM of the GAIA2 task agent, switching from Opus 4.6 to Haiku 4.5,\nwhile retaining the harnesses optimized with Opus 4.6. As shown in Appendix E, AutoSaddler still\nimproves over the base harness by +5.6 pp, suggesting potential transferability across models.\nTo analyze optimization efficiency, we compare the optimization trajectories of AutoSaddler and\nthe automated baselines on GAIA2 in Figure 1; a visualization of the full search trajectory of AutoSaddler is provided in Appendix J. We find that AutoSaddler achieves higher performance with\nsubstantially fewer task-agent rollouts. Specifically, AutoSaddler reaches 72.3% development\naccuracy with only ∼1,000 rollouts, whereas GEPA and Meta-Harness saturate at 64.6% and 61.5%,\nrespectively, despite consuming ∼2,800 task executions (Figure 1a). The contrast is even sharper\nwhen efficiency is measured by the number of rollouts leveraged for learning (Figure 1b): AutoSaddler reaches its best dev-set score after consuming 147 rollouts, ∼10× fewer than Meta-Harness\n(1,400 rollouts). Similar efficiency gains are observed on TB2, as shown in Appendix H. We further\ncharacterize end-to-end optimization cost in Appendix I. Although AutoSaddler incurs moderately\nhigher optimizer-side monetary cost per patch, its selective evaluation strategy reaches 67.7% development accuracy with only 391 task-agent rollouts, already exceeding Meta-Harness’s 61.5% peak\nafter 1,400 rollouts.\n5.3\n\nAblation Studies and Analysis\n\nWe next present ablation studies on GAIA2, focusing on the three key design principles underlying\nAutoSaddler: in-depth diagnosis, structured intervention, and generalization-aware selection.\nRQ1: Does in-depth diagnosis enable superior root-cause identification? We first conduct an\nablation study to assess whether in-depth diagnosis improves root-cause identification and ultimately\ncontributes to overall performance gains. Specifically, we evaluate a “w/o in-depth diagnosis” variant\nthat replaces CA-SDK-based diagnosis with a shallow diagnostic baseline: a single LLM call receives\nthe execution trace and evaluation results, and infers the failure reason, a strategy commonly used in\nautomatic prompt optimization pipelines for failure reflection [36, 1]. The inferred failure reason is\nthen passed back to CA-SDK for patch generation. In contrast, AutoSaddler’s in-depth diagnosis\nactively explores both execution traces and source code to investigate failures.\nAs shown in Table 2, removing in-depth diagnosis substantially degrades test-set performance on\nGAIA2, reducing Pass@1 from 62.0 to 57.8. The benefit of in-depth diagnosis is further supported\nby the detailed file-access and tool-call analysis in Appendix K: compared with the patch-only\nsession, the combined diagnosis–patch session invokes, on average, 6.2 additional tool calls and 5.8\nadditional file accesses per optimization step. We also quantitatively compare the cumulative number\nof accepted patches during training under the two settings, where an accepted patch is defined as one\nthat improves performance on the same mini-batch; see Figure 10 in Appendix K. In-depth diagnosis\nconsistently yields more accepted patches. By the end of Epoch 1 (Iteration 25), the gap is substantial\n4 Because Meta-Harness does not natively support a train–dev split, we provide it with the union of the training and\n\ndevelopment sets to ensure comparable data exposure.\n\n8\n\n\fAutoSaddler\nw/o Struct. Interv.\n\n80\n\n50\n\n91.5\n\nDistribution (%)\n\nDistribution (%)\n\n100\n\n65.8\n\n60\n40\n\n34.2\n\n20\n\n8.5\n\n0\n\nCapability (C)\n\n(a) Capability vs. Steering.\n\nTool Patch\n\nMiddleware Patch\n41\n\n40\n\n32\n\n31\n\n30\n\n22\n\n20\n10\n0\n\nSteering (S)\n\nPrompt Patch\n\n4\n\n8\n\n8\n\n8\n1\n\n16\n\n13\n7\n\n5\n\n12\n\n2\n\nAcceptance Rate (%)\n\n(13 vs. 5), and this advantage is maintained throughout Epoch 2 (Iterations 26–50). Finally, we\nprovide several qualitative case studies in Appendix K that illustrate how shallow diagnosis and\nAutoSaddler’s in-depth diagnosis differ in identifying root causes.\n\nRule Rule New Arg. Impl. Desc. Hook Infra. Loop\nAdd. Mod. Tool Mod. Fix Fix\nChg. Chg.\n\n(b) Patch subtype distribution.\n\n100\n\nPrompt Patch\n\nTool Patch\n\nMiddleware Patch\n\n83\n\n80\n62\n\n60\n\n58\n\n50\n\n67\n\n61\n\n71\n\n55\n\n40\n20\n0\n\n0\nRule Rule New Arg. Impl. Desc. Hook Infra. Loop\nAdd. Mod. Tool Mod. Fix Fix\nChg. Chg.\n\n(c) Acceptance rate by subtype.\n\nFigure 3: Patch type distribution and acceptance: AutoSaddler vs. w/o Structured Intervention.\nWithout structural intervention, patches collapse onto Steering (91.5%), while AutoSaddler produces\na balanced mix spanning Prompt, Tool, and Middleware edits.\nRQ2: How does structured intervention shape patch diversity and effectiveness? To evaluate\nthe effectiveness of structured intervention, we consider an ablated setting, w/o Structured Intervention, in which we remove the proposed patch taxonomy and phased patch scheduling. This\nablation leaves the agent to perform unconstrained edits without explicit search-space boundaries (as\nin Meta-Harness). As shown in Table 2, removing structured patching substantially reduces Pass@1\non the GAIA2 test set, from 62.0% to 56.9%. This result suggests that framing harness optimization\nas a targeted structural search is critical for achieving meaningful performance gains. Fine-grained\nablations in Appendix F further show that removing only Phased Patch Scheduling reduces Pass@1\nfrom 60.7% to 54.8%, while removing the full structured intervention further reduces it to 53.3%.\n\n50\n\nRegression Rate (%)\n\nFix Rate (%)\n\n30\n20\n10\n0\n\nAutoSaddler\nw/o Gen-Aware\n\n50\n\n40\n\n0\n\n10\n\n20\n\n30\n\nIteration\n\n40\n\n(a) Fix Rate (Base-Failed).\n\n40\n30\n20\n10\n0\n\n0\n\n10\n\n20\n\n30\n\nIteration\n\n40\n\n(b) Regression Rate (Base-Passed).\n\nNet Gain (Fixes Regressions)\n\nFurther analysis shows that the performance degradation in the w/o Structured Intervention setting\nstems from biased patch exploration and reduced patch diversity, despite allowing unconstrained\npatch edits. As shown in Figure 3a and Figure 3b, without structured intervention, the system\nbecomes heavily concentrated on Steering patches (91.5%), which largely correspond to straightforward textual edits, while rarely exploring higher-value interventions such as infrastructure or\ntool improvements. The varying effectiveness of different patch types is further supported by the\nacceptance-rate breakdown across patch subtypes in Figure 3c. Capability-centric, non-prompt-layer\npatches, i.e., New Tool (83%), Loop Change (71%), and Infra Change (67%), achieve the highest\nacceptance rates. However, under w/o Structured Intervention, these critical patch types account for\nonly 4% of generated patches; by contrast, AutoSaddler increases their share to over 25% through\nstructured patching. Representative patches from these categories discovered by AutoSaddler during\nevolution are provided in Appendix L. Together, these results indicate that structured intervention\nencourages the agent to move beyond prompt-layer edits and explore capability-level improvements.\nMoreover, Appendix G shows that Capability Patches achieve a comparable fix rate to Steering\nPatches (55% vs. 58%) while inducing substantially fewer regressions (8% vs. 17%), suggesting\nmore durable updates.\n10\n5\n0\n5\n10\n15\n\n0\n\n10\n\n20\n\n30\n\nIteration\n\n40\n\n(c) Dev-Set Net Gain.\n\nFigure 4: Performance comparison on the dev-set across iterations. AutoSaddler maintains a\nlower regression rate while achieving comparable fix rates to the w/o Generalization-Aware Selection\nablation, yielding a consistently positive net gain that the ablation fails to sustain.\n9\n\n\fRQ3: How does generalization-aware selection prevent overfitting? Finally, we conduct an\nablation study to examine how generalization-aware optimization mitigates overfitting to the training\nset and reduces regressions on unseen scenarios. Specifically, the \"w/o Generalization-Aware\nSelection\" ablation removes both the reflection session and dev-set evaluation, forcing optimization\nto rely solely on training-set execution outcomes. As shown in Table 2, removing this component\nsubstantially degrades GAIA2 test-set performance, reducing Pass@1 from 62.0% to 50.6%. This\nis the largest performance drop among all component ablations. Fine-grained ablations in Appendix F\nfurther show that removing dev-set filtering reduces Pass@1 from 60.7% to 50.0%, while additionally\nremoving Reflection with EvoDAG further reduces it to 44.9%.\nTo quantify how this mechanism affects dev-set behavior, Figure 4 tracks both settings on the dev-set\nand decomposes net performance into the fix rate, defined as the success rate on scenarios failed\nby the initial base harness, and the regression rate, defined as the failure rate on scenarios passed\nby the base harness. Notably, both settings achieve similar fix rates (panel a), indicating that the\nperformance gap is not primarily driven by differences in problem-solving capability. Instead, the key\ndivergence lies in the regression rate (panel b). Although both curves fluctuate during optimization,\nAutoSaddler exhibits an overall decreasing regression trend (-0.24 pp/iter), whereas the ablation\nshows an increasing trend (+0.16 pp/iter).\nWe further examine the regression spike observed for the ablation at Iteration 21 (panel b) (8% →\n22%). At Iteration 20, the ablation introduces a new tool, send_progress_message_to_user,\nand modifies the hook for the widely used send_message_to_user tool to forcibly redirect the\nagent to this new tool. Without reflection to assess collateral damage, this overly broad patch is\nretained, disrupting agent behavior across many unrelated development scenarios. Interestingly, the\nsame failure pattern—an overly broad hook on a high-frequency tool that acts beyond its intended\nscope—also appears in AutoSaddler at Iteration 4 (see Figure 12b and the extended discussion in\nAppendix M). However, because of the reflection mechanism in AutoSaddler, such regressioninducing patches are blocked. This direct contrast demonstrates that generalization-aware selection\nhelps sustain performance gains on unseen scenarios by identifying and filtering over-scoped patches.\nLastly, Figure 4c shows the resulting net gain, indicating that AutoSaddler consistently outpaces the\nablation after Iteration 20. This suggests that AutoSaddler can recover from early-iteration regression\nchallenges and achieve steadier improvements in later iterations by abstracting generalizable principles\nfrom specific optimization lessons. Additional discussion of principle generalization and qualitative\ncase studies is provided in Appendix M.\n\n6\n\nConclusion\n\nIn this work, we introduced AutoSaddler, an automatic harness optimization framework that formulates harness improvement for LLM agents as an offline learning problem over execution traces.\nAutoSaddler combines in-depth failure diagnosis, structured patch generation across prompts, tools,\nand middleware, and generalization-aware update selection via validation and EvoDAG-based evolution. As a result, it produces durable harness updates rather than trajectory-specific fixes. On\nGAIA2, SWE-Bench Pro, and Terminal-Bench 2.0, AutoSaddler consistently improves over the\ncorresponding base harnesses by 9.0, 9.6, and 10.0 percentage points, respectively, and outperforms\nthe strongest automated baseline on each benchmark by 7.4, 4.4, and 6.7 points. These results\nshow that effective harness optimization requires deep debugging, targeted interventions, and explicit\nselection for generalization, positioning automatic harness optimization as a promising direction for\nbuilding more performant and reliable long-horizon agent systems.\n\n7\n\nAcknowledgments\n\nWe thank the anonymous reviewers for their constructive comments and suggestions, which helped\nimprove the clarity and quality of this work. We are grateful to Bo Qiao for his generous help\nwith setting up the computing servers used for our experiments. We further thank the creators and\nmaintainers of GAIA2, SWE-Bench Pro, Terminal-Bench 2.0, SWE-agent, Terminus 2, GEPA,\nand Meta-Harness for making their benchmarks, systems, and tools available, which enabled the\nexperiments in this work.\n10\n\n\fReferences\n[1] Lakshya A Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems, Rishi Khare, Krista Opsahl-Ong,\nArnav Singhvi, Herumb Shandilya, Michael J Ryan, Meng Jiang, Christopher Potts, Koushik\nSen, Alex Dimakis, Ion Stoica, Dan Klein, Matei Zaharia, and Omar Khattab. GEPA: Reflective\nprompt evolution can outperform reinforcement learning. In The Fourteenth International\nConference on Learning Representations, 2026.\n[2] Huan ang Gao, Jiayi Geng, Wenyue Hua, Mengkang Hu, Xinzhe Juan, Hongzhang Liu, Shilong\nLiu, Jiahao Qiu, Xuan Qi, Qihan Ren, Yiran Wu, Hongru WANG, Han Xiao, Yuhang Zhou,\nShaokun Zhang, Jiayi Zhang, Jinyu Xiang, Yixiong Fang, Qiwen Zhao, Dongrui Liu, Cheng\nQian, Zhenhailong Wang, Minda Hu, Huazheng Wang, Qingyun Wu, Heng Ji, and Mengdi\nWang. A survey of self-evolving agents: What, when, how, and where to evolve on the path\nto artificial super intelligence. Transactions on Machine Learning Research, 2026. Survey\nCertification.\n[3] Anthropic. Effective harnesses for long-running agents. https://www.anthropic.com/\nengineering/effective-harnesses-for-long-running-agents, 2025. Accessed\n2026-04-21.\n[4] Anthropic. Agent sdk overview - claude code docs. https://code.claude.com/docs/en/\nagent-sdk/overview, 2026. Accessed 2026-04-21.\n[5] Anthropic. Harness design for long-running application development. https://www.\nanthropic.com/engineering/harness-design-long-running-apps, 2026. Accessed\n2026-04-21.\n[6] Zhicheng Cai, Xinyuan Guo, Yu Pei, Jiangtao Feng, Jiangjie Chen, Ya-Qin Zhang, Wei-Ying\nMa, Mingxuan Wang, and Hao Zhou. FLEX: continuous agent evolution via forward learning\nfrom experience. CoRR, abs/2511.06449, 2025.\n[7] Mengzhuo Chen, Junjie Wang, Zhe Liu, Yawen Wang, Haiming Zheng, and Qing Wang. From\nfailed trajectories to reliable llm agents: Diagnosing and repairing harness flaws. arXiv preprint\narXiv:2606.06324, 2026.\n[8] Zhengyu Chen, Teng Xiao, Huaisheng Zhu, Yige Yuan, Luan Zhang, and Jingang Wang.\nCo-harness: Co-evolving harnesses and model weights for llm agents. arXiv preprint\narXiv:2607.22688, 2026.\n[9] Xiang Deng, Jeff Da, Edwin Pan, Yannis Yiming He, Charles Ide, Kanak Garg, Niklas Lauffer,\nAndrew Park, Nitin Pasari, Chetan Rane, Karmini Sampath, Maya Krishnan, Srivatsa Kundurthy,\nSean Hendryx, Zifan Wang, Chen Bo Calvin Zhang, Noah Jacobson, Bing Liu, and Brad\nKenstler. Swe-bench pro: Can AI agents solve long-horizon software engineering tasks? CoRR,\nabs/2509.16941, 2025.\n[10] Romain Froger, Pierre Andrews, Matteo Bettini, Amar Budhiraja, Ricardo Silveira Cabral,\nVirginie Do, Emilien Garreau, Jean-Baptiste Gaya, Hugo Laurençon, Maxime Lecanu, Kunal\nMalkan, Dheeraj Mekala, Pierre Ménard, Gerard Moreno-Torres Bertran, Ulyana Piterbarg,\nMikhail Plekhanov, Mathieu Rita, Andrey Rusakov, Vladislav Vorotilov, Mengjue Wang, Ian\nYu, Amine Benhalloum, Grégoire Mialon, and Thomas Scialom. Gaia2: Benchmarking LLM\nagents on dynamic and asynchronous environments. CoRR, abs/2602.11964, 2026.\n[11] Jia Fu, Xiaoting Qin, Fangkai Yang, Lu Wang, Jue Zhang, Qingwei Lin, Yubo Chen, Dongmei\nZhang, Saravan Rajmohan, and Qi Zhang. Autorag-hp: Automatic online hyper-parameter\ntuning for retrieval-augmented generation. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung\nChen, editors, Findings of the Association for Computational Linguistics: EMNLP 2024, Miami,\nFlorida, USA, November 12-16, 2024, Findings of ACL, pages 3875–3891. Association for\nComputational Linguistics, 2024.\n[12] Yu Ge, Linna Xie, Zhong Li, Yu Pei, and Tian Zhang. Who is introducing the failure?\nautomatically attributing failures of multi-agent systems via spectrum analysis. arXiv preprint\narXiv:2509.13782, 2025.\n11\n\n\f[13] Hanghui Guo, Weijie Shi, Zhangze Chen, Shengxiang Xu, Yishu Wang, Yimei Zhang, Wangze\nNi, Jia Zhu, and Shimin Di. Drevo: Distilling recalibrated historical experience for harness\nself-evolution. arXiv preprint arXiv:2607.26722, 2026.\n[14] Qingyan Guo, Rui Wang, Junliang Guo, Bei Li, Kaitao Song, Xu Tan, Guoqing Liu, Jiang Bian,\nand Yujiu Yang. Connecting large language models with evolutionary algorithms yields powerful\nprompt optimizers. In The Twelfth International Conference on Learning Representations, ICLR\n2024, Vienna, Austria, May 7-11, 2024. OpenReview.net, 2024.\n[15] Prannay Hebbar, Yogendra Manawat, Samuel Verboomen, Alesia Ivanova, Selvam Palanimalai,\nKunal Bhatia, and Vignesh Baskaran. Sia: Self improving ai with harness &amp; weight updates.\narXiv preprint arXiv:2605.27276, 2026.\n[16] Shengran Hu, Cong Lu, and Jeff Clune. Automated design of agentic systems. In The Thirteenth\nInternational Conference on Learning Representations, ICLR 2025, Singapore, April 24-28,\n2025. OpenReview.net, 2025.\n[17] Yue Huang, Wenjie Wang, Han Bao, Yuchen Ma, Xiaonan Luo, Yi Nian, Haomin Zhuang,\nZheyuan Liu, Yue Zhao, and Xiangliang Zhang. Memoharness: Agent harnesses that learn from\nexperience. arXiv preprint arXiv:2607.14159, 2026.\n[18] Omar Khattab, Arnav Singhvi, Paridhi Maheshwari, Zhiyuan Zhang, Keshav Santhanam,\nSri Vardhamanan A, Saiful Haq, Ashutosh Sharma, Thomas T. Joshi, Hanna Moazam, Heather\nMiller, Matei Zaharia, and Christopher Potts. DSPy: Compiling declarative language model\ncalls into state-of-the-art pipelines. In The Twelfth International Conference on Learning\nRepresentations, 2024.\n[19] Shashank Kirtania, Param Biyani, Priyanshu Gupta, Yasharth Bajpai, Roshni Iyer, Sumit Gulwani, and Gustavo Soares. Improving language agents through BREW. CoRR, abs/2511.20297,\n2025.\n[20] KRAFTON AI and Ludo Robotics. Terminus-kira: Boosting frontier model performance on\nterminal-bench with minimal harness. https://github.com/krafton-ai/kira, 2026.\n[21] LangChain. Improving deep agents with harness engineering. https://www.langchain.com/\nblog/improving-deep-agents-with-harness-engineering, 2026. Accessed 2026-0421.\n[22] Yoonho Lee, Roshen Nair, Qizheng Zhang, Kangwook Lee, Omar Khattab, and Chelsea Finn.\nMeta-harness: End-to-end optimization of model harnesses. arXiv preprint arXiv:2603.28052,\n2026.\n[23] Jiahang Lin, Shichun Liu, Chengjun Pan, Lizhi Lin, Shihan Dou, Zhiheng Xi, Xuanjing Huang,\nHang Yan, Zhenhua Han, Tao Gui, et al. Agentic harness engineering: Observability-driven\nautomatic evolution of coding-agent harnesses. arXiv preprint arXiv:2604.25850, 2026.\n[24] Shu Liu, Shubham Agarwal, Monishwaran Maheswaran, Mert Cemri, Zhifei Li, Qiuyang Mang,\nAshwin Naren, Ethan Boneh, Audrey Cheng, Melissa Z Pan, et al. Evox: Meta-evolution for\nautomated discovery. arXiv preprint arXiv:2602.23413, 2026.\n[25] Xinghua Lou, Miguel Lázaro-Gredilla, Antoine Dedieu, Carter Wendelken, Wolfgang Lehrach,\nand Kevin P Murphy. Autoharness: improving llm agents by automatically synthesizing a code\nharness. arXiv preprint arXiv:2603.03329, 2026.\n[26] Guoqing Ma, Jia Zhu, Hanghui Guo, Weijie Shi, Jiawei Shen, Jingjiang Liu, and Yidan Liang.\nAutomatic failure attribution and critical step prediction method for multi-agent systems based\non causal inference. arXiv preprint arXiv:2509.08682, 2025.\n[27] Ming Ma, Jue Zhang, Fangkai Yang, Yu Kang, Qingwei Lin, Saravan Rajmohan, and Dongmei\nZhang. Dover: Intervention-driven auto debugging for LLM multi-agent systems. In The\nFourteenth International Conference on Learning Representations, 2026.\n12\n\n\f[28] Mike A. Merrill, Alexander Glenn Shaw, Nicholas Carlini, Boxuan Li, Harsh Raj, Ivan\nBercovich, Lin Shi, Jeong Yeon Shin, Thomas Walshe, Estefany Kelly Buchanan, Junhong\nShen, Guanghao Ye, Haowei Lin, Jason Poulos, Maoyu Wang, Marianna Nezhurina, Jenia Jitsev,\nDi Lu, Orfeas Menis-Mastromichalakis, Zhiwei Xu, Zizhao Chen, Yue Liu, Robert Zhang,\nLeon Liangyu Chen, Anurag Kashyap, Jan-Lucas Uslu, Jeffrey Li, Jianbo Wu, Minghao Yan,\nSong Bian, Vedang Sharma, Ke Sun, Steven Dillmann, Akshay Anand, Andrew Lanpouthakoun,\nBardia Koopah, Changran Hu, Etash Kumar Guha, Gabriel H. S. Dreiman, Jiacheng Zhu, Karl\nKrauth, Li Zhong, Niklas Muennighoff, Robert Amanfu, Shangyin Tan, Shreyas Pimpalgaonkar,\nTushar Aggarwal, Xiangning Lin, Xin Lan, Xuandong Zhao, Yiqing Liang, Yuanli Wang, Zilong\nWang, Changzhi Zhou, David Heineman, Hange Liu, Harsh Trivedi, John Yang, Junhong Lin,\nManish Shetty, Michael Yang, Nabil Omi, Negin Raoof, Shanda Li, Terry Yue Zhuo, Wuwei\nLin, Yiwei Dai, Yuxin Wang, Wenhao Chai, Shang Zhou, Dariush Wahdany, Ziyu She, Jiaming\nHu, Zhikang Dong, Yuxuan Zhu, Sasha Cui, Ahson Saiyed, Arinbjörn Kolbeinsson, Jesse Hu,\nChristopher Michael Rytting, Ryan Marten, Yixin Wang, Alex Dimakis, Andy Konwinski, and\nLudwig Schmidt. Terminal-bench: Benchmarking agents on hard, realistic tasks in command\nline interfaces. CoRR, abs/2601.11868, 2026.\n[29] Nous Research. Hermes agent — the agent that grows with you. https://hermes-agent.\nnousresearch.com/, 2026. Accessed 2026-04-21.\n[30] Alexander Novikov, Ngân Vu, Marvin Eisenberger, Emilien Dupont, Po-Sen Huang, Adam Zsolt\nWagner, Sergey Shirobokov, Borislav Kozlovskii, Francisco J. R. Ruiz, Abbas Mehrabian,\nM. Pawan Kumar, Abigail See, Swarat Chaudhuri, George Holland, Alex Davies, Sebastian\nNowozin, Pushmeet Kohli, and Matej Balog. Alphaevolve: A coding agent for scientific and\nalgorithmic discovery. CoRR, abs/2506.13131, 2025.\n[31] OpenAI. Harness engineering: leveraging codex in an agent-first world. https://openai.\ncom/index/harness-engineering/, 2026. Accessed 2026-04-21.\n[32] Krista Opsahl-Ong, Michael J. Ryan, Josh Purtell, David Broman, Christopher Potts, Matei\nZaharia, and Omar Khattab. Optimizing instructions and demonstrations for multi-stage\nlanguage model programs. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen, editors,\nProceedings of the 2024 Conference on Empirical Methods in Natural Language Processing,\nEMNLP 2024, Miami, FL, USA, November 12-16, 2024, pages 9340–9366. Association for\nComputational Linguistics, 2024.\n[33] Siru Ouyang, Jun Yan, I-Hung Hsu, Yanfei Chen, Ke Jiang, Zifeng Wang, Rujun Han, Long Le,\nSamira Daruki, Xiangru Tang, Vishy Tirumalashetty, George Lee, Mahsan Rofouei, Hangfei Lin,\nJiawei Han, Chen-Yu Lee, and Tomas Pfister. Reasoningbank: Scaling agent self-evolving with\nreasoning memory. In The Fourteenth International Conference on Learning Representations,\n2026.\n[34] Linyue Pan, Lexiao Zou, Shuo Guo, Jingchen Ni, and Hai-Tao Zheng. Natural-language agent\nharnesses. arXiv preprint arXiv:2603.25723, 2026.\n[35] Wenbo Pan, Shujie Liu, Chin-Yew Lin, Jingying Zeng, Xianfeng Tang, Xiangyang Zhou, Yan\nLu, and Xiaohua Jia. Evolving agents in the dark: Retrospective harness optimization via\nself-preference. arXiv preprint arXiv:2606.05922, 2026.\n[36] Reid Pryzant, Dan Iter, Jerry Li, Yin Tat Lee, Chenguang Zhu, and Michael Zeng. Automatic\nprompt optimization with \"gradient descent\" and beam search. In Houda Bouamor, Juan Pino,\nand Kalika Bali, editors, Proceedings of the 2023 Conference on Empirical Methods in Natural\nLanguage Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 7957–7968.\nAssociation for Computational Linguistics, 2023.\n[37] Jiahao Qiu, Xuan Qi, Tongcheng Zhang, Xinzhe Juan, Jiacheng Guo, Yifu Lu, Yimin Wang,\nZixin Yao, Qihan Ren, Xun Jiang, Xing Zhou, Dongrui Liu, Ling Yang, Yue Wu, Kaixuan\nHuang, Shilong Liu, Hongru Wang, and Mengdi Wang. Alita: Generalist agent enabling\nscalable agentic reasoning with minimal predefinition and maximal self-evolution. CoRR,\nabs/2505.20286, 2025.\n[38] Biswa Sengupta and Jinhua Wang. Harbor: Automated harness optimization. arXiv preprint\narXiv:2604.20938, 2026.\n13\n\n\f[39] Asankhaya Sharma. Openevolve: an open-source evolutionary coding agent. https://github.\ncom/algorithmicsuperintelligence/openevolve, 2025. Accessed 2026-04-21.\n[40] Varun Ursekar, Apaar Shanker, Veronica Chatrath, Sam Denton, et al. Vero: An evaluation\nharness for agents to optimize agents. arXiv preprint arXiv:2602.22480, 2026.\n[41] Chi Wang, Xueqing Liu, and Ahmed Hassan Awadallah. Cost-effective hyperparameter optimization for large language model generation inference. In Aleksandra Faust, Roman Garnett,\nColin White, Frank Hutter, and Jacob R. Gardner, editors, International Conference on Automated Machine Learning, 12-15 November 2023, Hasso Plattner Institute, Potsdam, Germany,\nProceedings of Machine Learning Research, pages 21/1–17. PMLR, 2023.\n[42] Wenyi Wang, Piotr Pi˛ekos, Li Nanbo, Firas Laakom, Yimeng Chen, Mateusz Ostaszewski,\nMingchen Zhuge, and Jürgen Schmidhuber. Huxley-g\\”odel machine: Human-level coding agent\ndevelopment by an approximation of the optimal self-improving machine. In The Fourteenth\nInternational Conference on Learning Representations, 2026.\n[43] Xinyuan Wang, Chenxi Li, Zhen Wang, Fan Bai, Haotian Luo, Jiayou Zhang, Nebojsa Jojic,\nEric P. Xing, and Zhiting Hu. Promptagent: Strategic planning with language models enables expert-level prompt optimization. In The Twelfth International Conference on Learning\nRepresentations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net, 2024.\n[44] Yingxu Wang, Siwei Liu, Jinyuan Fang, and Zaiqiao Meng. Evoagentx: An automated framework for evolving agentic workflows. In Ivan Habernal, Peter Schulam, and Jörg Tiedemann,\neditors, Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, EMNLP 2025 - System Demonstrations, Suzhou, China, November 4-9, 2025, pages\n643–655. Association for Computational Linguistics, 2025.\n[45] Chunqiu Steven Xia, Zhe Wang, Yan Yang, Yuxiang Wei, and Lingming Zhang. Live-swe-agent:\nCan software engineering agents self-evolve on the fly? CoRR, abs/2511.13646, 2025.\n[46] Minghao Yan, Bo Peng, Benjamin Coleman, Ziqi Chen, Zhouhang Xie, Shuo Chen, Zhankui\nHe, Noveen Sachdeva, Isabella Ye, Weili Wang, et al. Pacevolve: Enabling long-horizon\nprogress-aware consistent evolution. arXiv preprint arXiv:2601.10657, 2026.\n[47] Chengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu, Quoc V. Le, Denny Zhou, and Xinyun\nChen. Large language models as optimizers. In The Twelfth International Conference on\nLearning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net,\n2024.\n[48] John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik\nNarasimhan, and Ofir Press. Swe-agent: Agent-computer interfaces enable automated software\nengineering. In Amir Globersons, Lester Mackey, Danielle Belgrave, Angela Fan, Ulrich Paquet,\nJakub M. Tomczak, and Cheng Zhang, editors, Advances in Neural Information Processing\nSystems 38: Annual Conference on Neural Information Processing Systems 2024, NeurIPS\n2024, Vancouver, BC, Canada, December 10 - 15, 2024, 2024.\n[49] Xunjian Yin, Xinyi Wang, Liangming Pan, Li Lin, Xiaojun Wan, and William Yang Wang.\nGödel agent: A self-referential agent framework for recursively self-improvement. In Wanxiang\nChe, Joyce Nabende, Ekaterina Shutova, and Mohammad Taher Pilehvar, editors, Proceedings\nof the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long\nPapers), ACL 2025, Vienna, Austria, July 27 - August 1, 2025, pages 27890–27913. Association\nfor Computational Linguistics, 2025.\n[50] Mert Yüksekgönül, Federico Bianchi, Joseph Boen, Sheng Liu, Zhi Huang, Carlos Guestrin,\nand James Zou. Textgrad: Automatic \"differentiation\" via text. Nature, 639, 2025.\n[51] Guibin Zhang, Junhao Wang, Junjie Chen, Wangchunshu Zhou, Kun Wang, and Shuicheng\nYan. Agentracer: Who is inducing failure in the LLM agentic systems? CoRR, abs/2509.03312,\n2025.\n[52] Hangfan Zhang, Shao Zhang, Kangcong Li, Chen Zhang, Yang Chen, Yiqun Zhang, Lei Bai, and\nShuyue Hu. Self-harness: Harnesses that improve themselves. arXiv preprint arXiv:2606.09498,\n2026.\n14\n\n\f[53] Heng Zhang, Yuling Shi, Xiaodong Gu, Haochen You, Zijian Zhang, Lubin Gan, Yilei Yuan,\nand Jin Huang. Graphtracer: Graph-guided failure tracing in llm agents for robust multi-turn\ndeep search. arXiv preprint arXiv:2510.10581, 2025.\n[54] Jenny Zhang, Shengran Hu, Cong Lu, Robert Tjarko Lange, and Jeff Clune. Darwin gödel\nmachine: Open-ended evolution of self-improving agents. In The Fourteenth International\nConference on Learning Representations, 2026.\n[55] Jenny Zhang, Bingchen Zhao, Wannan Yang, Jakob N. Foerster, Jeff Clune, Minqi Jiang, Sam\nDevlin, and Tatiana Shavrina. Hyperagents. CoRR, abs/2603.19461, 2026.\n[56] Jiayi Zhang, Jinyu Xiang, Zhaoyang Yu, Fengwei Teng, Xionghui Chen, Jiaqi Chen, Mingchen\nZhuge, Xin Cheng, Sirui Hong, Jinlin Wang, Bingnan Zheng, Bang Liu, Yuyu Luo, and Chenglin\nWu. Aflow: Automating agentic workflow generation. In The Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, April 24-28, 2025. OpenReview.net,\n2025.\n[57] Luan Zhang, Ruochen Zhou, Dandan Song, Zhengyu Chen, Yuhang Tian, Jun Yang, Huipeng\nMa, Chenhao Li, Guangyuan Feng, Xudong Li, et al. Harnesscompass: Guiding automatic harness evolution toward generalizable and effective agent harnesses. arXiv preprint\narXiv:2608.01918, 2026.\n[58] Shaokun Zhang, Ming Yin, Jieyu Zhang, Jiale Liu, Zhiguang Han, Jingyang Zhang, Beibin Li,\nChi Wang, Huazheng Wang, Yiran Chen, and Qingyun Wu. Which agent causes task failures\nand when? on automated failure attribution of LLM multi-agent systems. In Aarti Singh,\nMaryam Fazel, Daniel Hsu, Simon Lacoste-Julien, Felix Berkenkamp, Tegan Maharaj, Kiri\nWagstaff, and Jerry Zhu, editors, Forty-second International Conference on Machine Learning,\nICML 2025, Vancouver, BC, Canada, July 13-19, 2025, Proceedings of Machine Learning\nResearch. PMLR / OpenReview.net, 2025.\n[59] Shaokun Zhang, Jieyu Zhang, Jiale Liu, Linxin Song, Chi Wang, Ranjay Krishna, and Qingyun\nWu. Offline training of language model agents with functions as learnable weights. In Ruslan\nSalakhutdinov, Zico Kolter, Katherine A. Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett,\nand Felix Berkenkamp, editors, Forty-first International Conference on Machine Learning,\nICML 2024, Vienna, Austria, July 21-27, 2024, Proceedings of Machine Learning Research,\npages 60315–60335. PMLR / OpenReview.net, 2024.\n[60] Andrew Zhao, Daniel Huang, Quentin Xu, Matthieu Lin, Yong-Jin Liu, and Gao Huang. Expel:\nLLM agents are experiential learners. In Michael J. Wooldridge, Jennifer G. Dy, and Sriraam\nNatarajan, editors, Thirty-Eighth AAAI Conference on Artificial Intelligence, AAAI 2024, ThirtySixth Conference on Innovative Applications of Artificial Intelligence, IAAI 2024, Fourteenth\nSymposium on Educational Advances in Artificial Intelligence, EAAI 2014, February 20-27,\n2024, Vancouver, Canada, pages 19632–19642. AAAI Press, 2024.\n[61] Chenyu Zhou, Huacan Chai, Wenteng Chen, Zihan Guo, Rong Shan, Yuanyi Song, Tianyi Xu,\nYingxuan Yang, Aofan Yu, Weiming Zhang, et al. Externalization in llm agents: A unified\nreview of memory, skills, protocols and harness engineering. arXiv preprint arXiv:2604.08224,\n2026.\n[62] Yongchao Zhou, Andrei Ioan Muresanu, Ziwen Han, Keiran Paster, Silviu Pitis, Harris Chan,\nand Jimmy Ba. Large language models are human-level prompt engineers. In The Eleventh\nInternational Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5,\n2023. OpenReview.net, 2023.\n[63] Kunlun Zhu, Zijia Liu, Bingxuan Li, Muxin Tian, Yingxuan Yang, Jiaxun Zhang, Pengrui Han,\nQipeng Xie, Fuyang Cui, Weijia Zhang, et al. Where llm agents fail and how they can learn\nfrom failures. arXiv preprint arXiv:2509.25370, 2025.\n[64] Runchuan Zhu, Bowen Jiang, Lingrui Mei, Fangkai Yang, Lu Wang, Haoxiang Gao, Fengshuo\nBai, Pu Zhao, Qingwei Lin, Saravan Rajmohan, and Dongmei Zhang. Adaptflow: Adaptive\nworkflow optimization via meta-learning. In Christos Christodoulopoulos, Tanmoy Chakraborty,\nCarolyn Rose, and Violet Peng, editors, Findings of the Association for Computational Linguistics: EMNLP 2025, Suzhou, China, November 4-9, 2025, pages 3287–3302. Association for\nComputational Linguistics, 2025.\n15\n\n\fTraditional Mini-batch Training\n\nAutoSaddler Stage\n\nInterpretation\n\nStep 1: Sample mini-batch\n\n1 Sample mini-batch for evaluating\ncurrent harness\n\nSame role\n\nStep 2: Run forward pass\n\n1 Execute the current harness\n\nThe agent rollout is the forward computation. It produces both a final answer and a trajectory.\n\nStep 3: Compute loss\n\n1 Record outcomes and traces\n\nThe task outcome provides the sparse\nmetric signal; the trace provides evidence needed to explain the outcome.\n\nStep 4: Backpropagate gradients\n\n2 Diagnose and patch + 3 verify\non the same mini-batch\n\nAutoSaddler has no numerical gradient; it constructs a textual update\nthrough hypothesis generation on root\ncause, intervention, and verification.\n\nStep 6: Validate/checkpoint\n\n4 Evaluate on the dev-set\n\nDev-set evaluation checks whether the\ncandidate improvement generalizes\nbeyond the mini-batch.\n\nStep 5: Apply optimizer update\n\n5 Reflect + 6 store in EvoDAG +\n7 evolve the next harness\n\nThe committed update is not merely\nthe raw patch. AutoSaddler updates\noptimizer state and uses it to synthesize the next candidate harness.\n\nStep 7: Repeat\n\nNext iteration\n\nThe evolved harness is evaluated on a\nfresh mini-batch.\n\nTable 4: Mapping between conventional mini-batch training and the AutoSaddler loop in Figure 2.\nAutoSaddler follows the outer structure of mini-batch learning but replaces differentiable gradient\ncomputation with trace-grounded symbolic optimization.\n\nA\n\nAutoSaddler as Mini-Batch Learning over Textual Harness Parameters\n\nThis appendix clarifies how the AutoSaddler loop in Figure 2 relates to the standard mini-batch\ntraining loop. The analogy is useful because AutoSaddler preserves the outer structure of mini-batch\nlearning: it repeatedly evaluates a candidate system on a mini-batch, extracts an update signal,\nchecks whether the update generalizes, and uses accumulated optimization history to propose the\nnext candidate. However, the analogy should not be taken literally. Unlike neural parameters,\nharness parameters are textual, executable, and non-differentiable. AutoSaddler therefore replaces\ndifferentiable gradient computation with a trace-grounded symbolic optimization procedure.\nMapping to traditional mini-batch training. Table 4 summarizes the correspondence. We denote\nthe stages of traditional mini-batch training as Step 1–Step 7, and refer to AutoSaddler stages using\nthe circled labels from Figure 2.\nWhy backpropagation becomes diagnosis, patching, and verification. The central mismatch\nbetween the two settings lies in the analogue of backpropagation. In neural training, once the loss\nis computed, backpropagation provides a mathematically defined gradient. The update direction is\ntherefore relatively well specified.\nIn AutoSaddler, a failed rollout does not directly specify how the harness should change. The root\ncause may lie in the prompt, a tool interface, a tool implementation, a middleware hook, or the agent\nloop. The system must therefore infer a root-cause hypothesis from the trace, implement a targeted\nintervention, and empirically test whether the intervention improves behavior on the same mini-batch:\ndiagnosis −→ patch-as-intervention −→ same-batch verification.\n\n(2)\n\nThis sequence plays the role of constructing a credible textual gradient. Importantly, the patch\nat this stage is not yet best understood as the final committed parameter update. Rather, it is an\nintervention used to test whether the inferred root cause is plausible. This distinction is important\nbecause numerical gradients are derived from a fixed mathematical operator, whereas textual gradients\nare inferred, semantic, and fallible. Same-batch verification is therefore necessary to avoid treating\nan untested explanation as a reliable update direction.\n16\n\n\fAlgorithm 1 AutoSaddler as mini-batch learning over harness parameters\nRequire: Initial harness H0 , training set Dtrain , development set Ddev , rollout budget K\n1: Initialize EvoDAG G0 with H0\n2: for iteration n = 0, 1, 2, . . . until budget K is exhausted do\n3:\nSample mini-batch Bn ⊂ Dtrain\n▷ Figure 2: 1 ; Step 1\n4:\nExecute Hn on Bn , collecting outcomes and traces τn\n▷ 1 ; Steps 2–3\n5:\nDiagnose failures in τn and infer root-cause hypotheses\n▷ 2 ; textual credit assignment\n6:\nGenerate targeted patch ∆θn , yielding candidate Hn′ = Hn + ∆θn\n▷ 2 ; patch as intervention\n7:\nRe-evaluate Hn′ on Bn\n▷ 3 ; verify textual gradient\n8:\nif same-batch performance improves then\n9:\nEvaluate Hn′ on Ddev\n▷ 4 ; Step 6 generalization gate\n10:\nend if\n11:\nReflect on before/after traces and evaluation results\n▷ 5 ; convert evidence into lessons\n12:\nUpdate EvoDAG Gn with patch, metrics, and lessons to obtain Gn+1 ▷ 6 ; symbolic optimizer state\n13:\nEvolve next harness Hn+1 from Gn+1\n▷ 7 ; Step 5 committed update\n14: end for\n15: return best harness selected by development performance\n\nWhy the optimizer update is reflection plus EvoDAG evolution. A second mismatch concerns\nthe notion of an optimizer update. In ordinary training, the optimizer directly modifies numeric\nparameters. In AutoSaddler, the raw patch is only one candidate change. Before allowing this\nchange to influence future search, the system must determine whether it is useful beyond the current\nmini-batch and what reusable lesson, if any, should be retained.\nThis is why the committed update is better understood as\ndev-set validation −→ reflection −→ EvoDAG update −→ evolution of the next harness. (3)\nReflection distills before/after evidence into reusable lessons, and EvoDAG stores these lessons\ntogether with patch descriptions and performance signals. The Evolution Session then uses this\nsymbolic optimizer state to select, revise, or recombine components from previously explored\nharnesses when constructing the next candidate. In this sense, EvoDAG serves as a form of optimizer\nmemory. Analogous to how momentum accumulates past gradient information to smooth noisy\nupdates and steer future steps toward historically productive directions, EvoDAG accumulates past\npatches, outcomes, and reflections to guide harness evolution toward changes with evidence of\ngeneralizable benefit. Thus, AutoSaddler’s update is history-aware and compositional, rather than a\nsingle local arithmetic step.\nA note on ordering. The mapping above intentionally swaps the usual order of Step 5 and Step 6.\nIn standard mini-batch training, one typically applies the optimizer update before validation or\ncheckpointing. In AutoSaddler, development-set validation precedes the final symbolic optimizer\nupdate because EvoDAG is part of the optimizer state. Once a misleading lesson is stored, it can\ninfluence future evolution. Validation therefore serves as a generalization gate before the system\ncommits lessons to EvoDAG and evolves Hn+1 .\nAlgorithmic view. Algorithm 1 presents the same view algorithmically. The key point is that the\npatch produced in 2 – 3 functions as an intervention for testing an inferred textual gradient. The final\nupdate to the search trajectory occurs only after validation, reflection, and EvoDAG-based evolution.\nPhased patch scheduling. We divide the patch types in Table 1 into two categories based on the\ntype of harness change they make. Capability patches modify executable code or orchestration logic,\nincluding tool implementations, tool arguments, infrastructure settings, and agent-loop logic. These\npatches can change what actions the agent is able to perform or how the harness executes those actions.\nSteering patches are textual edits that leave the underlying executable code unchanged, including\nmodifications to prompts, tool descriptions, and hook reminder texts. These patches primarily refine\nhow the agent selects among existing capabilities and follows task-specific constraints.\nThis distinction is analogous to, but not identical with, large versus small learning-rate steps in\ngradient-based optimization. Capability patches often behave like larger steps because they can\nintroduce new functionality, change control flow, or alter the available action space. Steering\npatches often behave like smaller steps because they adjust the agent’s behavior within an already\n17\n\n\festablished capability set. However, this analogy is only approximate: prompt or hook edits can\nsometimes produce large behavioral changes, especially when they affect high-frequency decisions.\nWe therefore use the capability–steering distinction as a scheduling heuristic rather than a strict\nguarantee about effect size, and rely on verification and development-set validation to detect overly\nbroad or regression-inducing changes.\nMotivated by this analogy, AutoSaddler adopts a two-phase schedule with transition point k:\n1. Exploration phase (n ≤ k). The search prioritizes capability patches to address fundamental\ngaps in tooling, infrastructure, and agent-loop behavior.\n2. Refinement phase (n &gt; k). The search switches to steering patches to refine behavior after the\ncapability set has stabilized.\nThe transition point k can be specified directly as an iteration count or implicitly through the number\nof training epochs:\n\u0018\n\u0019\n|Dtrain |\nk=E·\n,\nB\nwhere E is the number of capability-phase epochs and B is the mini-batch size. As in learning-rate\nscheduling, setting k too small may under-explore high-impact capability improvements, while setting\nit too large may delay lower-risk behavioral refinement. In our experiments, a single capability-phase\nepoch (E = 1) works well, allowing the search to traverse the training set once with high-impact\npatches before switching to targeted steering adjustments.\nTakeaway. AutoSaddler can be viewed as mini-batch offline learning over externalized agent\nparameters. Its design differs from standard gradient training because harness parameters are textual\nand non-differentiable; the performance signal is sparse and delayed; and credit assignment across\nlong-horizon traces is ambiguous. The additional machinery is therefore not incidental. Trace\ncollection, diagnosis, patch-as-intervention, same-batch verification, development-set validation,\nreflection, EvoDAG memory, and evolution are the symbolic counterparts of the mechanisms that\nare compactly handled by loss functions, backpropagation, optimizer state, and checkpointing in\ntraditional mini-batch training.\n\nB\n\nAdditional Details on Experiment Setup\n\nImplementation of EvoDAG. The DAG underlying EvoDAG can be implemented straightforwardly, but providing effective agent access to the DAG is more challenging: as candidates and\ntraces accumulate across iterations, navigating EvoDAG directly becomes impractical. Rather than\nserializing the full DAG into the prompt, we introduce the evo-dag command-line interface (CLI) to\nfacilitate interaction between the CA-SDK and EvoDAG. The interface provides on-demand access to\nthe DAG’s structured summaries, including patch history, lessons learned, the scenario registry, and\nharness code diffs. This allows the agent to identify relevant context before drilling down into specific\nraw traces or source files for detailed analysis. The full command set is summarized in Table 5.\nAdapting Baselines to Our Benchmarks. GEPA treats the system prompt as a single unified string.\nBy contrast, the default ReAct-based agent in GAIA2 distributes its system prompt across multiple\nsections, such as core behavioral principles, the ReAct JSON tool-calling format, and Meta’s Agents\nResearch Environments (ARE) simulation-environment instructions. These sections are defined\nas separate variables and concatenated only at inference time, creating a structural mismatch that\nprevents the direct application of GEPA. To address this mismatch, we concatenate the sections\ninto a single string, using ===== VAR_NAME ===== delimiters to mark section boundaries, and\ninstruct GEPA’s reflection LLM to preserve these delimiters during prompt evolution. The evolved\nprompt is then split along the delimiters, and the resulting sections are passed to CA-SDK to update\nthe corresponding variables. For SBP and TB2, we adopt SWE-agent and Terminus 2 as the base\nharnesses, respectively; since both agents define their system prompts as a single unified string, GEPA\ncan be applied directly without further modification.\nThe original Meta-Harness assumes that the harness is contained within a single Python script and\nrequires inheritance from a fixed base agent class. In the GAIA2 default agent, however, the harness\nmay be distributed across an entire repository. We therefore extend the Meta-Harness adaptation\n18\n\n\fTable 5: Commands exposed by the evo-dag CLI, grouped into read operations for scoped EvoDAG\nviews and write operations for per-session node or scenario updates.\nCommand\n\nPurpose\n\nWhen to use\n\nevo-dag summary\n\nDAG topology, best candidate, all\nedges\n\nStart of session; quick orientation\n\nevo-dag show history\n\nFull patch history: diffs, reflections,\nlessons\n\nDeep dive into prior attempts\n\nevo-dag show node &lt;idx&gt;\n\nNode details: scores, intent, verdict,\noutput dirs\n\nInspecting a specific candidate\n\nevo-dag show edge &lt;parent&gt;\n&lt;child&gt;\n\nCode diff, per-scenario impacts,\nfiles changed\n\nUnderstanding a specific patch\n\nevo-dag show scenario &lt;id&gt;\n\nPer-scenario history, root causes, attempted fixes\n\nBefore diagnosing a failing scenario\n\nevo-dag show current-batch\n\nCurrent mini-batch scenario IDs and\noutput dirs\n\nOrienting to the current iteration\n\nevo-dag show lineage\n\nDAG lineage with edge types\n\nUnderstanding branching structure\n\nevo-dag show lessons\n\nAccumulated good/bad patterns\n\nChecking known patterns before\npatching\n\nevo-dag update-selection\n\nRecord selected parent candidate(s)\nand the reasoning behind the choice\n\nEvolution Session, after parent selection\n\nevo-dag update-intent\n\nRecord target scenarios, diagnosis,\napproach, files changed, and change\nsummary\n\nDiagnosis-Patch Session, after applying patches\n\nevo-dag update-reflection\n\nRecord per-scenario status (fixed\n/ regressed / still_failing /\nstill_passing), root cause, postpatch explanation, prevention or\nnext step, and generalization note\n\nReflection Session, per scenario\n\nRead operations\n\nWrite operations\n\nto the repository level by instructing CA-SDK to apply the same patching procedure used in the\noriginal Meta-Harness across the full repository. This enables holistic harness optimization beyond\nthe single-file setting.\nBenchmark-Specific Evaluation Protocol. For each benchmark, we follow its official evaluation\ninfrastructure to ensure that the reported results are directly comparable to prior leaderboard numbers.\nGAIA2. We run the default ReAct-based agent through ARE using the are-run command, which\nexecutes each task in its corresponding sandboxed Universe and records the full trajectory. Following\nthe GAIA2 protocol [10], we use Llama-3.3-70B-Instruct as the judge model to determine task\nsuccess from the final agent state.\nSWE-Bench Pro. Following the official protocol of [9], each agent-generated patch is applied inside a\nper-instance Docker image preconfigured with the repository at the issue commit. The patch is then\nverified using the instance’s fail-to-pass and pass-to-pass unit tests. A task is counted as resolved\nonly if all fail-to-pass tests pass and no pass-to-pass test regresses.\nTerminal-Bench 2.0. Following [28], we use Harbor to run each task in an isolated Docker container.\nSuccess is determined by a task-specific test script that inspects the final terminal and system state.\nData Splits across Benchmarks. To evaluate whether optimized harnesses generalize beyond\nthe tasks seen during optimization, we construct train, development, and test splits separately for\neach benchmark, as summarized in Table 6. For benchmarks with a natural grouping structure,\n19\n\n\fwe split by task group rather than by individual tasks. In GAIA2, the split axis is the Universe,\nwhere each Universe corresponds to a distinct persona and simulated digital environment. This\ndesign ensures that the test set contains tasks from groups unseen during optimization, providing a\nstronger measure of out-of-distribution generalization than random task-level splits. In SWE-Bench\nPro, the split axis is the repository, which also induces shifts in programming language, codebase\nstructure, and issue distribution. This design ensures that the test set contains tasks from groups\nunseen during optimization, providing a stronger measure of out-of-distribution generalization than\nrandom task-level splits. For Terminal-Bench 2.0, tasks span diverse domains but do not provide a\nnatural grouping axis; we therefore use a uniform random partition into train, dev, and test sets.\nTable 6: Data splits across the three benchmarks. To evaluate generalization under distribution shift,\nwe partition each benchmark such that train, development, and test sets contain tasks from disjoint\ntask groups— Universes (personas) for GAIA2 and repositories (programming languages) for\nSWE-Bench Pro—rather than random task-level splits. Terminal-Bench 2.0 contains only 89 tasks\nacross diverse domains and offers no natural grouping axis, so we adopt a uniform random partition.\nBenchmark\n\nGAIA2\n\nSWE-Bench Pro\n\nTerminal-Bench 2.0\n\nSplit Axis\n\nUniverse (persona)\n\nSplit\n\nTask Group\n\nTrain\n\nUniverse 29\n\n75\n\nDev\n\nUniverse 30\n\n65\n\nTest\n\nUniverse 21\nUniverse 22\nUniverse 27\n\n107\n112\n81\n\nTrain\n\nqutebrowser (Python)\n\n79\n\nDev\n\nVuls (Go)\nNodeBB (JavaScript)\n\n40\n40\n\nTest\n\nAnsible (Python)\nFlipt (Go)\nElement-web (TypeScript)\n\n96\n85\n56\n\nTrain\n\n—\n\n30\n\nDev\n\n—\n\n19\n\nTest\n\n—\n\n40\n\nRepository (language)\n\nRandom†\n\n# Tasks\n\n†\n\nOnly 89 tasks across heterogeneous domains (system administration, machine learning, cybersecurity); no natural axis for distribution-shifted\nsplits exists.\n\nOptimization Budgets. For AutoSaddler and GEPA, we optimize for 2 epochs on GAIA2 and\nSWE-Bench-Pro, and for 4 epochs on Terminal-Bench 2.0; the doubled budget on TB2 compensates\nfor its training set being roughly half the size of GAIA2. For Meta-Harness, applying the same\nepoch-based budget would be misleading: unlike AutoSaddler and GEPA, which perform mini-batch\noptimization, Meta-Harness operates in a full-batch regime, so a 2-epoch budget corresponds to only\ntwo patch updates and would unfairly handicap the baseline. To ensure a fair comparison, we instead\nmatch optimization budgets in terms of total task executions consumed during training. Concretely,\nwe train Meta-Harness for 20 epochs on GAIA2 and 15 epochs on Terminal-Bench 2.0, and 8 epochs\non SWE-Bench-Pro, ensuring its total task executions are no smaller than those used by AutoSaddler\non every benchmark.\n\nC\n\nRobustness to Optimization Stochasticity\n\nOur main experiments perform one optimization run for each method because end-to-end harness\noptimization is substantially more expensive than repeated test-time evaluation. To assess whether\nthe observed gains are sensitive to stochastic optimization trajectories, we conduct an additional\nindependent optimization run for AutoSaddler, GEPA, and Meta-Harness on GAIA2. We evaluate\neach resulting harness on Universe 22, the largest held-out test universe with 112 scenarios, using\nthree repeated executions per harness.\n20\n\n\fTable 7: Robustness to optimization stochasticity. Pass@1 on GAIA2 Universe 22 for harnesses\nobtained from two independent optimization runs. Test performance is reported as mean ± standard\ndeviation over three executions.\nMethod\n\nGAIA2 Universe 22 (112 scenarios; Pass@1)\n51.5 ± 4.9\n47.9 ± 3.4\n50.6 ± 0.5\n51.5 ± 5.2\n51.2 ± 2.2\n60.7 ± 2.4\n58.6 ± 0.5\n\nDefault Agent (Manual)\nGEPA (Run 1)\nGEPA (Run 2)\nMeta-Harness (Run 1)\nMeta-Harness (Run 2)\nAutoSaddler (Run 1)\nAutoSaddler (Run 2)\n\nTable 7 reports the results. The second AutoSaddler optimization run achieves 58.6% Pass@1, only\n2.1 percentage points below the first run and 7.1 points above the default agent. It also outperforms the\nindependently rerun GEPA and Meta-Harness harnesses by 8.0 and 7.4 percentage points, respectively.\nAlthough two optimization trajectories are insufficient for a comprehensive statistical characterization\nof the optimizer, the consistent gains across independent runs indicate that the improvement of\nAutoSaddler is not specific to a single favorable search trajectory.\n\nD\n\nRobustness to Training-Distribution Shift\n\nTable 8: Robustness to training-distribution shift. Pass@1 on GAIA2 Universe 22 when AutoSaddler is independently optimized using different training universes. Values are mean ± standard\ndeviation over three test executions.\nMethod\n\nGAIA2 Universe 22 (112 scenarios; Pass@1)\n51.5 ± 4.9\n60.7 ± 2.4\n58.6 ± 0.5\n57.4 ± 2.1\n\nDefault Agent (Manual)\nAutoSaddler (Run 1; Universe 29)\nAutoSaddler (Run 2; Universe 29)\nAutoSaddler (Different Train Set; Universe 24)\n\nThe main GAIA2 experiments optimize the harness using Universe 29 as the training set. To examine\nwhether the resulting gains depend critically on this particular training distribution, we replace\nUniverse 29 with the comparably sized Universe 24 and independently optimize AutoSaddler while\nkeeping the remaining optimization and evaluation protocol unchanged. The resulting harness is\nevaluated three times on Universe 22.\nAs shown in Table 8, the harness optimized on Universe 24 achieves 57.4% Pass@1. Despite being\noptimized using a different training universe, it improves over the default agent by 5.9 percentage\npoints and remains within 1.2 points of the second independent AutoSaddler run trained on Universe 29. These results suggest that AutoSaddler can discover effective harness updates from different\npersona and task distributions, rather than relying on properties specific to the original Universe 29\ntraining split.\n\nE\n\nCross-Model Transferability to Weaker Agent Backbone\n\nWhile Table 2 reports results with Claude Opus 4.6 serving as both the optimizer and the agent\nbackbone, a key practical question is whether harnesses optimized by a strong model retain their\nbenefits when deployed with a weaker task agent. To test this, we re-evaluate all methods on GAIA2\nusing Claude Haiku 4.5 as the task agent backbone while keeping the harnesses unchanged from\nthose produced during Opus-based optimization. Table 9 shows that AutoSaddler achieves an overall\nimprovement of +5.6 pp over the default agent, demonstrating effective cross-model transferability.\nNotably, AutoSaddler consistently outperforms all baseline methods and ablation settings across all\nevaluated universes.\n21\n\n\fTable 9: Cross-model transferability. Pass@1 success rates on the test-set of GAIA2 using Claude\nHaiku 4.5 as the agent backbone, with harnesses optimized by Claude Opus 4.6. Values are\nmean ± standard deviation over three runs.\nHarness (Type)\n\nGAIA2 Universe (Pass@1)\n21 (107)\n\nF\n\n22 (112)\n\nAvg.\n\n27 (81)\n\nDefault Agent (Manual)\nGEPA (Auto)\nMeta-Harness (Auto)\nAutoSaddler (Auto)\n\n31.2 ± 5.9\n24.4 ± 1.4\n36.2 ± 1.9\n30.0 ± 1.8\n33.6 ± 1.9\n24.4 ± 0.5\n38.3 ± 1.2\n31.4 ± 0.4\n30.8 ± 0.0\n26.8 ± 4.7\n34.2 ± 4.0\n30.2 ± 2.7\n38.3 ± 0.0 30.4 ± 1.8 39.1 ± 2.6 35.6 ± 0.8\n\nw/o In-depth Diagnosis (Auto)\nw/o Structured Intervention (Auto)\nw/o Generalization-aware Selection (Auto)\n\n36.1 ± 5.5\n32.1 ± 3.0\n28.3 ± 2.9\n\n19.0 ± 5.2\n28.0 ± 4.0\n23.2 ± 4.1\n\n34.2 ± 0.7\n37.4 ± 5.8\n30.0 ± 3.8\n\n29.2 ± 3.4\n32.0 ± 3.5\n26.9 ± 1.3\n\nFine-Grained Ablations of Structured Intervention and\nGeneralization-Aware Selection\n\nTable 10: Fine-grained ablations. Pass@1 on GAIA2 Universe 22. Values are mean ± standard\ndeviation over three runs.\nMethod\n\nGAIA2 Universe 22 (112 scenarios; Pass@1)\n\nDefault Agent (Manual)\nAutoSaddler\n\n51.5 ± 4.9\n60.7 ± 2.4\n\nw/o Structured Intervention\nw/o Phase Scheduling\n\n53.3 ± 7.6\n54.8 ± 4.4\n\nw/o Generalization-Aware Selection\nw/o Dev-Set Filtering\n\n44.9 ± 6.7\n50.0 ± 5.0\n\nThe main ablations remove each design principle of AutoSaddler as a whole. We further disentangle\nthe individual mechanisms underlying structured intervention and generalization-aware selection.\nFor structured intervention, the main w/o Structured Intervention ablation removes both the patch\ntaxonomy and Phased Patch Scheduling. We therefore introduce a finer-grained w/o Phase Scheduling\nvariant that retains the patch taxonomy while removing only the phased schedule. Similarly, the main\nw/o Generalization-Aware Selection ablation removes both development-set filtering and Reflection\nwith EvoDAG. We introduce a w/o Dev-Set Filtering variant that retains Reflection with EvoDAG but\nremoves development-set filtering. For each variant, we rerun the full optimization procedure and\nevaluate the resulting harness on GAIA2 Universe 22 using three repeated test executions.\nTable 10 shows the results. Removing only Phased Patch Scheduling reduces Pass@1 from 60.7% to\n54.8%, a drop of 5.9 percentage points. Removing the patch taxonomy in addition further reduces\nperformance to 53.3%, indicating an additional 1.5-point contribution from structuring the patch\nspace. For generalization-aware selection, removing development-set filtering reduces Pass@1 from\n60.7% to 50.0%, while additionally removing Reflection with EvoDAG further reduces performance\nto 44.9%. Thus, development-set filtering accounts for the larger effect in this comparison, while\nReflection with EvoDAG provides an additional 5.1-point gain. Together, these finer-grained ablations\nindicate that both mechanisms within each design principle contribute to final harness performance.\n\nG\n\nPatch Durability Analysis\n\nA desirable harness update should not only repair the scenarios that motivate the patch, but should\nalso preserve behavior that was already correct. We therefore analyze patch durability by comparing\ntask outcomes before and after each generated patch on the same training mini-batch. We define\nthe fix rate as the fraction of previously failing scenarios that pass after applying the patch, and the\nregression rate as the fraction of previously passing scenarios that fail after the patch.\n22\n\n\fWe first group patches according to the three harness components used by the patch taxonomy:\nPrompt, Tool, and Middleware. As shown in Table 11, the three categories exhibit similar fix rates of\n57–59%, while Tool patches have a moderately higher regression rate of 19%, compared with 14%\nfor Prompt and Middleware patches. Thus, the component being edited alone does not reveal a clear\ndurability pattern.\nTable 11: Patch durability by harness component. Fix and regression rates are measured by\ncomparing pre- and post-patch outcomes on the same training mini-batch.\nPatch Category\nPrompt\nTool\nMiddleware\n\nFix Rate (%)\n\nRegression Rate (%)\n\n59\n57\n57\n\n14\n19\n14\n\nOne reason for the weak separation across these categories is that they mix different intervention\nmechanisms. For example, Tool patches include executable changes such as new tools and implementation fixes, but also textual changes to tool descriptions. Similarly, Middleware patches include\nboth executable infrastructure or agent-loop changes and text-only PreToolUse hooks. We therefore\nreclassify all generated patches using the higher-level Capability–Steering taxonomy from the main\npaper. Capability Patches modify executable functionality or orchestration logic, whereas Steering\nPatches alter textual instructions without changing the underlying executable capability.\nTable 12 reveals a clearer difference. Steering Patches achieve a slightly higher fix rate than Capability\nPatches (58% vs. 55%), but their regression rate is more than twice as high (17% vs. 8%). Capability\nPatches therefore obtain a comparable rate of local repairs while reducing regressions by 9 percentage\npoints. This result suggests that capability-level interventions tend to produce more durable updates,\nwhereas textual steering is more susceptible to spilling over to scenarios outside the intended scope.\nThis quantitative pattern is also consistent with our qualitative examples: well-scoped executable\nfixes often address deterministic capability limitations, while overly broad hooks or prompt rules can\naffect unrelated scenarios.\nTable 12: Patch durability by intervention mechanism. Capability and Steering Patches exhibit\nsimilar fix rates, but Steering Patches induce substantially more regressions.\nPatch Type\nSteering Patch\nCapability Patch\n\nH\n\nFix Rate (%)\n\nRegression Rate (%)\n\n58\n55\n\n17\n8\n\nOptimization Efficiency on Terminal-Bench 2.0\n\nTo assess whether AutoSaddler’s optimization efficiency generalizes beyond GAIA2, we report\ncompute and learning efficiency on Terminal-Bench 2.0, which targets a distinct agentic capability:\nlong-horizon command-line problem solving. We follow the same protocol as in our main GAIA2\nexperiments (Section 5), comparing AutoSaddler against Meta-Harness and GEPA.\nFigure 5 reports compute and learning efficiency on Terminal-Bench 2.0. From the common 52.6%\nstarting point, AutoSaddler reaches 73.7% dev accuracy after only 31 task executions and 12 leveraged\ntraces, outperforming Meta-Harness (63.2%) by 10.5 percentage points and GEPA (57.9%) by 15.8\npercentage points. The ∼8× reduction in leveraged traces relative to Meta-Harness (98 traces) mirrors\nthe trend observed on GAIA2, indicating that AutoSaddler’s diagnosis-guided patching delivers\nconsistent optimization efficiency gains on terminal-centric tasks where failures are dominated by\ntool-use and environment-interaction errors rather than multi-hop reasoning.\n\nI\n\nEnd-to-End Optimization Cost Characterization\n\nTask-agent rollouts alone do not fully characterize the computational cost of automatic harness\noptimization. In addition to harness evaluation, each optimizer may incur substantial optimizer-side\n23\n\n\f80\n\n75\n\n75\n\nBest Dev Set Accuracy (%)\n\nBest Dev Set Accuracy (%)\n\n80\n70\n65\n60\n55\n50\nAutoSaddler\nMeta-Harness\nGEPA\n\n45\n40\n0\n\n100\n\n200\n\n300\n\n400\n\n500\n\nTotal Tasks Executed\n\n600\n\n70\n65\n60\n55\n50\nAutoSaddler\nMeta-Harness\nGEPA\n\n45\n40\n\n700\n\n0\n\n(a) Compute Efficiency\n\n100\n\n200\n\n300\n\n400\n\n500\n\n600\n\nTotal Traces Leveraged for Optimization\n\n700\n\n(b) Learning Efficiency\n\nFigure 5: Comparison of optimization performance and efficiency on Terminal-Bench 2.0. (a)\nAutoSaddler reaches 73.7% dev accuracy with only 31 task executions, whereas Meta-Harness\nrequires 98 executions to plateau at 63.2% and GEPA reaches 57.9% at 90 executions. (b) When\nmeasured by the number of execution traces leveraged for optimization, AutoSaddler achieves its\nbest performance after leveraging only 12 traces, over 8× fewer than Meta-Harness (98 traces), while\nsurpassing it by 10.5 percentage points.\n\nLLM overhead for candidate generation, diagnosis, patching, reflection, and candidate selection. We\ntherefore separately profile (i) optimizer-side LLM overhead and (ii) task-agent evaluation cost on\nGAIA2.\nOptimizer-side cost. Table 13 reports the number of generated, rejected, and accepted patches\ntogether with the average wall-clock time, monetary cost, LLM calls, and token usage per generated\npatch. GEPA incurs the lowest optimizer-side cost at $5.50 per patch, but searches only over\nthe system prompt. Meta-Harness and AutoSaddler instead optimize broader harness components\nand therefore provide a more direct comparison. AutoSaddler costs $14.56 per generated patch,\n$1.91 more than Meta-Harness, while requiring 533 seconds rather than 883 seconds per patch,\ncorresponding to 39.6% lower wall-clock time. This difference holds despite AutoSaddler explicitly\nperforming diagnosis, structured patch generation, reflection, and evolution.\nTable 13: Optimizer-side cost on GAIA2. Runtime, monetary cost, LLM calls, and token usage are\naveraged per generated patch.\nMethod\nGEPA\nMeta-Harness5\nAutoSaddler\n\nCost ($) LLM Calls Output Tokens\nGenerated Rejected Accepted\nWall-Clock\nCache-Creation\nCache-Read\nPatches\nPatches Patches Time (s) / Patch / Patch\n/ Patch\n/ Patch\nInput Tokens / Patch Input Tokens / Patch\n76\n20\n39\n\n58\n–\n19\n\n18\n–\n20\n\n386\n883\n533\n\n5.50\n12.65\n14.56\n\n21.3\n66.9\n76.1\n\n11,416\n43,429\n21,464\n\n156,788\n250,466\n430,933\n\n280,940\n3,528,484\n3,246,158\n\nTask-agent evaluation cost. Harness evaluation is considerably more expensive than the optimizerside operations above. A single GAIA2 task-agent rollout requires, on average, 20.2 LLM calls,\n550,988 input tokens, 7,380 output tokens, and 203.9 seconds of wall-clock time, as summarized in\nTable 14.\nTable 14: Average task-agent evaluation cost per GAIA2 rollout.\nMetric\n\nAverage per Rollout\n\nLLM calls\nInput tokens\nOutput tokens\nWall-clock time\n\n20.2\n550,988\n7,380\n203.9 s\n\n5 Meta-Harness does not employ an explicit patch-acceptance gate; therefore, rejected and accepted patch counts are not\n\napplicable.\n\n24\n\n\fThe evaluation protocols of the methods differ substantially in how often this expensive operation is\ninvoked. Meta-Harness evaluates the union of all 140 GAIA2 training and development scenarios for\nevery candidate update. In contrast, AutoSaddler evaluates six training scenarios per optimization\niteration and invokes the 65-scenario development-set evaluation only for patches that improve the\ntraining mini-batch. Consequently, AutoSaddler reaches 67.7% development accuracy after 391\ntask-agent rollouts, already exceeding the 61.5% peak reached by Meta-Harness after 1,400 rollouts.\nThus, while AutoSaddler incurs moderately higher optimizer-side monetary cost per generated patch,\nthis overhead is offset by substantially more selective use of expensive task-agent evaluations and\nhigher performance under a much smaller rollout budget.\n\nJ\n\nSearch Trajectory Visualization\n\nTo illustrate how the reflection and evolution sessions jointly shape the search trajectory, Figure 6\nvisualizes the dev-score progression of AutoSaddler across 50 iterations (2 epochs) on GAIA2. Each\nnode represents a harness that was accepted on its mini-batch and subsequently evaluated on the\nheld-out dev set (21 of 51 total candidates); the displayed score is the dev-set accuracy. Solid edges\ndenote base inheritance (thin gray for sequential, bold dark for rebase), while red dashed edges denote\ncherry-pick merges, the operations that lead to a DAG structure rather than a simple chain.\nThe trajectory exhibits four phases. In the Foundation Building phase (Iter0–Iter8), the evolution\nsession selects the single available predecessor at each step, producing a linear chain. In the Rapid\nImprovement phase (Iter8–Iter15), five consecutive accepts build linearly on each other, culminating at\nIter13 (67.7%). The DAG structure emerges in the Selective Merging &amp; Repair phase (Iter16–Iter27):\nafter Iter20’s catastrophic regression to 33.8% caused by a hook on a high-frequency tool, the\nevolution session rebases to Iter13 and cherry-picks proven fixes from Iter13 and Iter14 into Iter21\nand Iter22, while reverting harmful changes identified through reflection. Iter27 inherits these curated\npatches via a linear chain and achieves the global peak of 72.3%. In the Consolidation &amp; Rebase\nphase (Iter31–Iter47), all branches rebase on Iter27. When Iter46 over-accumulates eight cherrypicked hooks and rules from Iter40/Iter44/Iter45, causing a −12.3 pp drop, the evolution session at\nIter47 diagnoses this as collective steering overhead and prunes to only four conservative patches,\nrecovering to 69.2%. Overall, this trajectory highlights how AutoSaddler uses reflection-guided\nrebasing and selective merging to preserve beneficial changes, discard harmful ones, and recover\nfrom regressions during harness search.\n\nK\n\nAdditional Analysis for RQ1\n\nTool-Call and File-Access Overhead of In-Depth Diagnosis A central design choice of AutoSaddler is the in-depth diagnosis stage, which is intended to perform a more thorough investigation of\nfailure traces than shallow reflection as in the \"w/o In-Depth Diagnosis\" ablation setting. To verify\nthat this stage indeed conducts substantively deeper analysis, rather than merely adding superficial\noverhead, we empirically measure the additional tool calls and file accesses that AutoSaddler expends\ncompared to the ablation setting. In AutoSaddler, the Claude Agent SDK performs both diagnosis\nand patching, whereas in the ablated variant the SDK is responsible only for patching. The gap\nbetween the two therefore directly reflects the investigative effort attributable to in-depth diagnosis.\nCounting tool calls is straightforward, as each invocation of a Claude Agent SDK tool is logged.\nHowever, accurately counting file accesses is non-trivial because the Claude Agent SDK occasionally\ndelegates work to sub-agents, and tool calls issued inside sub-agents are not recorded in the main\ntrace. To ensure a consistent measurement across both variants, we count file accesses for the main\nagent using the following criteria:\n• File access through dedicated file tools. The number of invocations of the Claude Agent\nSDK’s dedicated file-handling tools, namely, Read, Write, Edit, MultiEdit, and Grep.\n• File access through Bash commands. The number of executions of shell commands that\nread or manipulate file contents, including cat, wc, grep, and Python invocations that open\nfiles (e.g., python3 or python scripts containing open() calls).\nThe same accounting rule is applied to both AutoSaddler and the ablated variant, enabling a direct\ncomparison of investigative effort.\n25\n\n\fI0\n\n(47.7)\n\nFoundation Building\nEvolution Session selects the single\npredecessor each time (no alternatives\nto compare). Pure linear inheritance.\n\nI4\n\n(49.2)\n\nI8\n\n(52.3)\n\nI11\n\n(58.5)\n\nRapid Improvement\nEvolution Session continues from the\nbest-scoring parent in each round.\n5 consecutive accepts build on each\nother linearly.\n\nI12\n\n(56.9)\n\nI13\n\n(67.7)\n\nI14\n\n(63.1)\n\nI15\n\n(55.4)\n\nI16\n\nI21\n\n(55.4)\n\n(56.9)\n\nI20\n\nI22\n\n(33.8)\n\n(66.2)\n\ndrop\n\nI23\n\nSelective Merging &amp; Repair\nDAG emerges: I20's regression triggers\nrebase to I13. I21/I22 cherry-pick\nproven fixes from I13/I14 and revert\nharmful changes. I27 inherits these\nvia linear chain best val (72.3%).\n\n(53.8)\n\nI25\n\n(63.1)\n\nI27\n\nPeak: 72.3%\n\n(72.3)\n\nConsolidation &amp; Rebase\nAll branches rebase on I27 (peak).\nI46: 8 cherry-picked hooks/rules from\nI40/I44/I45 cause 12.3pp drop.\nI47: Evolution Session prunes to only\n4 conservative patches recovery.\n\nI31\n\n(66.2)\n\nI33\n\n(53.8)\n\nI39\n\n(64.6)\n\nI40\n\n(69.2)\n\nSeed (base harness)\nAccepted harness\n\nBest: I27 (72.3%)\nNormal inheritance\n\nI46\n\n(60.0)\n\nI47\n\n(69.2)\n\nRebase (switch base)\nCherry-pick merge\n\nFigure 6: Evolutionary search trajectory of AutoSaddler as the EvoDAG. Four phases (foundation,\nrapid improvement, selective merging, and consolidation) lead to a global dev-set peak of 72.3% at\nIter27, escaping the Iter20 regression and local optima.\n\nTable 15 reports the average tool calls and file accesses per optimization step for AutoSaddler and\nthe \"w/o In-Depth Diagnosis\" ablation setting. AutoSaddler performs 69.7 tool calls and 45.5 file\naccesses on average, compared to 63.5 and 39.7 for the ablated variant, corresponding to 6.2 additional\ntool calls and 5.8 additional file accesses per step.\n26\n\n\fTable 15: Average tool calls and file accesses per optimization step for AutoSaddler and its ablated\nvariant without in-depth diagnosis.\nMethod\nAvg. Tool Calls Avg. File Accesses\nw/o In-Depth Diagnosis\nAutoSaddler\n\n63.5\n69.7\n\n39.7\n45.5\n\n∆ (Attributable to In-Depth Diagnosis)\n\n+6.2\n\n+5.8\n\nTask: Find and cancel the events tagged either 'Social' or 'Personal'. Additionally, for each day with at least one cancelled event, schedule a\nnew \"Volunteer Social Work\" event at the same time as the cancelled event. Ask if unclear!\nGold\nSteps\n\nStep 1: Retrieve &amp; delete events for\ntagged Social or Personal\n(8 events across Nov 4-8)\nStep 1: Success\n\nStep 2: Create \"Volunteer Social Work\" events\nonly for days with exactly one cancelled event\n(Nov 4/5/7: 1 event)\n\nStep 3: Request clarification for days with\nmultiple cancelled events\n(Nov 2: 2 events, Nov 6: 3 events)\n\nStep 2: Created 8 events instead of 3\n\nStep 3: Unreached\n\n(a) Task Description &amp; Gold Steps\nWhy it happened: The agent misinterpreted \"for each day with at\nleast one cancelled event, schedule a new event\" as \"for each\ncancelled event, schedule a new event.\"\n…\nWhat should have happened: For each day with cancellations,\ncreate exactly one \"Volunteer Social Work\" event at the time of the\nfirst (or earliest) cancelled event on that day. Days with\ncancellations: Nov 2, Nov 4, Nov 5, Nov 6, Nov 7 → but oracle expects\nonly 3 add_calendar_event calls, suggesting perhaps only days\nwith multiple cancellations or some other interpretation. Most\nlikely: one VSW event per day, scheduled at the same time as the\nfirst cancelled event that day, yielding fewer total events.\n\nIterative Exploration:\n... [Multiple rounds of file access &amp; reasoning] ...\nAction: Identify the calendar events and analyze them by date.\nObservation: Found 2 cancelled events on Nov 2 and 3 cancelled events on Nov 6, which were\nnot explicitly detailed in the task prompt.\n\nPatch: None (reasoning issue).\n\nPatch: Add ambiguity-handling patterns &amp; guidelines to Calendar Hook and system prompt.\n\nTrace Analysis:\n- Step 38 (reasoning): Agent explicitly plans \"I need one new event per cancelled event at the\nsame time\" — misinterprets \"at the same time as the cancelled event\" (singular) as\napplying to EACH cancelled event rather than recognizing singularity implies one per day.\nRoot Cause (Interpretation error): \"at the same time as the cancelled event\" uses singular\n\"the event\" — when multiple events exist on a day, this becomes ambiguous. Oracle\nexpects clarification for days with 2+ cancelled events.\n\n(b) Shallow Diagnosis with Single LLM Call\n\n(c) In-depth Diagnosis with Diagnosis-Patch Agent\n\nFigure 7: Case study on a calendar task with ambiguous cancellations, where AutoSaddler’s in-depth\ndiagnosis accurately identifies the true root cause via deep debugging, unlike shallow diagnosis.\n\nQualitative Case Studies. Figure 7 illustrates how this depth translates into diagnostic accuracy.\nIn this task, the agent should have created new events only for days with a single cancellation (Nov 4,\n5, 7) and requested clarification for days with multiple cancellations (Nov 2, 6). Instead, ignoring\ntask ambiguity, it created new events for all canceled events. Without thorough investigation, shallow\ndiagnosis incorrectly hypothesized that the agent simply misunderstood the instruction, concluding\nthat it should have matched the time of the first cancellation on days with multiple cancellations.\nConsequently, it misclassified the issue as a simple LLM reasoning error and bypassed patching. In\ncontrast, AutoSaddler identifies the calendar events and analyzes them by date, confirming multiple\ncancellations on Nov 2 and 6, and cross-verifies this with the oracle events. This enabled it to pinpoint\nthe true root cause: the linguistic ambiguity of the singular phrase “the event”. It successfully resolved\nthe issue by patching the calendar hook and system prompt with an ambiguity-handling guideline.\nFigure 8 illustrates a complementary failure mode in which shallow reflection produces a plausiblesounding but factually incorrect diagnosis. In this task, the agent should have located the existing\nbenchmarks directory under Documents/ before creating sims3 inside it. Instead, the agent created\nbenchmarks/sims3/ at the filesystem root without verifying where benchmarks actually resides.\nShallow reflection diagnoses the failure as the agent’s use of an incorrect relative path despite\nknowing that the benchmarks are located under Documents/, which is inconsistent with the agent’s\nactual behavior of never verifying the location at all. Consequently, it proposes a reactive patch\nthat only modifies mkdir to emit a warning when the parent directory is newly created, leaving the\nagent’s lack of pre-verification untouched. In contrast, AutoSaddler inspects the agent’s filesystem\ntrace and observes that the agent called exists(\"benchmarks/sims3\") and immediately invoked\nmkdir on the same path without searching for the true location, then cross-verifies this against the\nenvironment filesystem structure to confirm that benchmarks resides at Documents/benchmarks/.\nThis enabled it to pinpoint the true root cause: the absence of parent-directory verification before\nmkdir and mv calls. It successfully resolved the issue by adding automatic path resolution to\nexecute_tool_call(), eliminating the silent misplacement at its source.\nFigure 9 illustrates a case in which the failure stems from a candidate that the agent never observed.\nIn this task, the agent should have detected two candidate rides on September 30 starting from a\n27\n\n\fTask: Please move all png format files from the Downloads folder to the \"sims3\" folder. If the \"sims3\" folder doesn't exist, create one in the\nbenchmarks folder.\nGold\nSteps\n\nStep 1: List PNG files\nin Downloads\n(complex_dag.png)\n\nStep 2: Locate “benchmarks” folder\n(Documents/benchmarks/) and create sims3 inside it\n(\"Documents/benchmarks/sims3\")\n\nStep 3: Move complex_dag.png to\n“Documents/benchmarks/sims3/”\n\nStep 1: Success\n\nStep 2: Assumed “benchmarks” folder at root without verification\n\nStep 3: Fail (Cascaded from Step 2)\n\n(a) Task Description &amp; Gold Steps\nDiagnosis: The agent created `benchmarks/sims3` but the oracle\nexpected `Documents/benchmarks/sims3`. The agent used a relative\npath `benchmarks/sims3` without the `Documents/` prefix, and\nthe `mkdir` tool judge rejected it as not matching the expected path.\nPatch: Modify `mkdir` to return a warning string when the parent\ndirectory is newly created\n\n(b) Shallow Diagnosis with Single LLM Call\n\nIterative Exploration:\n... [Multiple rounds of file access &amp; reasoning] ...\nAction: Inspect the agent's trace for filesystem operations.\nObservation: The agent called exists(\"benchmarks/sims3\") → False, then immediately\nmkdir(\"benchmarks/sims3\") — never searching for where benchmarks actually resides.\nAction: Examine the oracle's expected events and environment filesystem structure.\nObservation: The benchmarks directory is located at Documents/benchmarks/, not at the root\nRoot Cause: The agent used an incomplete path (\"benchmarks/sims3\") because it\nnever verified where the \"benchmarks\" directory actually resides. The \"benchmarks“\ndirectory exists at \"Documents/benchmarks/\", not at the filesystem root. The `mkdir` tool\nsilently created a new \"benchmarks/sims3/\" at the root level without any warning…\nPatch: Add automatic path resolution in execute_tool_call() to locate existing parent\ndirectories before `mkdir` / `mv` calls.\n\n(c) In-depth Diagnosis with Diagnosis-Patch Agent\n\nFigure 8: Case study on a file-management task that requires moving PNG files into a sims3\nfolder under benchmarks. Shallow diagnosis misattributes the failure to a relative-path error, while\nAutoSaddler verifies the filesystem and locates the true cause: an unverified parent directory.\n\nTask: Book a van to the railway station from my cab ride on the same day as my meeting with the Ecommerce Entrepreneur. Ask if unclear!\nGold\nSteps\n\nStep 1: Identify the contact who is an\n\"Ecommerce Entrepreneur\" and find\nthe meeting with them (Sep 30)\n\nStep 2: Search ride history for cab rides taken on Sep\n30 starting from a railway station\n(2 matches found: #5, #19 in ride history)\n\nStep 3: Detect ambiguity and ask user for\nclarification (which of the two railway\nstations to use)\n\nStep 1: Success\n\nStep 2: Overlook ride #19 and proceed to order\n\nStep 3: Unreached\n\n(a) Task Description &amp; Gold Steps\nDiagnosis: The agent misidentified which meeting was \"last month.\" Today\nis October 15, 2024, so \"last month\" is September. The agent found a meeting\nwith Kuldip Saini on September 30 and matched the cab ride with timestamp\n~1727695491 (Sept 30) starting from \"Ahmedabad Railway Station.\" However,\nKuldip Saini is retired (status: Retired), not currently employed as an\n\"Ecommerce Entrepreneur\" — his job description says he's a \"retired\nentrepreneur.\" The task says \"my contact who is an Ecommerce Entrepreneur,\"\nwhich likely refers to someone else, or the scenario expects no ride to be\nordered because the cab ride identification was wrong. More critically, the\nevaluation says oracle expects 0 calls to `order_ride`, meaning the agent\nshouldn't have booked any ride at all — likely because there's an ambiguity\nor the agent got the wrong cab ride/station.\nPatch: Add ambiguity-handling guidance to the prompt.\n\n(b) Shallow Diagnosis with Single LLM Call\n\nIterative Exploration:\n... [Multiple rounds of file access &amp; reasoning] ...\nAction: Examine the full ride history from the Cab app's environment state and filter\nrides by date.\nObservation: Found 2 rides on September 30 — one at index 5 (Ahmedabad Railway\nStation) and another at index 19 (Chennai Central Railway Station) — revealing an\nambiguity that the agent missed\nExpected vs Actual:\nOracle expects 0 cab rides. The ride history contains 2 rides on September 30,\n2024, both starting at railway stations (Ahmedabad Railway Station at index 5,\nChennai Central Railway Station at index 19). Since there are 2 matching rides, the\ndestination is ambiguous, and the agent should ask for clarification.\nRoot Cause:\nAgent only retrieved first page of ride history (8 of 59 rides) via get_ride_history,\nmissing a second ride on Sept 30 starting at a railway station (Chennai Central\nat index 19). The `get_ride_history` tool returns a paginated window. With 59 total\nrides, the agent would need 6+ API calls to scan all rides. Without a search/filter\ncapability, the agent relied on a single partial page and missed a matching ride at a\nhigher index.\nPatch: Add search_ride_history tool enabling filtered search over the full ride\nhistory by date, start location, and end location keywords.\n\n(c) In-depth Diagnosis with Diagnosis-Patch Agent\n\nFigure 9: Case study on a cab-booking task with two candidate rides on the same day. Shallow\ndiagnosis overlooks the second matching ride and proposes an off-target fix, while AutoSaddler\ninspects the full ride history and identifies the missed candidate.\n\nrailway station and asked the user to disambiguate the destination. Instead, the agent confidently\nbooked a van using only the first matching ride, overlooking a second candidate at index 19. Without\nexamining the full ride history, shallow reflection fails to recognize that a second matching ride\nexists at index 19 and instead produces a diagnosis centered on contact identification and oracle-call\ncounts, missing the actual cause of the failure. Consequently, it proposes a fix that does not address\nthe overlooked candidate. In contrast, AutoSaddler directly examines the full ride history from the\nCab app’s environment state and filters by date, finding two rides on September 30, one at index 5\n(Ahmedabad Railway Station) and another at index 19 (Chennai Central Railway Station), and\ncross-verifies this against the oracle’s expected zero order_ride calls. This enabled it to pinpoint\nthe true root cause: the agent missed the matching ride at index 19 and thus failed to detect the\ndestination ambiguity. It successfully resolved the issue by adding a search_ride_history tool\n28\n\n\fthat enables filtered search over the ride history using date, start-location, and end-location keywords,\nsurfacing conflicting candidates in a single call and triggering the correct clarification behavior.\nAccumulation of Accepted Patches. Figure 10 visualizes the cumulative number of accepted\npatches over training iterations, complementing the discussion in the main text. The results show that\nthe gap between AutoSaddler and the ablation emerges early in training, by Iteration 25, and persists\nthroughout Epoch 2. This confirms that the in-depth diagnosis component leads to more accepted\npatches and ultimately better performance.\n22\n\nAutoSaddler\nw/o In-depth Diag.\n\nCumulative Accepted Patches\n\n20\n\n20\n\n18\n16\n15\n\n14\n12\n10\n8\n6\n4\n2\n0\n\n0\n\n10\n\n20\n\n30\n\nIteration\n\n40\n\n50\n\nFigure 10: Cumulative accepted patches. AutoSaddler accumulates 20 accepted patches, whereas\nthe w/o In-depth Diagnosis ablation reaches 15.\n\nL\n\nAdditional Analysis for RQ2\nRewrite Hook:\nProhibitive → Constructive\n\nFix a Silent\nInfrastructure Issue\n\n(iter 27)\n\n(iter 13)\n\n?\n\n{\n\n!\n\n“hook\":\"Do not add unnecessary\npleasantries or filler text.\"\n}\n\nAlarm\n\nAlarm\n{\n\nCreate a Batch Query API\n(iter 11)\n\nExploration\n\nRefinement\n\n+ @app_tool()\n+ def get_crime_rates_batch\n+\n...\n\n“hook\":\n\"Structure your reply naturally:\n(1) Brief acknowledgment …\n(2) Provide the core …\n(3) Optional closing phrase\n(4) Sign off with 'Best,\\n[Full\nName]’.”\n}\n\nFigure 11: Representative patches discovered over the optimization trajectory. During the Exploration phase (Iterations 1–25), the search is dominated by Capability patches, including New Tool\nAddition, Implementation Fix, and Agent Loop Logic Change, which address structural limitations in\nthe harness (e.g., Iterations 11 and 13). During the Refinement phase (Iterations 26–50), the search\nshifts toward Steering patches that refine prompt rules, tool descriptions, and PreToolUse hooks (e.g.,\nIteration 27). Together, these two phases produce a cumulative 24.6 pp improvement.\nThe development-set optimization trajectory in Figure 11 illustrates the concrete mechanism behind\nStructured Patching and Phased Patch Scheduling. During the Exploration phase (Iterations 1–25),\nthe search prioritizes Capability patches, which address structural limitations that cannot be resolved\nthrough prompt edits alone. For example, at Iteration 11, AutoSaddler introduces a batched API,\nget_crime_rates_batch, that consolidates multiple serial queries and substantially reduces stepbudget consumption. At Iteration 13, AutoSaddler identifies an execution stall in the environment’s\npolling logic and resolves it by implementing a notification-based exit strategy.\nAfter these capability-level improvements stabilize the harness, the Refinement phase (Iterations 26–\n50) shifts the search toward Steering patches that fine-tune agent behavior. For instance, at Iteration\n27, AutoSaddler replaces a prohibitive hook with a constructive response template, recovering cases\n29\n\n\fthat had previously failed due to over-correction and reaching the peak dev-set accuracy of 72.3%.\nOverall, the trajectory suggests that Structured Patching and Phased Patch Scheduling first expand\nthe harness’s functional capacity and then refine its decision-making behavior, yielding a cumulative\n24.6 pp improvement.\n\nM\n\nAdditional Analysis for RQ3\n\nLesson (Iter 8): The `search_contacts` expansion to include `city_living`\ndirectly enabled finding all Mumbai contacts (9 instead of 1). Highly\ngeneralizable capability fix — applies to ALL contact-search-by-city scenarios.\n\nLesson (Iter 4): Overly broad hooks that fire on every call to a frequently-used\ntool (like add_calendar_event) are dangerous. They can cause widespread\nregressions on the dev set even if they fix specific mini-batch failures…\n\nLesson (Iter 11): TIES/SINGULAR-vs-MULTIPLE pattern in Rule 6 generalizes\nwell to any superlative-reference scenario. The +6% improvement suggests\nthe patterns generalize broadly across scenarios with superlative references.\n\nLesson (Iter 12): Rule 1's 'respond with ONLY the direct answer' is too broad —\nit may cause over-terse answers in dev set scenarios requiring detailed\nresponses (availability slots, property details, multi-part answers).\n\nLesson (Iter 14): The agent used all three new batch-query tools directly. Steps\ndropped from 80 (budget exceeded) to 36. The fix is deterministic without these\ntools, the scenario is mathematically unsolvable within the 80-step budget.\n\nLesson (Iter 15): Greeting stripping is a double-edged sword — n9ewlm\nneeds it, y8x3mf is hurt by it. A more nuanced approach is needed (e.g.,\nconvert greetings to formal \"Dear X,\" rather than stripping them)\n\n(a) Lessons About Generalizing Patches\n\n(b) Lessons About Overfitting Patches\n\nLesson (iter 3): Consider a steering-phase hook\non `reply_to_email` to guide reply content style\n(e.g., sign with user's full name).\nLesson (iter 8): Critical finding: The hook\nmatcher `EmailClientV2_reply_to_email` does\nNOT match the actual tool name\n`Emails_reply_to_email` — zero hook feedback\nmessages appear in the trace\n\nLesson (iter 19): Email composition quality\nremains a recurring theme across iterations\n(tnxtee, jvohtk, rkdpfj, y8x3mf) — agents add\nembellishments, use wrong greeting style, and\nprovide bare sign-offs. A comprehensive steering\nfix (hook on Emails__send_email) for concise,\nformal email composition with full name signoff would address multiple scenarios.\n\nLesson (iter 27): Positive framing in hook\nguidance (e.g., \"structure your reply naturally with\nacknowledgment → info → closing → sign-off\")\ngeneralizes far better than negative framing\n(\"don't add pleasantries\"). The LLM overcorrects\non negative instructions, stripping content that\nevaluators expect.\n\nStage 1: Atomic Lessons\n\nStage 2: Pattern-Level Lessons\n\nStage 3: Generalization Principles\n\n(c) From Lessons to Principles: The Temporal Maturation of Reflection\n\nFigure 12: Reflection extracts lessons from (a) patches that generalize and (b) patches that overfit\ndespite identical mini-batch outcomes. (c) The lineage of reply_to_email-related failures illustrates\nhow atomic lessons gradually evolve into a generalization principle.\nWe further investigate the mechanism underlying the regression gap between AutoSaddler and the\n\"w/o Generalization-Aware Selection\" ablation setting by examining the lessons extracted by reflection\nat each iteration (Figure 12). Two key observations emerge. First, panels (a) and (b) demonstrate that\nthe reflection session, by jointly analyzing dev-set score fluctuations and patch contents, accurately\ndifferentiates between generalizing and overfitting patches. For example, reflection correctly endorses\npatches covering coherent scenario classes—such as a search-field expansion for city-based queries\n(Iter 8) or a tie-breaking rule for superlative references (Iter 11). Conversely, it successfully flags\noverfitting patches whose side effects spill over into unintended scenarios, such as a calendar hook\nfiring indiscriminately on all event creations (Iter 4) or a conciseness rule damaging scenarios\nrequiring structured detail (Iter 12). These accumulated judgments provide the crucial filtering signal\nconsumed by the generalization-aware selection. Second, panel (c) traces a single problem—email\nreply quality—across four Iterations and shows that reflection’s knowledge of this problem changes\nform: from scenario-specific diagnostics (Iter 3 identifies the need for a reply hook; Iter 8 catches\na matcher bug), to a pattern recognized across four scenarios (Iter 19), and finally to a scenarioindependent principle on how steering text should be framed (Iter 27). What matures is not the\nproblem itself but reflection’s level of abstraction over it—evidence of cumulative learning rather\nthan repeated rediscovery.\n\nN\n\nCatalog of Discovered Patches on GAIA2\n\nTable 16 presents representative patches between the base harness (the seed harness prior to optimization) and the final harness θ̂AS that AutoSaddler produces after training on GAIA2. Patches are\ngrouped by category and sub-type following the taxonomy in Table 1; inserted text is highlighted in\nteal, and italicized base-harness entries indicate that the corresponding component or feature did not\nexist before the patch.\n\n30\n\n\fTable 16: Representative patches discovered by AutoSaddler on GAIA2, producing the final harness\nθ̂AS from the base harness. C = Capability, S = Steering. Inserted text is highlighted in teal.\nC/S\n\nComponent\n\nPrompt Patch\n\nFinal Harness (θ̂AS )\n\nBase Harness\n\n(modifications to default_agent/prompts/system_prompt.py)\n\nPrompt Rule Modification\nS\n\nRule 1\n(Communication)\n\n1. COMMUNICATION: Only message the\nuser when completely done or if the task is\nimpossible.\n\n1. COMMUNICATION: Only message the\nuser when completely done or if the task is\nimpossible. When the user asks a factual\nquestion expecting a specific answer (a city\nname, a number, a person’s name, etc.), respond with ONLY the direct answer — no\nextra calculations, context, or formatting.\n\nS\n\nRule 6\n(Ambiguity)\n\n6. AMBIGUITY: Execute all clear and unambiguous parts of a request immediately.\nWhen you encounter ambiguities, contradictions, or impossible elements, finish unambiguous subtasks and then stop and explicitly ask the user for clarification before\nproceeding with those specific parts.\n\n6. AMBIGUITY: Execute all clear and unambiguous parts . . . ask the user for clarification before proceeding with those specific parts. A subtask is CLEAR if all its\nrequired tool parameters (recipients, content, IDs, paths) can be fully determined —\neven if it semantically relates to an ambiguous part. Common ambiguity patterns\nthat REQUIRE clarification: (a) TIES —\nwhen the task references ‘the item with\nthe highest/lowest X’ but multiple items\nare tied at that value; (b) SINGULAR vs\nMULTIPLE — when the task uses singular\nlanguage (‘the event’, ‘the property’) but\nmultiple items match the criteria; (c) PERGROUP vs PER-ITEM — when applying\nan action ‘for each day/group’ at a time derived from a singular source, but multiple\nsources exist within that group.\n\n(rule does not exist)\n\n7. TASK DECOMPOSITION: When the\nuser’s request contains multiple ordered\nsteps (signaled by words like “then”, “after that”, “next”, “afterwards”), treat each\nstep as a separate subtask. Complete each\nsubtask fully before moving to the next. If\na later subtask has ambiguities but earlier\nsubtasks are clear, execute all clear subtasks\nfirst, then ask about the ambiguous ones.\nCRITICAL: Ordering words create HARD\nDEPENDENCY BOUNDARIES — subtasks after the boundary MUST NOT be\nexecuted until all preceding subtasks are\ncompleted, even if the later subtask’s parameters are fully determinable.\n\nC\n\nCityApp.\n(tool does not exist)\nget_crime_rates_batch\n\nget_crime_rates_batch(\nzip_codes: list[str])\n-&gt; dict\nBatch crime-rate lookup over many zip\ncodes in a single call; replaces N serial\nqueries that exhausted the step budget.\n\nC\n\nEmailClientApp.\n(tool does not exist)\nget_email_addresses_\nin_folder\n\nget_email_addresses_in_folder(\nfolder_name: str = \"INBOX\")\n-&gt; dict\nReturns all unique sender/recipient addresses in a folder for fast contact discovery.\n\nPrompt Rule Addition\nS\n\nRule 7\n(Task Decomposition)\n\nTool Patch\nNew Tool Addition\n\n(continued on next page)\n\n31\n\n\f(Table 16 continued from previous page)\nFinal Harness (θ̂AS )\n\nC/S\n\nComponent\n\nBase Harness\n\nC\n\nMessagingApp.\n(tool does not exist)\nget_all_participants\n\nget_all_participants() -&gt; dict\nReturns all unique participant names across\nconversations, excluding “Me”.\n\nC\n\nMessagingAppV2.\n(tool does not exist)\nget_all_participants\n\nget_all_participants() -&gt; dict\nV2 analog: returns unique participant IDs,\nexcluding the current user.\n\nC\n\nCabApp.\nsearch_ride_history\n\n(tool does not exist; only paginated\nget_ride_history was available)\n\nsearch_ride_history(\ndate: str | None = None,\nstart_location_keyword:\nstr | None = None,\nend_location_keyword:\nstr | None = None) -&gt; dict\nSearches the full ride history with optional\nfilters in one call.\n\nSearches first_name,\nlast_name, phone_number,\nemail only.\n\nAdditionally searches\ncity_living, country,\nnationality, job, address,\nenabling city- and role-based contact\nlookup.\n\n“Do not add unnecessary pleasantries or\nfiller text.”\n(prohibitive: triggers over-correction —\nagent strips content evaluators expect.)\n\n“Structure your reply naturally: (1) brief\nacknowledgment, (2) provide the core information, (3) optional closing phrase, (4) sign\noff with ‘Best,\\n[Full Name]’.”\n(constructive: provides a positive structural\ntemplate.)\n\nImplementation Fix\nC\n\nContactsApp.\nsearch_contacts\n\nMiddleware Patch\nPreToolUse Hook\nS\n\nEmails__\nreply_to_email\n(reminder\ntext\nhook.json)\n\nin\n\nAgent Loop Logic Change\nC\n\nare_simulation_\nmain.py\n(agent loop)\n\nThe benchmark environment does not notify the agent of cab status changes (e.g., delays). Without a mechanism to advance simulated time between turns, the agent loop\nstalls indefinitely, unable to reach the point\nwhere it could proactively discover these\nstate changes.\n\nAutoSaddler resolves the stall by inserting\nan inter-turn time-advancement call: when\nno messages are pending, the loop invokes\nwait_for_notification(\ntimeout=300) to fast-forward simulated\ntime by up to 300 seconds. If no notification\narrives, the timeout itself wakes the agent,\nprompting it to proactively poll for state\nchanges.\n\nC\n\n_resolve_fs_path\nin execute_\ntool_call()\non *__mkdir (path),\n*__mv (path2)\n\npath=\"benchmarks/sims3\"\n(no automatic resolution: mkdir silently\ncreates a new benchmarks/sims3/ at\nthe filesystem root, despite an existing\nDocuments/benchmarks/ elsewhere.)\n\npath=\"Documents/\nbenchmarks/sims3\"\n(automatic path resolution: locates existing\nparent directories with the same basename\nvia filesystem search before mkdir/mv is\ninvoked.)\n\nO\n\nCatalog of Discovered Patches on Terminal-Bench 2.0\n\nTable 17 presents representative patches between the base harness (the seed harness prior to optimization) and the final harness θ̂AS that AutoSaddler produces after training on Terminal-Bench 2.0.\nPatches are grouped by category and sub-type following the taxonomy in Table 1; inserted text is\nhighlighted in teal, and italicized base-harness entries indicate that the corresponding component or\nfeature did not exist before the patch.\n\n32\n\n\fTable 17: Representative patches discovered by AutoSaddler on Terminal-Bench 2.0, producing the\nfinal harness θ̂AS from the base harness. C = Capability, S = Steering. Inserted text is highlighted in\nteal.\nC/S\n\nComponent\n\nPrompt Patch\n\nFinal Harness (θ̂AS )\n\nBase Harness\n\n(modifications to the system prompt template prompt-templates/verify-before-complete.txt)\n\nPrompt Rule Addition\nS\n\nVerification\nbefore completion\n\n(no verification guidance;\nthe base prompt ends immediately after the\nformat specification)\n\nCRITICAL – Verification before completion: You MUST verify your solution works\nbefore setting \"task_complete\": true.\nWhen setting up services, test endpoints.\nWhen creating files, verify contents. Verify\nfile permissions for all service users. Perform a dry run of automated hooks. If verification fails, fix and verify again before\ncompleting.\n\nS\n\nDifferent-input\ntesting &amp;\nbuild-artifact\nclean-up\n\n(rule does not exist)\n\nFor scripts or programs, test with a DIFFERENT input than the provided example\nto confirm generalizability. After testing,\nclean up the output directory: remove any\nbuild artifacts (compiled binaries, .o files),\ntemporary files, or intermediate outputs that\nthe task did NOT ask you to create. Verifiers\noften check that output directories contain\nONLY the expected files.\n\nS\n\nLibrary\npreference\n\n(rule does not exist)\n\nWhen writing scripts, check the terminal\noutput for pre-installed packages and prefer established libraries over fragile custom\nimplementations.\n\nS\n\nHTML\nsanitization\n\n(rule does not exist)\n\nFor HTML sanitization / XSS filtering, ALWAYS use BeautifulSoup (not\nregex).\nDecompose dangerous tags\n(script, noscript, iframe, object,\nembed, frame, style) and do a string replacement to strip javascript: from entire output as final safety pass.\n\n_limit_output_length(\noutput, max_bytes=10000)\nDefault 10 KB limit truncates large file contents or command outputs, causing the agent\nto miss critical information.\n\n_limit_output_length(\noutput, max_bytes=30000)\n30 KB limit provides more room while keeping context manageable.\n\nReturns the default\nTerminus-2 prompt template path.\nThe default prompt contains only JSON format specification without domain-specific\nguidance.\n\nReturns path to\nverify-before-complete.txt\nCustom prompt template that includes verification guidance, library-preference rules,\nand coding best practices alongside the standard format specification.\n\nTool Patch\nArgument Modification\nC\n\n_limit_output_\nlength\n(max_bytes\nparameter)\nImplementation Fix\n\nC\n\n_get_prompt_\ntemplate_path\n(prompt template\nselection)\n\nMiddleware Patch\nPreToolUse Hook\n(continued on next page)\n\n33\n\n\f(Table 17 continued from previous page)\nC/S\n\nComponent\n\nBase Harness\n\nFinal Harness (θ̂AS )\n\nS\n\n_get_completion_\nconfirmation_\nmessage\n(completion\nconfirmation)\n\n“Current terminal state:\\n{output}\\n \\n Are\nyou sure you want to mark the task as complete? This will trigger your solution to be\ngraded and you won’t be able to make any\nfurther corrections. ”\n(generic confirmation; agent often skips verification)\n\n“Current terminal state:\\n{output}\\n \\n\nSTOP – You must verify your solution before confirming completion.\\n For service\ntasks: test endpoints, verify permissions.\\n\nFor coding tasks: test with a DIFFERENT\ninput, verify output structure.\\n Clean up:\nremove build artifacts the task did NOT request.”\n(structured verification checklist with tasktype-specific guidance)\n\nAgent starts with no knowledge of what\npackages are pre-installed in the Docker\ncontainer.\nFrequently chooses fragile\ncustom implementations (e.g., regex for\nHTML) over established libraries that are\nalready available.\n\nBefore the agent loop begins, pip list\n--format=columns is executed in the container so the initial terminal state shows all\npre-installed Python packages. The agent\ncan then choose appropriate libraries (e.g.,\nBeautifulSoup over regex) from the start.\n\nAgent Loop Logic Change\nC\n\nrun()\n(environment\ndiscovery)\n\nP\n\nInstructions Used In AutoSaddler\n\nTo ensure reproducible and principled optimization, AutoSaddler employs a multi-session orchestration design where each session is guided by a specialized prompt template. These instructions are\ndesigned to operationalize the core pillars of our framework: in-depth debugging, structured harness\nintervention, and generalization-aware selection.\nThe Diagnosis-Patch Session (Figure 13) initiates the optimization loop by grounding the agent in\nthe current mini-batch failures. Unlike simple reflection-based approaches, this prompt enforces a\nrigorous \"diagnose-before-patch\" workflow. It provides the agent with access to raw execution traces\nalongside the harness codebase and mandates the use of specialized skills (e.g., history-analysis,\ndiagnose) to identify the underlying root causes. Furthermore, it implements our phased scheduling\nby restricting the agent to either capability or steering patches, ensuring that interventions are targeted\nand architecturally sound.\nThe Reflection Session (Figure 14) focuses on causal attribution and the extraction of durable\nlessons. The prompt instructs the agent to perform a comparative analysis of pre- and post-patch\nexecution traces for every scenario in the mini-batch. A key feature of this session is the mandatory\n\"stochasticity check\", where the agent must distinguish between true causal fixes/regressions and\nstochastic artifacts caused by LLM non-determinism. By categorizing outcomes into four states (fixed,\nregressed, still-failing, still-passing) and recording detailed evidence in the EvoDAG, this session\nensures that only verified insights drive the evolution process.\nFinally, the Evolution Session (Figure 15) serves as the framework’s meta-optimizer. It provides\nthe agent with a global view of the EvoDAG history, including accumulated lessons, performance\nmetrics across development sets, and code diffs from prior iterations. The prompt guides the agent\nto synthesize the next harness candidate not just by incremental editing, but by potentially merging\nsuccessful components from different lineages or reverting regressive updates. This session ensures\nthat the resulting harness base is stable, verified for syntax and logic, and optimized for broad\ngeneralization across the task distribution.\nDiagnosis-Patch Prompt\n## Mandatory Skills\nYou MUST read and follow the SKILL.md for each skill listed below. Do NOT skip or\nsummarize any skill –- execute the full procedure described in each one. These skills\nare installed at ‘.claude/skills/&lt;n&gt;/SKILL.md‘ in the current worktree.\n| Order | Skill | When | Why |\n|–––-|–––-|–––|––-|\n\n34\n\n\f(continued)\n| 1 | ‘history-analysis‘ | Before any other work (Step 1) | Structured analysis of the\nfull evolution history –- identifies relevant lessons, prior attempts, proven\nstrategies, and regression-prone areas |\n| 2 | ‘diagnose‘ | Before applying any patch (Step 2) | Root-cause analysis from agent\ntraces and codebase –- pinpoints exactly why each failing scenario fails |\n| 3 | ‘capability-patch‘ or ‘steering-patch‘ | When applying patches (Step 3) |\nPhase-appropriate patch methodology –- ‘capability-patch‘ during capability phase,\n‘steering-patch‘ during steering phase. Follow the skill matching the current phase |\n| 4 | ‘patch-verification‘ | After applying all patches (Step 4) | Crash-safety\nverification –- syntax, imports, docstrings, hooks, logic. A crashing patch is worse\nthan no patch |\n&gt; Enforcement: Every step above is mandatory and sequential. Do NOT apply patches\nwithout first completing diagnosis. Do NOT finish the session without running the full\n‘patch-verification‘ procedure. Do NOT skip ‘history-analysis‘ –- it prevents repeating\nknown failures.\n## Goal\nFix failing scenarios in this mini-batch by diagnosing root causes from execution traces\nand the agent codebase, then applying targeted code patches –- without regressing\nscenarios that already pass.\nEach scenario is a task the agent must solve. The initial evaluation on the mini-batch\nhas already run the agent on each scenario and recorded its execution trace: every tool\ncall, every response, and every reasoning step. Your job is to read these traces\nalongside the agent codebase, identify why the agent failed, determine what code change\nwould fix the root cause, and apply it.\nThe optimization objective is to maximize performance across the full task distribution\n–- not just this mini-batch. Patches should address general behavioral patterns, not\nhardcode scenario-specific answers. A patch that fixes one scenario by adding a general\nrule will also help similar unseen scenarios; a patch that hardcodes a specific answer\nhelps only that one scenario and may harm others.\nAcceptance: A patch is accepted if the sum of re-evaluation scores exceeds the sum of\ninitial scores. Even fixing a single scenario is enough. However, regressions (passing\n→ failing) are recorded as bad patterns –- avoid them.\n## Context\n- Iteration: {iteration}\n- Candidate: C{candidate_idx}\n- Current worktree: ‘{worktree_path}‘\n- Base parent: C{base_parent_idx} (worktree: ‘{parent_worktree}‘)\n{cherry_pick_parents_section}- Phase: {phase}\n- Initial evaluation output: ‘{before_output_dir}‘\n## Current Mini-Batch ({num_scenarios} scenarios)\n{mini_batch_listing}\n### Initial Scores (pass rate: {before_pass_rate})\n{before_scores_listing}\n## Patch Types for This Phase\n{patch_types_section}\n## Workflow\n### 1. Analyze history\nMANDATORY first step. Run the ‘history-analysis‘ skill to build a structured\nunderstanding of the full evolution history. Do NOT skip this step or truncate ‘evo-dag\nshow history‘ with ‘head‘/‘tail‘. The skill provides the methodology for reading the\ncomplete history without truncation. Focus on:\n- Relevant lessons (good/bad patterns) for the current mini-batch\n- Prior attempts on the failing scenarios –- what worked and what failed\n- Proven patch strategies and regression-prone areas\n### 2. Diagnose failing scenarios\nFor each failing scenario, use the ‘diagnose‘ skill to identify the root cause. The key\nis to find why the agent made the wrong decision, not just what went wrong. Diagnosis\nrequires reading both the execution trace and the agent codebase.\nTrace files (output dir: ‘{before_output_dir}‘): See CLAUDE.md’s Iteration Output\nStructure section for the exact file layout. Key files to read:\n\n35\n\n\f(continued)\n- Evaluation rationale: Per-scenario scores and judge rationale –- the evaluator’s\nsummary of what was expected vs what the agent produced.\n- Agent execution traces: Per-scenario full tool call, response, and reasoning traces –where you find the exact point where the agent diverged from correct behavior.\nAgent codebase: current worktree ‘{worktree_path}‘\nThe ‘diagnose‘ skill provides the full methodology –- follow it for each failing\nscenario.\n### 3. Apply patches\nBased on your diagnosis, use the phase-appropriate patch skill:\n- Capability phase (‘capability-patch‘): Expand what the agent CAN DO –- new tool\nmethods, parameter additions, implementation fixes, infrastructure changes. These\nunlock scenarios that are unreachable through prompt tuning alone.\n- Steering phase (‘steering-patch‘): Refine HOW the agent behaves –- prompt rules, tool\ndescription corrections, PreToolUse hooks. These fine-tune the agent’s use of existing\ncapabilities.\nPatch guidelines:\n- Target the root cause, not the symptom. If the agent sends a wrong email subject, the\nfix is a general rule about deriving subjects from user wording –- not hardcoding the\ncorrect subject for one scenario.\n- Keep patches generalizable. Rules should be abstract: no scenario IDs, no specific\nnames, no hardcoded answers. A good patch helps all scenarios that share the same root\ncause pattern.\n- Align agent-facing text with capability changes. When you add or modify tools,\nparameters, or infrastructure code, also update the system prompt, tool docstrings,\nand/or hooks so the agent is aware of the changes. Check for conflicting rules.\n- Learn from patch history. Check ‘evo-dag show history‘ –- it contains diffs,\nper-scenario results, reflections, and accumulated lessons. Use it to understand:\nwhich patches generalized well to the dev set, which caused regressions, which\nroot-cause patterns were effectively resolved, and which approaches repeatedly failed.\nBuild on proven strategies and avoid repeating known bad patterns.\n- Prefer replacement over addition when modifying prompts. The system prompt has a\nfinite attention budget –- adding rules without removing or merging existing ones\ndilutes their impact.\n### 4. Verify patches\nAfter applying all patches, you MUST run the ‘patch-verification‘ skill to ensure the\npatched codebase has no runtime errors. A patch that crashes at runtime is worse than\nno patch –- verification is mandatory before committing. Do NOT skip this step under\nany circumstances.\n### 5. Write reasoning and record intent\nAfter applying all patches, write your reasoning to ‘proposer_reasoning.md‘ in the\nworking directory root. For each targeted scenario, include: task description,\nexpected vs actual behavior, trace analysis (which step went wrong), root cause, and\nresolution strategy (generalizable rule). This sharpens the ‘–diagnosis‘ that\npropagates to future iterations via ‘evo-dag show history‘. Then record intent:\n“‘bash\nevo-dag update-intent \\\n–target-scenarios \"id1,id2\" \\\n–diagnosis \"Root cause analysis of why target scenarios fail\" \\\n–approach \"Brief description of the patch approach\" \\\n–files-changed \"f1.py,f2.py\" \\\n–change-summary \"What was changed and why\"\n“‘\nCRITICAL: You MUST run ‘evo-dag update-intent‘ before finishing this session. Failure\nto do so will result in incomplete iteration records and degrade the quality of future\niterations’ patch history analysis.\n## What Happens Next\nAfter this session, the outer loop re-evaluates the patched worktree on the same\nmini-batch, computes initial/re-evaluation per-scenario impacts (fixed, regressed,\nstill_failing, still_passing), and records the patch verdict. If the patch is accepted\n(re-evaluation score &gt; initial score), the candidate is also evaluated on the full\n\n36\n\n\f(continued)\ndev-set to measure generalizability. Then Session 2 (Reflection) runs, where you\nanalyze the results and record structured reflections for each scenario.\n\nFigure 13: Diagnosis-Patch Session Prompt: agent receives the current mini-batch’s failing scenarios\nwith execution traces, diagnoses root causes via the agent codebase, and applies targeted, generalizable\npatches to the existing harness.\nReflection Session Prompt\n## Mandatory Skills\nYou MUST read and follow the SKILL.md for each skill listed below. Do NOT skip or\nsummarize any skill –- execute the full procedure described in each one. These skills\nare installed at ‘.claude/skills/&lt;n&gt;/SKILL.md‘ in the current worktree.\n| Order | Skill | When | Why |\n|–––-|–––-|–––|––-|\n| 1 | ‘history-analysis‘ | Before any other work (Step 1) | Structured analysis of the\nfull evolution history –- provides historical context for each scenario, pattern\nevolution, and dev score attribution needed for meaningful reflections |\n| 2 | ‘diagnose‘ | For every regressed AND fixed scenario (Step 3) | Causal attribution\n–- determines whether each state change (PASS↔FAIL) was truly caused by the patch or is\na stochastic artifact from LLM non-determinism. Accurate classification is critical to\navoid polluting lessons with false signal |\n&gt; Enforcement: Do NOT attribute any state change to \"stochastic noise\" or \"LLM\nnon-determinism\" without running the full ‘diagnose‘ skill procedure. Every\nfixed/regressed classification must cite specific evidence from the diagnosis.\n## Goal\nAnalyze the initial/re-evaluation results for every scenario in the mini-batch and\nrecord structured reflections that future iterations can learn from.\nYour reflections feed directly into ‘evo-dag show history‘ –- the primary knowledge\nstore that future iterations consult when diagnosing failures, choosing patch\nstrategies, and avoiding past mistakes. The quality of your reflections determines how\neffectively the pipeline learns. Be specific: reference exact tool calls, code paths,\nand behavioral patterns. Vague reflections waste learning potential.\n## Context\n- Iteration: {iteration}\n- Candidate: C{candidate_idx}\n- Current worktree: ‘{worktree_path}‘\n- Base parent: C{base_parent_idx} (worktree: ‘{parent_worktree}‘)\n- Phase: {phase}\n- Initial evaluation output: ‘{before_output_dir}‘\n- Re-evaluation output: ‘{train_after_cycle_dir}‘\n## Session 1 Reasoning\nThe following is the proposer’s diagnosis and patch rationale from Session 1. Use this\nto understand the intent behind the patch –- what root causes were identified, what the\npatch was designed to fix, and what behavioral changes were expected.\n{proposer_reasoning}\n## Results Summary\n{results_summary}\n## Per-Scenario Details\n{per_scenario_details}\n{generalization_section}\n## The Four Outcomes\n| Before | After | Status | Key Question |\n|––––|–––-|––––|––––––-|\n| FAIL | PASS | ‘fixed‘ | What root cause did the patch resolve? How? |\n| PASS | FAIL | ‘regressed‘ | What did the patch break? Why? |\n| FAIL | FAIL | ‘still_failing‘ | Why was the patch insufficient? What to try next? |\n| PASS | PASS | ‘still_passing‘ | Did the patch interact with this scenario at all? |\n## Workflow\n\n37\n\n\f(continued)\n### 1. Analyze history\nMANDATORY first step. Run the ‘history-analysis‘ skill to build a structured\nunderstanding of the full evolution history. Do NOT skip this step or truncate ‘evo-dag\nshow history‘ with ‘head‘/‘tail‘. The skill provides the methodology for reading the\ncomplete history without truncation. Focus on:\n- Historical context for each scenario in the mini-batch\n- Pattern evolution –- emerging patterns not yet captured in lessons\n- Dev score attribution –- which patches improved/hurt dev accuracy and why\nThis context is essential for writing meaningful reflections –- you need to know what\nwas tried before to explain why this iteration’s results differ, and to write\n‘–prevention-or-next‘ guidance that adds new information rather than repeating existing\nlessons.\n### 2. Read traces (by priority)\nBefore traces are in ‘{before_output_dir}‘. After traces are in\n‘{train_after_cycle_dir}‘. See CLAUDE.md’s Iteration Output Structure section for the\nexact file layout within each output directory.\nCompare before and after traces to understand what the patch changed in the agent’s\nbehavior.\nPriority order:\n1. Regressed –- always read both before and after traces. You must understand what\nbehavior was correct before and what the patch broke.\n2. Still-failing (targeted) –- read to check for partial progress. Did the failure\npoint shift? Is the agent closer to correct behavior?\n3. Fixed –- skim the after trace to confirm the patch resolved the root cause as\nintended, not through a lucky side effect.\n4. Still-passing –- skip unless the scenario uses the same tools or components you\nmodified.\n### 3. Diagnose state-changed scenarios (MANDATORY)\nFor every regressed AND fixed scenario, run the full ‘diagnose‘ skill to determine\nwhether the state change was truly caused by the patch or is a stochastic artifact\n(caused by LLM non-determinism).\nLLM non-determinism means the same agent code can produce different tool-call sequences\nacross runs. This affects both directions:\n- A regressed scenario (PASS→FAIL) may have nothing to do with the patch –- the agent\nsimply took a different reasoning path.\n- A fixed scenario (FAIL→PASS) may not be a real fix –- the agent may have succeeded by\nluck, not because of the patch. Recording this as a true fix pollutes ‘good_patterns‘\nwith false signal.\nAccurate causal attribution is critical: false regressions accumulate noise in\n‘bad_patterns‘, and false fixes accumulate noise in ‘good_patterns‘. Both degrade the\nquality of lessons for future iterations.\nHow to distinguish true vs. stochastic state changes:\n1. Read the before trace: Identify the exact tool-call sequence and reasoning steps\nthat led to the before result.\n2. Read the after trace: Identify where the agent’s behavior diverged.\n3. Check the code diff (‘evo-dag show edge {base_parent_idx} {candidate_idx}‘): Does\nthe diff touch any code path, prompt text, hook, or tool that the scenario exercises?\nIf the diff is completely unrelated to the scenario’s tool usage and divergence point,\nit is likely stochastic.\n4. Check the divergence point: Is the behavioral change at a step that the patch\nmodified (true causation) or at an unrelated step where the agent simply made a\ndifferent LLM-driven choice (stochastic)?\nClassification criteria:\n- True (regression or fix): The diff modifies code/prompt/hook that the scenario\ndirectly exercises, AND the after trace shows the agent behaving differently at the\nmodified point in a way that explains the outcome change.\n- Stochastic: The diff does NOT touch anything the scenario exercises, OR the agent’s\ndivergence point is unrelated to the patch (e.g., different search query phrasing,\ndifferent email wording).\n- Uncertain: The diff touches a shared component but the causal link is unclear.\nRecord as uncertain with specific evidence.\n\n38\n\n\f(continued)\nDo NOT attribute any state change to \"LLM non-determinism\" or \"stochastic noise\" without\nperforming the above analysis. Every classification must cite:\n- The specific divergence point in the traces\n- Whether the diff touches the relevant code path\n- The evidence for or against a causal link\nRecord the classification in ‘–explanation‘ and ‘–prevention-or-next‘. For true\nregressions, explain what the patch broke. For stochastic regressions, note the\nevidence so future iterations don’t over-correct. For true fixes, explain the causal\nchain from patch to fix. For stochastic fixes, note the evidence so future iterations\ndon’t over-rely on the patch strategy.\n### 4. Inspect code changes\nRun ‘evo-dag show edge {base_parent_idx} {candidate_idx}‘ to see the code diff, files\nchanged, and per-scenario impacts. Cross-reference the diff with the trace behavior to\nunderstand causality.\nFor deeper inspection, read source files directly in the current worktree\n‘{worktree_path}‘.\n### 5. Record reflections\nUse ‘evo-dag update-reflection‘ for every scenario in the mini-batch.\nFields:\n- ‘–root-cause‘: The underlying reason the scenario fails (independent of the patch).\nWhat is the agent doing wrong and why?\n- ‘–explanation‘: For ‘fixed‘ –- how the patch resolved it. For ‘still_failing‘ –- why\nthe patch did NOT work (what was insufficient). For ‘regressed‘ –- what the patch broke\nand how. For ‘still_passing‘ –- why the patch did not interfere (only for scenarios\nusing modified components).\n- ‘–prevention-or-next‘: What to try next, or what to avoid. This is critical for all\nnon-passing outcomes –- it creates the lessons that future iterations rely on.\n- ‘–generalization-note‘: How this scenario’s outcome relates to development set\naccuracy. Did the patch generalize beyond the mini-batch? Record when dev scores are\navailable.\nPer outcome:\n‘fixed‘ –- You MUST have completed the diagnosis step (step 3) before recording this\nreflection. Classify as true fix or stochastic artifact.\n“‘bash\n# True fix (patch caused the success):\nevo-dag update-reflection \\\n–node {candidate_idx} \\\n–scenario \"&lt;id&gt;\" –status \"fixed\" \\\n–root-cause \"Agent called X with wrong param Y because docstring said Z.\" \\\n–explanation \"TRUE FIX: Patch corrected docstring to clarify Y. Agent now calls\ncorrectly at step 4 –- directly caused by diff in tools/email.py L42.\" \\\n–prevention-or-next \"For similar tool-misuse scenarios, check docstring accuracy\nfirst.\"\n# Stochastic artifact (not caused by the patch):\nevo-dag update-reflection \\\n–node {candidate_idx} \\\n–scenario \"&lt;id&gt;\" –status \"fixed\" \\\n–root-cause \"Agent happened to choose correct search query in after trace.\" \\\n–explanation \"STOCHASTIC: Diff only touches calendar tool. This scenario uses\nsearch tool exclusively. Agent succeeded because it picked a better search query by\nchance at step 2 –- unrelated to patch.\" \\\n–prevention-or-next \"Not a reliable fix –- scenario may fail again. Root cause\n(weak search strategy) still needs addressing.\"\n“‘\n‘regressed‘ (highest priority) –- You MUST have completed the diagnosis step (step 3)\nbefore recording this reflection. Classify as true regression or stochastic artifact\nwith evidence.\n“‘bash\n# True regression (patch caused the failure):\n\n39\n\n\f(continued)\nevo-dag update-reflection \\\n–node {candidate_idx} \\\n–scenario \"&lt;id&gt;\" –status \"regressed\" \\\n–root-cause \"This scenario relied on optional param Y in tool X.\" \\\n–explanation \"TRUE REGRESSION: Docstring change removed note about Y being\noptional. Agent stopped passing Y. Divergence at step 5 where agent no longer passes Y\n–- directly caused by diff in tools/email.py L42.\" \\\n–prevention-or-next \"When modifying docstrings, preserve param optionality\nannotations.\"\n# Stochastic artifact (not caused by the patch):\nevo-dag update-reflection \\\n–node {candidate_idx} \\\n–scenario \"&lt;id&gt;\" –status \"regressed\" \\\n–root-cause \"Agent used different search query phrasing in after trace.\" \\\n–explanation \"STOCHASTIC: Diff only touches calendar tool docstring. This\nscenario uses email tool exclusively. Agent diverged at step 3 with different query\nwording –- unrelated to patch.\" \\\n–prevention-or-next \"No action needed –- stochastic noise. Do not over-correct\nfor this scenario.\"\n“‘\n‘still_failing‘ –- Explain why the patch was insufficient. What should the next\niteration try instead?\n“‘bash\nevo-dag update-reflection \\\n–node {candidate_idx} \\\n–scenario \"&lt;id&gt;\" –status \"still_failing\" \\\n–root-cause \"Agent uses absolute dates instead of relative dates in messages.\" \\\n–explanation \"Prompt rule ’use relative dates’ was too weak –- agent still used\n’Oct 22’. Partial progress: bullet formatting was fixed.\" \\\n–prevention-or-next \"Stronger rule needed. Consider PreToolUse hook on\nsend_message for just-in-time reminder.\"\n“‘\n‘still_passing‘ –- For scenarios that use the same tools or components you modified,\nexplain which specific patch change could have caused interference and why it didn’t.\nThis is valuable signal for understanding patch safety.\n“‘bash\nevo-dag update-reflection \\\n–node {candidate_idx} \\\n–scenario \"&lt;id&gt;\" –status \"still_passing\" \\\n–explanation \"Uses send_message but passes because it sends user-provided verbatim\ncontent. Our rule only affects agent-composed messages.\"\n“‘\nFor scenarios unrelated to the patch, use the batch command:\n“‘bash\nevo-dag update-reflection –node {candidate_idx} –batch-still-passing \"id1,id2,...\"\n“‘\n{generalization_workflow_step}\n## Causal Attribution Checklist\nBefore finishing, verify each regressed AND fixed scenario’s reflection:\n1. Classified: Explicitly labeled as TRUE (REGRESSION/FIX) or STOCHASTIC\n2. Evidence-based: Cites the specific divergence point in traces\n3. Diff-linked: States whether the diff touches the relevant code path\n4. Actionable: True regressions have prevention guidance; true fixes explain the\ncausal chain; stochastic cases explicitly state the evidence and implications\n## Reflection Quality Checklist\nBefore finishing, verify each reflection meets these criteria:\n1. Specific: References exact tool calls, steps, or code paths\n2. Causal: Explains WHY the outcome occurred, not just WHAT happened\n\n40\n\n\f(continued)\n3. Actionable: ‘–prevention-or-next‘ gives clear guidance for future iterations –- not\ngeneric advice like \"try harder\"\n4. Distinct: Each reflection adds unique information (no copy-paste templates across\nscenarios)\n## Constraints\n- Record a reflection for every scenario in the mini-batch.\n- Use ‘evo-dag update-reflection‘ –- do NOT write reflections to files.\n- Do NOT modify source code during reflection –- Session 2 is analysis only.\n- Do NOT read raw traces from development set output directories –- only aggregate dev\naccuracy is available for generalization analysis.\n- Do NOT read raw traces from development set dirs (‘_val_‘ or ‘seed_val_‘ output dirs)\n–- only aggregate accuracy is available.\nCRITICAL: You MUST run ‘evo-dag update-reflection‘ for every scenario in the mini-batch\nbefore finishing this session. Use individual calls for fixed/regressed/still_failing\nscenarios and ‘–batch-still-passing‘ for unaffected passing scenarios. Missing\nreflections degrade the quality of accumulated lessons for future iterations.\n\nFigure 14: Reflection Session Prompt: agent analyzes per-scenario initial vs. re-evaluation outcomes\n(fixed / regressed / still_failing / still_passing), distinguishes true causal effects of the\npatch from stochastic LLM non-determinism, and records structured reflections that feed back into\nevo-dag show history for future iterations.\nEvolution Session Prompt\n## Mandatory Skills\nYou MUST read and follow the SKILL.md for each skill listed below. Do NOT skip or\nsummarize any skill –- execute the full procedure described in each one. These skills\nare installed at ‘.claude/skills/&lt;n&gt;/SKILL.md‘ in the current worktree.\n| Order | Skill | When | Why |\n|–––-|–––-|–––|––-|\n| 1 | ‘history-analysis‘ | Before any other work (Step 1) | Structured analysis of the\nfull evolution history –- classifies every patch as revert vs. preserve to inform\ncandidate selection |\n| 2 | ‘patch-verification‘ | After any codebase change (Step 5) | Verifies the prepared\nbase codebase has no runtime errors –- a broken base causes every subsequent session to\nfail |\n&gt; Enforcement: If you make any change to the worktree (rsync, cherry-pick, revert, or\ncode edit), you MUST run the ‘patch-verification‘ skill’s full procedure before\nfinishing. Skipping verification is a critical failure.\n## Goal\nPrepare the best possible base codebase for this iteration’s patch. The optimization\nobjective is to maximize performance across the task distribution, with development set\n(dev) accuracy as the proxy.\nYour selection must be data-driven, based on dev scores, regression analysis, and\ncross-candidate code comparison –- not on attachment to accumulated patches.\nAnti–Sunk-Cost Principle: The number of iterations invested in a lineage is NOT a\nreason to continue it. A long lineage with declining dev scores is a signal to switch,\nnot to persist. Evaluate each candidate by its measured performance and the quality of\nits code, not by how many patches led to it.\n## Context\n- Iteration: {iteration}\n- Phase: {phase}\n- Current worktree: ‘{worktree_path}‘ (fork of C{base_parent_idx})\n- Base parent: C{base_parent_idx} (worktree: ‘{parent_worktree}‘)\n## Candidate Performance (sorted by dev score)\n{candidate_table}\nNote: Dev scores are only available for candidates that passed mini-batch acceptance.\n\"pending\" means the candidate was not evaluated on the dev set. Use patch history, raw\ntraces, and codebase inspection to assess these.\n\n41\n\n\f(continued)\n## DAG Topology\n{dag_topology}\n## Selection Strategy\nChoose the base candidate by weighing dev scores, regression history, score trajectory,\nand code quality together. Dev scores are noisy –- small differences may be evaluation\nvariance, so corroborate with regression counts and code inspection. Do not stay on a\nlineage just because many patches were accumulated; patches only have value if\nperformance improved.\nOptions:\n- Continue from latest: When the lineage is near its peak and stable. Revert any\nregressions and cherry-pick fixes from other candidates.\n- Switch parent: When dev score has dropped well below the best candidate and the\ntrajectory is not recovering. Cherry-pick verified good patches from the old lineage.\n- Combine candidates: When different candidates have complementary strengths in\nnon-overlapping areas.\nKey rules:\n- Regressions identified here must be reverted in THIS session. Do NOT defer to Session\n1 –- Session 1 only addresses the current mini-batch and will not fix prior regressions.\n- When cherry-picking, prefer diff-level precision over copying entire files. Use\n‘evo-dag show edge‘ to see exact diffs and apply only the relevant changes. Whole-file\ncopies via rsync bring unintended changes.\n- Compare top candidates’ codebases directly (‘diff -rq‘) to find cherry-pick\nopportunities that aren’t visible from scores alone.\n## Workflow\n### 1. Analyze history\nMANDATORY first step. Run the ‘history-analysis‘ skill to build a structured\nunderstanding of the full evolution history. Do NOT skip this step or truncate ‘evo-dag\nshow history‘ with ‘head‘/‘tail‘. The skill provides the methodology for reading the\ncomplete history without truncation.\nThe purpose of this analysis is to classify every patch in the history into two\ncategories that directly inform candidate selection:\n#### Patches to revert (caused severe regressions)\n- Which patches introduced regressions? Identify the exact iteration, candidate, and\ncode diff that caused each regression.\n- How severe is each regression? (How many scenarios regressed? Did dev score drop?)\n- Is the regression still present in the current lineage, or was it already fixed by a\nlater patch?\n- What files were modified –- so you know exactly what to revert or undo.\n#### Patches to preserve (drove performance gains)\n- Which patches produced the largest improvements in dev score?\n- Which patches fixed scenarios that stayed fixed in subsequent iterations (durable\nfixes vs. fragile ones)?\n- Which patches generalized well beyond their target mini-batch?\n- What files and patterns were involved –- so you know what to protect when combining\ncandidates.\nThis classification directly drives your selection decision:\n- Continue from latest: Revert the harmful diffs while keeping the beneficial ones.\n- Switch parent: If too many regressions have accumulated, switch to the best candidate\nand cherry-pick the preserved patches.\n- Combine candidates: If different candidates have complementary preserved patches,\ncombine them.\n### 2. Investigate candidates\nUse the following sources to decide which candidate(s) to build on:\n1. History analysis output: The structured summary from Step 1 –- lineage trajectory,\nlessons, and cross-candidate strengths.\n2. Specific candidate: ‘evo-dag show node &lt;idx&gt;‘ –- scores, patch intent, verdict,\noutput directories.\n3. Raw traces: Read evaluation output and trace files in the iteration output\ndirectories listed by ‘evo-dag show node‘ or ‘evo-dag show current-batch‘. See\nCLAUDE.md’s Iteration Output Structure section for the file layout.\n\n42\n\n\f(continued)\n4. Candidate codebases: Read source files directly in other candidates’ worktrees to\nunderstand what changed and whether a fix is worth porting. Worktree paths are shown in\nthe candidate table and ‘evo-dag show node‘.\n5. Cross-candidate code comparison (MANDATORY for top candidates): For the top 2-3\ncandidates by dev score, directly compare their codebases to identify divergent files\nand cherry-pick opportunities:\n“‘bash\ndiff -rq {session_root}/worktrees/&lt;candidate_A_dir&gt;/\n{session_root}/worktrees/&lt;candidate_B_dir&gt;/ | grep -v ’.git’\n“‘\nThen read the divergent files in both worktrees to understand which candidate’s\nversion is better for each file. This comparison reveals cherry-pick opportunities that\nare invisible from score data alone.\n### 3. Revert regressions (MANDATORY if continuing from latest)\nIf you chose to continue from the latest candidate, you MUST revert all identified\nregressions in THIS session. Do NOT defer regression fixes to Session 1 –- Session 1\nonly addresses the current mini-batch and will not fix prior regressions.\nFor each regression identified in Step 1:\n1. Locate the exact diff that caused the regression using ‘evo-dag show edge &lt;parent&gt;\n&lt;child&gt;‘ for the iteration that introduced it.\n2. Compare with pre-regression code: Read the same file in the pre-regression\ncandidate’s worktree to see what the code looked like before the harmful change.\n3. Revert only the harmful lines: Do not revert the entire patch if it also contains\nbeneficial changes. Surgically revert only the lines that caused the regression.\n4. Preserve beneficial changes: If a patch contains both good and bad changes, keep\nthe good parts. Check whether specific scenarios were fixed by specific lines in the\ndiff to determine what to preserve.\nAfter reverting, run the ‘patch-verification‘ skill to ensure no runtime errors were\nintroduced.\n### 4. Prepare the base codebase\nEach candidate has a base parent (the candidate it was forked from) and optionally\ncherry-pick parents (other candidates whose code was referenced, copied, or combined).\nThe base parent is set automatically by the outer loop. Cherry-pick parents are what\nyou record here.\nYour worktree starts as a fork of C{base_parent_idx} (base parent).\n#### Switching base entirely\nIf you decided to switch base, copy the new base’s entire codebase:\n“‘bash\nrsync -a –exclude=’.git’ {session_root}/worktrees/&lt;candidate_dir&gt;/ ./\n“‘\nThen cherry-pick good patches from the old lineage using the diff-level method below.\n#### Diff-level cherry-pick (preferred over file-level copy)\nWhen porting specific fixes from another candidate, use diff-level precision rather than\ncopying entire files. Copying entire files brings unintended changes from the source\ncandidate.\n1. Identify the exact diff: Use ‘evo-dag show edge &lt;parent&gt; &lt;child&gt;‘ to see the exact\ncode changes that constituted the fix you want to port.\n2. Compare files: Read the specific file in both the source candidate’s worktree and\nyour current worktree. Use ‘diff‘ to see differences:\n“‘bash\ndiff {session_root}/worktrees/&lt;source_candidate_dir&gt;/&lt;file&gt; ./&lt;file&gt;\n“‘\n3. Apply only the relevant changes: Manually apply only the lines from the diff that\ncorrespond to the fix. Do not copy unrelated changes that the source candidate may have\naccumulated.\n4. Verify: After each cherry-pick, run the ‘patch-verification‘ skill.\n### 5. Verify changes\nIf you made any changes to the worktree (rsync, cherry-pick, revert, etc.), you MUST run\nthe ‘patch-verification‘ skill to ensure the codebase has no runtime errors. A broken\nbase codebase will cause every subsequent session to fail –- verification is mandatory.\n\n43\n\n\f(continued)\n### 6. Record selection\nAfter preparing the base code, record your selection with ‘evo-dag update-selection‘.\nList all candidates you referenced –- whether you switched base entirely, cherry-picked\nspecific files, or just used their code as reference for a re-implementation:\n“‘bash\nevo-dag update-selection \\\n–parent-candidates \"&lt;idx1&gt;,&lt;idx2&gt;,...\" \\\n–reasoning \"&lt;what you took from each and why&gt;\"\n“‘\nCRITICAL: You MUST run ‘evo-dag update-selection‘ before finishing this session.\nFailure to do so will result in lost selection history that future iterations need to\nunderstand the DAG lineage.\n## What Happens Next\nAfter this session, the outer loop runs Session 1 (Diagnose + Patch): the agent\nreceives the current mini-batch’s failing scenarios with execution traces, diagnoses\nroot causes, and applies targeted code patches to the worktree you prepared here.\n\nFigure 15: Evolution Session Prompt: data-driven base codebase selection from prior candidates,\nincluding history analysis, regression reversion, and diff-level cherry-picking.\n\nQ\n\nData Licenses\n\nThe licenses for the datasets used in this paper are as follows:\n• GAIA2: cc-by-4.0\n• SWE-Bench Pro: MIT license\n• Terminal-Bench 2.0: Apache-2.0 license\nAll datasets were used strictly for research purposes and were not utilized in any non-research\ncontexts, particularly for commercial applications.\n\nR\n\nLimitations and Future Work\n\nAutoSaddler currently formulates harness optimization as a supervised learning problem, assuming\naccess to a training set of tasks paired with gold answers and a task-level success metric (e.g., pass/fail)\nthat provides a clear signal for each rollout. While this assumption aligns with standard agent\nbenchmarks, real-world deployment settings may lack such ground-truth outcomes, and obtaining\nthem at scale can be prohibitively expensive. A natural extension is therefore to relax this supervision\nrequirement and study unsupervised or weakly supervised harness optimization, in which failure\nsignals are derived from intrinsic cues such as trace-level inconsistencies, tool-call errors, or selfconsistency across rollouts rather than external labels. Another direction is to synthesize training data\nby bootstrapping from agent environments, such as each user’s Universe in GAIA2. Finally, our\ncurrent scope is limited to stateless, independent tasks; extending AutoSaddler to stateful settings,\nintegrating memory and skill curation, and validating the approach across a broader set of LLM\nfamilies remain important directions for future work.\nIn terms of real-world deployment, we want to stress the importance of strong governance and\nhuman-in-the-loop in the early development stage, namely, automated harness modifications should\nundergo human review or additional security validation before deployment to production systems.\n\n44\n\n\f</code></pre></article>\n        \n</main>\n\n<script src=\"https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/contrib/auto-render.min.js\"></script>\n<script>\n\nfunction initTheme() {\n  const saved = localStorage.getItem('kb-theme') || 'light';\n  document.documentElement.setAttribute('data-theme', saved);\n  updateThemeIcon(saved);\n}\nfunction toggleTheme() {\n  const cur = document.documentElement.getAttribute('data-theme') || 'light';\n  const next = cur === 'light' ? 'dark' : 'light';\n  document.documentElement.setAttribute('data-theme', next);\n  localStorage.setItem('kb-theme', next);\n  updateThemeIcon(next);\n}\nfunction updateThemeIcon(t) {\n  const btn = document.getElementById('theme-toggle-btn');\n  if (btn) btn.innerHTML = t === 'dark' ? '☀️' : '🌙';\n}\ndocument.addEventListener('DOMContentLoaded', initTheme);\n\nfunction setViewMode(m) {\n  const grid = document.getElementById('bento-grid-view');\n  const list = document.getElementById('list-table-view');\n  const bGrid = document.getElementById('view-grid-btn');\n  const bList = document.getElementById('view-list-btn');\n  if (m === 'list') {\n    if (grid) grid.style.display = 'none';\n    if (list) list.style.display = 'flex';\n    if (bGrid) bGrid.classList.remove('active');\n    if (bList) bList.classList.add('active');\n  } else {\n    if (grid) grid.style.display = 'grid';\n    if (list) list.style.display = 'none';\n    if (bGrid) bGrid.classList.add('active');\n    if (bList) bList.classList.remove('active');\n  }\n  localStorage.setItem('kb-view', m);\n}\ndocument.addEventListener('DOMContentLoaded', () => {\n  const s = localStorage.getItem('kb-view') || 'grid';\n  setViewMode(s);\n});\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  document.querySelectorAll('pre').forEach(pre => {\n    const b = document.createElement('button');\n    b.className = 'copy-code-btn';\n    b.innerText = 'Copy';\n    b.onclick = () => {\n      const c = pre.querySelector('code') ? pre.querySelector('code').innerText : pre.innerText;\n      navigator.clipboard.writeText(c).then(() => {\n        b.innerText = 'Copied!';\n        setTimeout(() => { b.innerText = 'Copy'; }, 2000);\n      });\n    };\n    pre.appendChild(b);\n  });\n});\n\nwindow.addEventListener('keydown', (e) => {\n  if ((e.key === '/' || (e.metaKey && e.key === 'k')) && document.activeElement.tagName !== 'INPUT' && document.activeElement.tagName !== 'TEXTAREA') {\n    e.preventDefault();\n    const q = document.getElementById('global-search-input');\n    if (q) q.focus();\n  }\n});\n\n// Scrollspy for TOC\nwindow.addEventListener('scroll', () => {\n  const headers = document.querySelectorAll('.article-body h1, .article-body h2, .article-body h3');\n  const scrollPos = window.scrollY + 100;\n  headers.forEach(h => {\n    if (h.offsetTop <= scrollPos) {\n      const id = h.getAttribute('id');\n      if (id) {\n        document.querySelectorAll('.reading-sidebar a').forEach(a => {\n          a.classList.toggle('active', a.getAttribute('href') === '#' + id);\n        });\n      }\n    }\n  });\n});\n\ndocument.addEventListener(\"DOMContentLoaded\", function() {\n  if (window.renderMathInElement) {\n    renderMathInElement(document.body, {\n      delimiters: [\n        {left: '$$', right: '$$', display: true},\n        {left: '$', right: '$', display: false},\n      ],\n      throwOnError : false\n    });\n  }\n});\n</script>\n\n</body>\n</html>\n"