"<!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>Under review\n\nH ARNESS P RO :\nR ECURSIVE H ARNESS S ELF I MPROVEMENT WITH PARETO O PTIMIZATION FOR\nP ERFORMANCE -C OST T RADE - OFFS\nZhuoshi Pan1,∗ , ZhiYuan Feng1,∗ , Yukuo Cen2 , Honglin Lin3 ,\nJunru Lu4 , Zhongxia Chen5 , Shuo Yang5 , H. Vicky Zhao1,† , Jie Tang1,†\n1\nTsinghua University 2 Z.AI 3 Shanghai Jiao Tong University\n4\nUniversity of Warwick 5 Kling AI\n\narXiv:2610.26770v2 [cs.LG] 20 Oct 2026\n\n∗\n\nEqual contribution.\n\n†\n\nCorresponding authors.\n\nA BSTRACT\nHarness development plays a crucial role in building capable AI agents. Recent approaches improve harnesses through recursive self-improvement (RSI), but\ntheir performance gains often come with higher execution costs. We introduce\nH ARNESS P RO, a label-free method for evolving harnesses to improve task performance while reducing execution cost. In this setting, candidate harnesses are\nevaluated using LLM-generated tests without access to ground-truth solutions or\nofficial tests. Specialized agents diagnose execution trajectories, plan updates with\ndifferent performance-cost priorities, and implement them as candidate harnesses.\nRather than returning a single harness, H ARNESS P RO uses normalized weighted\nsquared-distance selection to provide cost-focused (lite), balanced (medium), and\nperformance-focused (heavy) harnesses for different deployment budgets. Selected harnesses enter the next iteration, where execution feedback guides further\nupdates. Our experiments cover Terminal-Bench 2, SWE-Bench Pro, and ProgramBench, using GPT-5.5 with Codex and GLM-5.2 with Claude Code. Across\nthese benchmarks using GPT-5.5 with Codex, the heavy mode of H ARNESS P RO\nachieves an average pass-rate gain of 2.0 percentage points and an average pertask cost reduction of 26.1% relative to RHO. This advantage also holds when\nusing GLM-5.2 with Claude Code. Code is available at this link.\n\n1\n\nI NTRODUCTION\n\nAn agent harness is the software infrastructure that manages interactions between a large language\nmodel (LLM) and its environment (Grace et al., 2026). Recent work on recursive self-improvement\n(RSI) (Zhang et al., 2026) uses past execution trajectories to diagnose problems and guide harness\nupdates that improve performance on future tasks (Suzgun et al., 2026; Lin et al., 2026; Pan et al.,\n2026a). However, these methods often pursue performance gains through more extensive exploration and stronger verification (Lin et al., 2026; Pan et al., 2026a). These efforts improve performance, but often at the cost of higher token consumption and increased latency. This trade-off is less\nappealing in practical deployment, where the execution cost and latency also matter. We therefore\nask: Can recursive harness self-improvement deliver better performance at lower execution cost?\nToward this goal, we introduce H ARNESS P RO, a label-free method for recursive harness selfimprovement that uses both performance and cost metrics to guide harness updates and candidate\nselection. It orchestrates several specialized agents to turn execution feedback into successive harness updates. A trajectory analyzer examines repeated rollouts to identify failures and avoidable\noverhead. Guided by different performance-cost priorities, a planner turns these diagnoses into\nharness improvement plans, which an editor implements as executable harness candidates. A testsynthesis agent provides fixed tests for evaluating the candidates without access to ground-truth solutions or official tests. Candidates that underperform the initial harness or are Pareto-dominated are\ndiscarded. To accommodate different budgets, we then use normalized weighted squared-distance\nselection (Marler &amp; Arora, 2004) to retain representative harnesses for cost-focused (lite), balanced\n1\n\n\fUnder review\n\n(medium), and performance-focused (heavy) modes. The selected harnesses then enter the next\nepoch, where further updates pursue different performance-cost priorities.\nWe evaluate H ARNESS P RO on Terminal-Bench 2 (The Terminal-Bench Team, 2025), SWE-Bench\nPro (Deng et al., 2026), and ProgramBench (Yang et al., 2026a), using GPT-5.5 with Codex and\nGLM-5.2 with Claude Code. With both backbone models, H ARNESS P RO improves task performance while reducing execution cost. For example, on Terminal-Bench 2 with GPT-5.5 and Codex,\nthe heavy mode of H ARNESS P RO outperforms RHO (Pan et al., 2026a) in pass rate by 4.5 percentage points while reducing mean cost per task by 33.9%. For more cost-sensitive deployments, the\nmedium mode delivers performance comparable to RHO at substantially lower execution cost.\nAn analysis of the evolved harnesses shows that H ARNESS P RO does not improve agents simply by\ncompressing context or increasing reasoning effort. The evolved harnesses dynamically allocate\nreasoning effort and tool budgets based on task descriptions, while runtime hooks steer execution\nfrom exploration toward convergence based on the assigned budgets. They also adopt tool-output\ncompression like RTK (Szymkowiak, 2026) and streamline instructions to reduce redundant prompt\ncontent, while retaining necessary context and final verification. Together, these mechanisms curb\navoidable overhead while preserving the reasoning and verification needed for task success, thereby\nadvancing the performance-cost Pareto frontier. Our contributions are threefold:\n• We introduce H ARNESS P RO, a multi-agent framework that simultaneously optimizes performance and cost by analyzing execution trajectories and recursively improving harnesses.\n• We assess candidate artifacts with fixed LLM-generated tests rather than direct LLM judgments, improving failure detection without access to official tests.\n• Across three benchmarks, H ARNESS P RO improves performance while reducing cost and\nlatency, yielding a series of harnesses with different performance-cost trade-offs.\n\n2\n\nR ELATED W ORK\n\nAgent and harness optimization. Agent optimization has expanded from prompts and predefined workflows to the executable harness surrounding a model. AFlow searches graphs of modelinvoking operators using execution feedback (Zhang et al., 2025). More recent systems directly\nmodify harness components: agentic harness engineering makes edits traceable (Lin et al., 2026),\nHarnessFix diagnoses failures before applying repairs (Chen et al., 2026a), and HarnessX composes\nharnesses from typed primitives using trajectory evidence (Chen et al., 2026b). RHO uses LLMs to\nevaluate and compare execution trajectories without ground-truth labels, guiding harness evolution\ntoward higher task success (Pan et al., 2026a). In contrast, our method, H ARNESS P RO, optimizes\nboth task success rate and monetary cost. Rather than returning a single harness, it produces a set of\nharnesses with different performance-cost trade-offs, organized into lite, medium, and heavy tiers.\nComponent optimization and inference-time budget allocation. Some methods focus on specific components, such as skills or memory (Pan et al., 2026b). SkillOpt optimizes skill documents (Yang et al., 2026b), while SkillMOO and FRAMES incorporate cost or regression constraints\ninto skill evolution (Gong et al., 2026a; Wang et al., 2026). Dynamic Cheatsheet and ReasoningBank retain reusable strategies from past experience (Suzgun et al., 2026; Ouyang et al., 2026),\nwhile Sleep-time Compute builds reusable memory by reasoning over context before a query arrives (Lin et al., 2025). MemoryCPT jointly optimizes memory construction, retrieval, and summarization (Lei et al., 2026). Other work addresses budget allocation at inference time: BATS learns\na budget-aware policy for allocating model tokens and external tool calls (Liu et al., 2025), while\nCOMPAS jointly selects models, prompts, and decoding settings according to task difficulty (Gong\net al., 2026b). H ARNESS P RO instead uses past trajectories to evolve the entire harness, including\ninstructions, skills, tools, hooks, and verification rules. Table 1 summarizes how H ARNESS P RO\ndiffers from prior work.\n\n3\n\nP ROBLEM S ETTING\n\nA harness h ∈ H is the software runtime layer that manages a foundation model’s interactions\nand execution. It includes prompts, tools and skills, context and memory mechanisms, hooks, and\n2\n\n\fUnder review\n\nTable 1: Comparison of different harness self-improvement methods.\nMethod\n\nGoal\n\nScope\n\nFeedback\n\nIteration\n\nOutput\n\nAFlow (Zhang et al., 2025)\nPass\nWorkflow Ground truth Recursive\nSingle\nSkillMOO (Gong et al., 2026a) Pass + Cost\nSkills\nGround truth Recursive Pareto set\nRHO (Pan et al., 2026a)\nPass\nSkills + tools Label-free Single round Single\nAHE (Lin et al., 2026)\nPass\nHarness\nGround truth Recursive\nSingle\nH ARNESS P RO\nPass + Cost\nHarness\nLabel-free\nRecursive Pareto set\n\nverification policies (Yehudai et al., 2026; OpenAI, 2026). Given a task x, the harness determines\nwhat information the agent receives, which actions it can take, and how those actions are executed,\ndirectly influencing both task success and resource consumption. An agent equipped with harness\nh solves task x, producing a trajectory τh (x) = Solve(h, x) that records tool calls, environment\nfeedback, and the final artifact. Recursive self-improvement uses trajectories from previous tasks\nto guide harness evolution and improve performance on future tasks. Below, we define the three\nevaluation metrics: pass rate, execution cost, and runtime latency.\nPass rate. To prevent test-set leakage, we partition tasks into training, validation, and test sets,\ndenoted by Dtrain , Dval , and Dtest . Outcomes on the training set are used to update harnesses, while\nthe validation set is used to evaluate and select candidate harnesses. The test set is used only for final\nevaluation after evolution. For a task x ∈ Dtest , the official tests evaluate the final artifact produced\nby τh (x). We set Pass(τh (x)) = 1 if all official tests pass and Pass(τh (x))P\n= 0 otherwise. The pass\n1\nrate is the fraction of test tasks that pass all official tests, PR(h) = |Dtest\nx∈Dtest Pass(τh (x)).\n|\nCost. We compute execution cost from token usage, distinguishing uncached input, cached input,\nand output tokens because they are billed at different prices. For each task x, we aggregate these\ntoken counts over all model calls in τh (x) and compute its cost ch (x) using\nP the prices in Table 4\n1\n(Appendix A). We report the average cost per test task as C(h) = |Dtest\nx∈Dtest ch (x).\n|\nLatency. We define task latency as the wall-clock time from the start of agent execution to its\ncompletion: ℓh (x) = Tend (τh (x)) − Tstart (τh (x)). The time spent grading the final output is not\nincluded in taskPlatency. We average task latencies over the test set to obtain the mean latency,\n1\nL(h) = |Dtest\nx∈Dtest ℓh (x). Because model response times fluctuate with server load and net|\nwork conditions, we treat latency as an auxiliary metric rather than an optimization objective.\nOptimization objective. We aim to evolve harnesses that improve performance while reducing\ncost. We formulate the optimization problem as\nmin (−PR(h), C(h))\n\nh∈H\n\ns.t.\n\nPR(h) ≥ PR(h0 ).\n\n(1)\n\nHere, h0 is the initial harness. We seek the Pareto frontier and select three representative operating\npoints: cost-focused (lite), balanced (medium), and performance-focused (heavy). However, finding these trade-offs poses two challenges. (1) A vast harness search space. A harness comprises\ncomponents such as instructions, tools, skills, hooks, and rules, all of which can be modified during\nevolution. Their possible combinations create a vast, discrete search space that cannot be optimized\nusing gradients. (2) Balancing performance and cost. Additional reasoning, exploration, or verification can improve performance but also consumes more tokens, increasing cost. Conversely,\nindiscriminately reducing these activities may hurt performance. Advancing the Pareto frontier thus\nrequires analyzing execution trajectories alongside task outcomes and token usage to distinguish\nnecessary computation from avoidable overhead and find the “sweet spot” that reduces cost without\ncompromising performance.\n\n4\n\nH ARNESS P RO\n\nTo address these challenges, we introduce H ARNESS P RO, a multi-agent framework that analyzes\nexecution trajectories and iteratively modifies harnesses to advance the performance-cost Pareto\n3\n\n\fUnder review\n\nExecution\nExecution setup\nsetup\n\n1\n1\n\nTrajectory\nTrajectory diagnosis\ndiagnosis\n\nBase\nBase harness\nharness\nExecution\nsetup\nFrozen\nFrozen model\nmodel\nFrozen\nmodel\n\n1\n\nN\nTask\n-&gt;\nTrajectory\ndiagnosis\nN\nTask x\nx G\nG rollouts\nrollouts\n-&gt; Trajectories\nTrajectories\n\nBase harness\n\nParallel\nrollouts\nFrozen\nmodel\nParallel\nrollouts\nParallel\nrollouts\nParallel rollouts\n\nTraining\nTraining data\ndata\nCoreset\nCoreset\nCoreset\nRepresentative\nTraining\ndata\nRepresentative\nRepresentative\nTasks\nTasks\n\nCoreset\nRepresentative\nTasks\n\nN Task x G rollouts -&gt; Trajectories\n\nTrajectory\nTrajectory analyzer\nanalyzer\nTrajectory\nanalyzer\nDiagnosis\nDiagnosis records\nrecords\n\nTrajectory\nanalyzer\nIssue Impact\nImpact Source\nIssue\nIssue Impact Source\nSource\nIssue Impact Source\n\nDiagnosis records\nIssue Impact Source\n\nAggregate\nAggregate\nAggregate\n\n2\n2\n\nPlan\nPlan and\nand edit\nedit\n\n3\n3\n\n2\n\nPlan and edit\nHarness\nHarness\n\n3Candidates\nEvaluate and Test\nselect\nCandidates\nsynthesizer\nparents + updated\nTest\nsynthesizer\n\nDiagnosis\nDiagnosis\nDiagnosis\n\nMetrics\nMetrics\nMetrics\n\nHarness\nHarness\ncomparison\ncomparison\ncomparison\n\nEvolution planner\nHarness\n\nEvolution\nplanner\nDiagnosis\nMetrics\n\ncomparison\n\nplanner\nCostEvolution\nBalanced\nPass\nCost\nBalanced\nPass\nHarness editor\n\nHarness\neditor\nCost\nBalanced\nHarness\neditorPass\nCandidate harnesses\nCandidate harnesses\n\nAggregate\n\nHarness editor\n\nRepresentative Pareto\nPareto frontier\nfrontier candidates\ncandidates\nRepresentative\nRepresentative Pareto frontier candidates\n\nCandidate harnesses\n\nEvaluate\nEvaluate and\nand select\nselect\nTest synthesizer\n\nparents + updated\nparents + updated\n\nCandidates\nValidation\nValidation on\non\n\nValidation on\n\nTest synthesizer\npass\nparents\n+ updated\nrate + execution cost\npass\npass rate + execution cost\npass ↑\n↑\nHarness\npass\nHarness Filtering\nFiltering\npass ↑ValidationH\nHon\n-- Pareto-dominated\nPareto-dominated\nH\nM\nM\npass rate\n+ execution cost\n--- Pareto-dominated\nBelow pass\npass floor\nfloor\nBelow\nM\nL\n- Below\nL\npass\nfloor\nL\npass ↑\nL\n\nlite\nlite\nlite\n\ncostH→\n→\ncost\nM cost →\n\nHarness Filtering\nMode\nMode selection\nselection\n-\n\nPareto-dominated\nBelow pass floor\n\nmedium\nheavy\nmediumMode selection\nheavy\n\ncost →\n\nmedium\n\nheavy\n\nPareto frontier candidates\nFigure 1: Overview of H ARNESS PRepresentative\nRO. In each epoch, it analyzes rollout trajectories, generates\ncandidate harnesses, and selects representatives based on performance and cost.\n\nfrontier. We first outline the evolution process, then describe trajectory-based diagnosis and candidate generation, followed by test-based evaluation and selection.\n4.1\n\nOVERVIEW\n\nTo keep trajectory collection and analysis manageable, we begin by selecting a training coreset\nDtrain . Following RHO (Pan et al., 2026a), we use the Determinantal Point Process (DPP) kernel (Kulesza &amp; Taskar, 2012) to balance task difficulty and diversity (Appendix A.1). Starting from\nan executable harness h0 , we maintain a candidate set At of harnesses at epoch t, initialized as\nA0 = {h0 }. In each epoch, H ARNESS P RO employs a multi-agent framework to analyze trajectories\nof these candidate harnesses on the coreset Dtrain to identify task failures, unproductive exploration,\nand redundant computation. The framework then plans and implements harness modifications to address these issues, producing new executable candidate harnesses as described in Section 4.2.\nWe evolve harnesses in a label-free setting, without access to ground-truth solutions, official test\ncases, or graders. Instead of using an LLM to assess and compare trajectories directly, as in\nRHO (Pan et al., 2026a), we use it to generate tests from task descriptions and trajectories produced\nby the initial harness. In each epoch, we evaluate candidate harnesses on the validation set using the\ngenerated tests, measuring pass rate and execution cost. After discarding candidates that fall below\nthe performance floor or are Pareto-dominated, we use normalized weighted squared-distance selection to retain representatives for cost-focused (lite), balanced (medium), and performance-focused\n(heavy) modes. The selected harnesses form the candidate set for the next epoch. This process repeats until the epoch limit is reached, after which we fix the harnesses and evaluate them on the test\nset. Algorithm 1 summarizes the full procedure.\n4.2\n\nT RAJECTORY A NALYSIS AND H ARNESS E VOLUTION\n|A |\n\nAt epoch t, we run each harness in the current candidate set At = {hti }i=1t independently G times on\nevery training task x ∈ Dtrain . For candidate harness h ∈ At , this rollout\na trajectory\n\u0001 process yields\nt,g\nt,g\nt,g\nt,g\nτht,g (x) and a metric vector mt,g\n(x)\n=\nPass\n(x),\nc\n(x),\nℓ\n(x)\n.\nHere,\nPass\nh\nh\nh\nh\nh (x) is 1 if\nt,g\nt,g\nthe artifact produced in τh (x) passes all generated tests in S(x), while ch (x) and ℓt,g\nh (x) record\nits execution cost and latency. We also retain token usage and tool-call details for later diagnosis.\nThese trajectories and artifacts guide harness self-improvement through a multi-agent framework\ncomprising a trajectory analyzer, an evolution planner, a harness editor, and a test synthesizer. We\ndescribe each agent below.\nTrajectory Analyzer. Execution trajectories can reveal harness weaknesses, but the relevant evidence is often dispersed across long sequences of model responses and tool outputs, making these\nweaknesses difficult to locate and interpret. We therefore implement a trajectory-analysis agent to\ndiagnose these problems for each candidate h and task x at epoch t. To reduce the impact of randomness, the agent jointly examines the trajectories {τht,g (x)}G\ng=1 from G independent rollouts and\n4\n\n\fUnder review\n\nAlgorithm 1 Cost-aware recursive harness self-improvement with H ARNESS P RO.\nInput: Seed harness h0 ; data Dtrain , Dval ; prompts I1 –I3 ; rollouts G; epoch limit T\nOutput: Harnesses for the lite hTlite , medium hTmedium , and heavy hTheavy modes.\n1: Collect τh0 (x) for each x ∈ Dtrain ∪ Dval\n2: S(x) ← TestSynth(x, τh0 (x)) for each x\n▷ Generate once\n3: Evaluate h0 on Dval using S; fix its initial pass rate PRval (h0 ) as the performance floor\n4: A0 ← {h0 }; t ← 0; h0m ← h0 for m ∈ {lite, medium, heavy}\n5: while t &lt; T do\nStage 1 Trajectory diagnosis\n6:\nfor each h ∈ At do\n7:\nCollect G independent rollouts per x ∈ Dtrain , recording τht,g (x) and mt,g\nh (x) using S(x)\nG\n8:\nz(h, x) ← Analyzer(x, {(τht,g (x), mt,g\n(x))}\n)\nfor\neach\nx\n∈\nD\ntrain\ng=1\nS\nSh\nG\n9:\nz(h) ← x∈Dtrain z(h, x); m(h) ← x∈Dtrain {mt,g\nh (x)}g=1\n10:\nend for\nStage 2 Candidate generation\n11:\nfor each hti ∈ At and j ∈ {1, 2, 3} in parallel do\n12:\nGenerate a plan from Ij , diagnoses, metrics, and cross-candidate evidence:\n13:\npj (hti ) ← Plan(Ij , hti , z(hti ), m(hti ), {(Diff(hti , htk ), z(htk ), m(htk ))}k̸=i )\ne\nhti,j ← Edit(hti , z(hti ), pj (hti )); commit e\nhti,j to Git\n▷ Separate workspace\n14:\n15:\nend for\n16:\nCt ← {e\nhti,j }i,j ; Cet ← At ∪ Ct\nStage 3 Evaluation and selection\n17:\nEvaluate each h ∈ Cet once per x ∈ Dval using the fixed S(x); aggregate mval (h)\n18:\nFilter candidates: Aet+1 ← {h ∈ Cet | PRval (h) ≥ PRval (h0 ) ∧ ̸ ∃h′ ∈ Cet : h′ ≺ h}\n19:\nSelect representatives: ht+1\n▷ Eq. 9\net+1 Jm (h) for m ∈ {lite, medium, heavy}\nm ← arg minh∈A\nt+1\nt+1\n20:\nUpdate candidates: At+1 ← {ht+1\nlite , hmedium , hheavy }; t ← t + 1\n21: end while\n22: return (hTlite , hTmedium , hTheavy )\n▷ Fixed before held-out test evaluation\n\nG\ntheir metrics {mt,g\nh (x)}g=1 , rather than relying on a single attempt:\n\u0010 \b\n\u0001 G \u0011\nz(h, x) = Analyzer x, τht,g (x), mt,g\n(x)\n.\nh\ng=1\n\n(2)\n\nThe analyzer’s output z(h, x) reports (1) identified problems, (2) their impact on performance and\ncost, and (3) their sources and supporting evidence. The evidence includes a concise trajectory\nsummary or relevant excerpts, together with the path of the trajectory file and the relevant event\nrange. TwoSexamples are provided in Appendix C.1. We combine diagnoses across different tasks\nas z(h) = x∈Dtrain z(h, x). If z(h) exceeds 64K tokens, the analyzer summarizes it. We similarly\nS\nG\ncollect the metric vectors across training tasks as m(h) = x∈Dtrain {mt,g\nh (x)}g=1 . The planner\nuses these diagnoses and metrics to guide its proposals.\nEvolution Planner. Building on these diagnoses, the planner proposes three improvement plans\nfor each candidate. Each plan is guided by a distinct instruction: I1 emphasizes cost reduction,\nI2 balances performance and cost, and I3 prioritizes performance, as detailed in Appendix B. The\nplanner starts with the full implementation of hti , using its diagnoses and metrics to identify where\nmodifications are needed. It also compares harness hti and the other candidates htk by examining\ntheir code differences Diff(hti , htk ):\npj (hti ) = Plan(Ij , hti , z(hti ), m(hti ), {(Diff(hti , htk ), z(htk ), m(htk ))}k̸=i ).\n(3)\nBy comparing candidates, the planner can identify effective mechanisms and remaining bottlenecks.\nEach plan explains which components to modify, how to modify them, and the expected effects on\nperformance and cost, as exemplified in Appendix C.2. Full trajectories are not provided to the planner by default. When needed, it can inspect them using the file paths recorded in the diagnoses. The\nplanner is instructed to propose generalizable, rather than task-specific, harness updates. Throughout\nevolution, the validation and test sets remain hidden from the planner to avoid benchmark leakage.\nHarness Editor. We then design a harness editor to modify candidate hti , producing a new, executable candidate harness using the proposed plan pj (hti ) and the diagnoses z(hti ):\n\u0001\ne\nht = Edit ht , z(ht ), pj (ht ) ,\nj = 1, 2, 3.\n(4)\ni,j\n\ni\n\ni\n\ni\n\n5\n\n\fUnder review\n\nEach of the three plans is implemented in a separate workspace, and the resulting harness is committed to Git so that changes can be traced and reverted. Newly generated harnesses form Ct , and\nwe combine them with the parent harnesses in At for evaluation:\n|At | n\no\n[\ne\nCet = At ∪ Ct .\n(5)\nCt =\nhti,1 , e\nhti,2 , e\nhti,3 ,\ni=1\n\nAll harnesses in Cet then undergo the same evaluation and selection process, as described below.\n4.3\n\nE VALUATION AND C ANDIDATE S ELECTION\n\nOfficial outcome\n\nLLM Judge\nLLM-generated tests\nTest Synthesizer. During harness evolution, we follow\nRHO (Pan et al., 2026a), adopting a label-free setting\n8\n0\n7\n1\nPass\nPass\nwithout access to ground-truth solutions, official tests, or\n100.0%\n0.0%\n87.5%\n12.5%\ngrader feedback. RHO relies on LLM self-preference to\nselect harnesses. However, we find that LLM judges tend\n7\n5\n2\n10\nFail\nFail\n58.3%\n41.7%\n16.7%\n83.3%\nto be overly optimistic when assessing the execution trajectories, often treating flawed implementations as sucPass\nFail\nPass\nFail\ncessful. We therefore introduce a dedicated test-synthesis\n+41.7 pp\nEvaluator prediction\nagent to generate test cases for evaluation; its instruction,\nskill, and validation tool are outlined in Appendix C.3.\nFor each task x ∈ Dtrain ∪ Dval , the agent generates tests\nfrom its description x and the initial trajectory τh0 (x):\nFigure 2: Confusion matrices pooled\nS(x) = TestSynth(x, τh0 (x)) .\n(6) across training tasks from TerminalThese generated tests remain fixed throughout the self- Bench 2 and SWE-Bench Pro.\nimprovement process, ensuring a fair comparison among candidate harnesses. A preliminary experiment demonstrates the effectiveness of this approach, with failure recall increasing from 41.7% to\n83.3% compared with direct LLM judgments (Figure 2). After each epoch, we run each candidate\nh ∈ Cet once per validation task x and check its output against S(x). Task-level pass indicators, costs,\nand latencies are averaged to obtain the validation metrics mval (h) = (PRval (h), Cval (h), Lval (h)).\n0\n\n50\nWithin each official class (%)\n\n100\n\nCandidate filtering and selection. To prevent the candidate set from growing indefinitely, we\nretain at most three harnesses for the next epoch. We first discard candidates below the initial passrate floor PRval (h0 ) or Pareto-dominated by another candidate:\nn\no\nAet+1 = h ∈ Cet PRval (h) ≥ PRval (h0 ) ∧ ̸ ∃h′ ∈ Cet : h′ ≺ h .\n(7)\nHere, h′ ≺ h denotes Pareto dominance: h′ is no worse\nthan h on both metrics and strictly better on at least one.\nWe select representatives using a normalized weighted\nsquared-distance criterion (Marler &amp; Arora, 2004) that\naccounts for actual differences in performance and cost.\nWe first measure each candidate’s normalized deviations\nfrom the highest pass rate and lowest cost:\ndperf (h) = (Pmax − PRval (h))/(Pmax − Pmin ),\n(8)\ndcost (h) = (Cval (h) − Cmin )/(Cmax − Cmin ).\nHere, Pmin , Pmax and Cmin , Cmax are the extrema of\nvalidation pass rate and mean cost over the current filtered set Aet+1 . The selection objective for mode m is Figure 3: Schematic of recursive harJm (h) = αm dperf (h)2 +βm dcost (h)2 , where αm and βm ness update, filtering, and selection.2\nweight performance and cost, respectively. Each mode\nm ∈ {lite, medium, heavy} independently selects the candidate with the smallest weighted squared\ndistance:\nht+1\n(9)\net+1 Jm (h).\nm = arg minh∈A\nThe selected harnesses form At+1 for the next round, as illustrated in Figure 3. Filtering and selection use only validation metrics, with no access to test-set results. The final harnesses are evaluated\non the held-out test set Dtest only after all rounds of recursive self-improvement are complete.\nH00\n\nEpoch 1\n\nH11\n\nH21\n\nH31\n\nFiltering and Selection\n\nEpoch 2\n\nMedium H31\n\nLite H00\n\nH12\n\nH22\n\nH32\n\nH42\n\nH52\n\nH62\n\nHeavy H21\n\nH72\n\nH82\n\nH92\n\nFiltering and Selection\n\nEpoch 3\n\nMedium H31\n\nLite H32\n\nH13\n\nH23\n\nH33\n\nH43\n\nH53\n\nH63\n\nHeavy H92\n\nH73\n\nH83\n\nFiltering and Selection\n\nOutput\n\n2\n\nLite H32\n\nMedium H53\n\nHeavy H92\n\nIn practice, filtering and selection may retain fewer than three distinct harnesses, see Figure 4.\n\n6\n\nH93\n\n\fUnder review\n\n5\n\nE XPERIMENTS\n\n5.1\n\nE XPERIMENTAL S ETUP\n\nData and implementation. We evaluate H ARNESS P RO on Terminal-Bench 2 (The TerminalBench Team, 2025), SWE-Bench Pro (Deng et al., 2026), and ProgramBench (Yang et al., 2026a),\ncovering terminal tasks, repository-level issue resolution, and program reconstruction. Following\nthe dataset splitting protocol of RHO (Pan et al., 2026a), we hold out 59, 100, and 100 tasks, respectively, for testing. From the remaining tasks in each benchmark, we select a 10-task training set\nDtrain using the DPP-based coreset selection method (Kulesza &amp; Taskar, 2012) described in Section 4.1. The remaining tasks form the validation set. We pair GPT-5.5 with Codex 0.147.0 and\nGLM-5.2 with Claude Code 2.1.231. Each candidate harness produces G = 3 rollouts per\ntraining task in each epoch. Evolution runs for three epochs on Terminal-Bench 2 and SWE-Bench\nPro, and four on ProgramBench, retaining up to three harnesses after each epoch. All methods use\nthe same data splits and grading settings. Further implementation details are in Appendix A.\nBaselines. We compare H ARNESS P RO against several strong harness optimization methods. The\noriginal Codex or Claude Code harness is Vanilla, the starting point for optimization. Dynamic\nCheatsheet (Suzgun et al., 2026) maintains reusable strategies and code snippets, ReasoningBank (Ouyang et al., 2026) retrieves strategies distilled from past trajectories, and Sleep-time Compute (Lin et al., 2025) prepares reusable memory before new tasks. RHO (Pan et al., 2026a) revises\nharness components through trajectory analysis and selects candidates using LLM self-preference.\nTo separate the effects of cost-aware and recursive optimization, we include two RHO variants. Balance changes only RHO’s optimization instruction, asking for better task performance at lower cost.\nRHO+Iteration runs Balance for the same number of epochs as H ARNESS P RO. Each subsequent\nepoch starts from the harness selected in the preceding epoch by the best-of-N procedure of RHO.\nEvaluation metrics. On Terminal-Bench 2 and SWE-Bench Pro, a task passes only if all its official tests pass. For ProgramBench, we follow its official evaluation protocol (Yang et al., 2026a)\nand report pass rate as the macro-average of the fraction of test cases passed for each task. We\nalso report mean cost C(h) and latency L(h). For H ARNESS P RO, all metrics are given as mean ±\nsample standard deviation over three runs on Terminal-Bench 2 and SWE-Bench Pro, and two on\nProgramBench. The token prices used to calculate cost are listed in Table 4 in the appendix.\n5.2\n\nM AIN R ESULTS\n\nTable 2 compares H ARNESS P RO with several baseline methods across three benchmarks. With\nGPT-5.5 and Codex, RHO improves performance over Vanilla on all three benchmarks, but also\nincreases execution cost. On SWE-Bench Pro, for example, its mean cost per task rises by 42.6%,\nfrom $1.88 to $2.68. In contrast, the heavy mode of H ARNESS P RO achieves the highest pass rate\nacross all three benchmarks at lower cost than RHO. On Terminal-Bench 2, the heavy mode of\nH ARNESS P RO reaches a mean pass rate of 80.8% across three runs, 4.5 percentage points above\nRHO, with 33.9% lower mean cost. The advantage extends to ProgramBench, where its 69.6% pass\nrate exceeds RHO’s 68.8% at 17.8% lower mean cost ($2.95 vs. $3.59). These results show that\nbetter task performance need not come at a higher execution cost. For the medium mode, we retain\nstrong task performance while reducing cost further. On SWE-Bench Pro, it achieves a 79.0% pass\nrate compared with RHO’s 80.0%, while reducing the average cost per task by 53.0%, from $2.68\nto $1.26. The lite mode lowers cost further, outperforming Vanilla on all three benchmarks while\nspending 17.7–57.4% less, making it an economical choice for deployment under strict budget\nconstraints. Even with comparable iteration budgets, H ARNESS P RO achieves a better performance–\ncost trade-off than RHO+Iteration. Our medium mode matches the performance of RHO+Iteration\non Terminal-Bench 2 at 31.7% lower cost. Moreover, on ProgramBench, our heavy mode raises\npass rate by 1.3 percentage points while lowering mean cost by 5.8%.\nThe results with GLM-5.2 and Claude Code follow a similar pattern: the heavy mode of H AR NESS P RO surpasses RHO on all three benchmarks at lower cost, while the medium and lite modes\noutperform Vanilla in pass rate, often at substantially lower cost. Moreover, although latency is\nnot an objective, cost optimization yields faster task completion in most cases. For example, on\nSWE-Bench Pro, our heavy mode reduces mean latency from RHO’s 520 to 412 seconds.\n7\n\n\fUnder review\n\nTable 2: Performance and efficiency across three benchmarks. P denotes pass rate (%), while C\nand T denote mean cost ($) and execution time (s). We report mean and standard deviation for\nH ARNESS P RO. On ProgramBench, P is the macro-average of the fraction of tests passed per task.\nTerminal-Bench 2\nSWE-Bench Pro\nProgramBench\nP(%) ↑\nC($) ↓\nT(s) ↓\nP(%) ↑\nC($) ↓\nT(s) ↓\nP(%) ↑\nC($) ↓\nT(s) ↓\nGPT-5.5 × Codex\nVanilla\n69.5\n0.89\n260\n59.0\n1.88\n337\n60.3\n2.65\n669\nDynamic Cheatsheet\n72.9\n1.06\n421\n62.0\n2.19\n335\n68.5\n3.58\n742\nReasoningBank\n74.6\n0.99\n369\n61.0\n2.13\n341\n62.5\n3.06\n661\nSleep-time Compute\n74.6\n1.04\n331\n62.0\n2.26\n337\n67.7\n3.38\n637\nRHO\n76.3\n1.09\n354\n80.0\n2.68\n437\n68.8\n3.59\n928\nBalance\n74.6\n0.79\n355\n78.0\n2.08\n399\n65.7\n3.29\n865\nRHO+Iteration\n76.3\n0.82\n328\n80.0\n1.90\n375\n68.3\n3.13\n789\nHarnessPro-Lite\n72.9± 1.7 0.43± 0.01 230± 32 72.3± 0.6 0.80± 0.02 203± 19 64.3± 0.04 2.18± 0.06 985± 70\nHarnessPro-Medium 76.3± 1.7 0.56± 0.04 253± 35 79.0± 1.0 1.26± 0.03 326± 25 67.9± 0.47 2.90± 0.13 745± 61\nHarnessPro-Heavy\n80.8± 1.0 0.72± 0.05 310± 31 80.7± 0.6 1.97± 0.02 333± 10 69.6± 1.03 2.95± 0.13 888± 32\nGLM-5.2 × Claude Code\nVanilla\n74.6\n0.92\n963\n56.0\n1.17\n402\n59.7\n11.34\n3847\nRHO\n78.0\n1.00\n1318\n75.0\n2.17\n520\n63.3\n17.00\n6434\nHarnessPro-Lite\n75.1± 1.0 0.43± 0.03 665± 8 70.7± 0.6 0.70± 0.02 289± 3 60.1± 0.6 11.10± 0.28 3907± 32\nHarnessPro-Medium 76.3± 0.0 0.50± 0.01 968± 17 75.0± 1.0 0.87± 0.01 332± 10 63.0± 0.4 13.74± 0.16 5893± 132\nHarnessPro-Heavy\n81.4± 1.7 0.62± 0.02 1080± 15 77.3± 0.6 1.01± 0.03 412± 11 64.4± 0.8 14.95± 0.08 5925± 110\nMethod\n\n5.3\n\nA NALYSIS OF E VOLVED H ARNESSES\n\nTo understand how H ARNESS P RO improves the performance-cost trade-off, we inspect its evolved\nharnesses. On Terminal-Bench 2 and SWE-Bench Pro, they select an execution profile from each\ntask description. Each profile specifies a reasoning effort level and a tool-call budget. The lite,\nmedium, and heavy modes use different rubrics for profile selection. Runtime hooks enforce the\nselected budget. For example, on Terminal-Bench 2, when H ARNESS P RO-Medium selects the standard profile, the hooks remind the agent to produce parallel tool calls and avoid redundant checks\nafter 14 tool calls, focus on completing and verifying the task after 26, and block further calls after\n44. The reminders are appended to tool results, preserving the prompt prefix for cache reuse. Alongside these dynamic mechanisms, the evolved harnesses also reduce static context redundancy. On\nTerminal-Bench 2, for instance, tool-output compression like RTK (Szymkowiak, 2026) folds repeated logs and condenses long outputs, while streamlined developer instructions reduce redundant\ninput. This combination curbs recurring prompt overhead and limits the context growth caused by\nverbose tool feedback, thereby reducing execution cost and latency. Implementation details of these\nharnesses are in Appendix D.1.\n5.4\n\nE VOLUTION DYNAMICS\n\nFigure 4 tracks test-set performance and cost across epochs. Across all three benchmarks,\nH ARNESS P RO advances the performance-cost Pareto frontier through recursive harness selfimprovement. On Terminal-Bench 2, each round of evolution improves the retained Pareto frontier,\nyielding higher pass rates at lower costs. For example, the pass rate of the heavy mode rises from\n74.6% in epoch 1 to a mean of 80.8% in epoch 3, while mean cost per task falls from $0.91 to\n$0.72. The lite and medium modes also maintain their pass rates from epoch 2 to 3, while their\nmean costs fall from $0.61 to $0.43 and from $0.68 to $0.56, respectively. The benefits of additional\nevolution epochs are particularly clear on SWE-Bench Pro, where a single run may raise pass rate\nat the expense of higher cost. In the medium mode, pass rate rises from 70.0% in epoch 1 to 77.0%\nin epoch 2, but mean cost also rises from $1.57 to $1.66. Only in epoch 3 does it improve both\nmetrics, with pass rate rising to 79.0% and mean cost falling to $1.26 per task. On ProgramBench,\nthe fourth epoch likewise lowers costs across all three modes while maintaining similar pass rates.\nThese patterns highlight an advantage of recursive self-improvement over single-round evolution.\n5.5\n\nA BLATION S TUDY\n8\n\n\fUnder review\n\nMacro-average pass rate (%)\n\n75\n\n77.5\n\nPass rate (%)\n\nPass rate (%)\n\n70\n\n80\n\n80.0\n\n75.0\n\n70\n\n72.5\n\n65\n\n70.0\n\n60\n0.45\n\n0.60\n\n0.75\n\n0.90\n\nMean cost per task ($)\n\n(a) Terminal-Bench 2\n\n1.05\n\n68\n66\n64\n62\n60\n\n0.8\n\n1.2\n\n1.6\n\n2.0\n\nMean cost per task ($)\n\n(b) SWE-Bench Pro\n\n2.4\n\n2.8\n\n2.1\n\n2.4\n\n2.7\n\n3.0\n\nMean cost per task ($)\n\n3.3\n\n3.6\n\n(c) ProgramBench\n\nFigure 4: Evolution dynamics of H ARNESS P RO with GPT-5.5 and Codex. Dashed lines connect\nthe harnesses retained in each epoch, and diamonds denote baselines. Intermediate-epoch test-set\nmetrics are reported for visualization only and were not used for filtering or selection. Final-epoch\npoints show means across repeated test runs.\n\nTable 3 examines the contribu- Table 3: Ablations with GPT-5.5 and Codex. In the RHO\ntions of main components of H AR - variants, + dynamic routing selects reasoning effort from\nNESS P RO . We also report Cost-of- task descriptions, + budget hooks append budget reminders\nPass (CoP) (Erol et al., 2026), the to tool results and + low reasoning effort fixes effort at low.\ntotal execution cost divided by the\nTerminal-Bench 2\nSWE-Bench Pro\nnumber of successful tasks. Re- Method\nP(%) ↑ C($) ↓ CoP($) ↓ P(%) ↑ C($) ↓ CoP($) ↓\nmoving the planner reduces perforRHO\n76.3\n1.09\n1.43\n80.0\n2.68\n3.35\nmance and increases cost in most ex- RHO + dynamic routing\n76.3\n0.92\n1.21\n76.0\n2.13\n2.80\nperiments. For example, on SWE- RHO + budget hooks\n76.3\n0.92\n1.21\n75.0\n1.75\n2.33\nBench Pro, the pass rate of the RHO + low reasoning effort 62.7 0.45 0.72 59.0 1.08 1.83\n72.9\n0.43\n0.59\n72.3\n0.80\n1.11\nmedium mode drops from 79.0% to HarnessPro-Lite\nw/o planner\n72.9\n0.41\n0.56\n70.0\n0.98\n1.40\n73.0%, while mean cost rises from\nw/o test synthesizer\n67.8\n0.67\n0.99\n64.0\n0.78\n1.22\n$1.26 to $1.42 per task. Remov- HarnessPro-Medium\n76.3\n0.56\n0.73\n79.0\n1.26\n1.59\nw/o planner\n74.6\n0.61\n0.82\n73.0\n1.42\n1.95\ning the test synthesizer has a larger\nw/o test synthesizer\n72.9\n0.82\n1.12\n69.0\n1.37\n1.99\nimpact, with pass rates dropping\nHarnessPro-Heavy\n80.8\n0.72\n0.89\n80.7\n1.97\n2.44\nby 3.4–10.0 percentage points across\nw/o planner\n79.7\n1.04\n1.30\n79.0\n2.12\n2.68\nboth benchmarks and all three modes.\nw/o test synthesizer\n74.6\n0.88\n1.18\n72.0\n1.62\n2.25\nThese performance drops highlight\nthe value of our multi-agent framework. Beyond these component ablations, we also examine\nwhether RHO can achieve similar gains by simply adopting individual strategies from our evolved\nharnesses. As shown in Table 3, adding either dynamic routing or budget hooks to RHO reduces cost,\nbut can also degrade task performance. On SWE-Bench Pro, both variants reduce cost but achieve\nlower pass rates than RHO’s 80.0%. Uniformly using low reasoning effort yields larger cost savings\nbut also substantially degrades performance. Overall, all three RHO variants are Pareto-dominated\nby harnesses evolved by H ARNESS P RO, which achieve higher pass rates at lower cost.\n\n6\n\nC ONCLUSION\n\nWe introduced H ARNESS P RO, a label-free approach to recursive harness self-improvement that improves task performance while reducing execution cost. To this end, it coordinates trajectory diagnosis and harness modification through a multi-agent framework, with a dedicated planner proposing\nupdate plans and LLM-generated tests guiding candidate evaluation. Rather than producing a single\nharness, H ARNESS P RO offers cost-focused (lite), balanced (medium), and performance-focused\n(heavy) alternatives to meet different deployment budgets. Experiments across three benchmarks\nshow that H ARNESS P RO can improve task performance while reducing execution cost, with additional benefits in latency. Further analysis attributes these gains to the synergy of multiple evolved\nmechanisms and shows sustained progress through recursive self-improvement. These findings show\nthat performance and efficiency can improve together, making cost-aware evolution a promising direction for practical recursive self-improvement in harness optimization.\n9\n\n\fUnder review\n\nAI U SE S TATEMENT\nGenerative AI tools were used to assist with software implementation and the drafting and editing\nof this manuscript. Separately, LLMs are integral to the method studied in this work: they analyze\nexecution trajectories, propose and implement harness updates, and synthesize tests during harness\nevolution. All AI-assisted code and text were manually reviewed, and all reported results were\nchecked by the authors.\nR EPRODUCIBILITY S TATEMENT\nThe full evolution procedure and optimization objective are described in Sections 3 and 4, with\npseudocode in Algorithm 1. Section 5.1 specifies the benchmarks, model and agent versions, rollout\ncounts, evolution epochs, selection hyperparameters, and evaluation metrics. The appendix provides\nthe evolution instructions, token-pricing assumptions, and representative artifacts from the frozen\nevolved harnesses.\n\nR EFERENCES\nMengzhuo 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, 2026a. URL https://arxiv.org/abs/2606.06324.\nTingyang Chen, Shuo Lu, Kang Zhao, Weicheng Meng, Hanlin Teng, Tianhao Li, Chao Li, Xule\nLiu, Jian Liang, Zhizhong Zhang, Yuan Xie, Heng Qu, Kun Shao, and Jian Luan. HarnessX: A\ncomposable, adaptive, and evolvable agent harness foundry. arXiv preprint arXiv:2606.14249,\n2026b. URL https://arxiv.org/abs/2606.14249.\nXiang Deng, Jeff Da, Edwin Pan, Yannis Yiming He, Charles Ide, Kanak Garg, Niklas Lauffer, Andrew Park, Chetan Rane, Karmini Sampath, Maya Krishnan, Srivatsa Kundurthy, Sean Hendryx,\nZifan Wang, Chen Bo Calvin Zhang, Noah Jacobson, Bing Liu, and Brad Kenstler. SWE-Bench\nPro: Can AI agents solve long-horizon software engineering tasks? In International Conference\non Machine Learning, 2026. URL https://icml.cc/virtual/2026/poster/61047.\nMehmet Hamza Erol, Batu El, Mirac Suzgun, Mert Yuksekgonul, and James Zou. Cost-of-pass: An\neconomic framework for evaluating language models. In The Fourteenth International Conference on Learning Representations, 2026. URL https://openreview.net/forum?id=\nvC9S20zsgN.\nJingzhi Gong, Ruizhen Gu, Zhiwei Fei, Yazhuo Cao, Lukas Twist, Alina Geiger, Shuo Han,\nDominik Sobania, Federica Sarro, and Jie M. Zhang. SkillMOO: Multi-objective optimization of agent skills for software engineering. arXiv preprint arXiv:2604.09297, 2026a. URL\nhttps://arxiv.org/abs/2604.09297.\nJingzhi Gong, Jie M. Zhang, Gunel Jahangirova, Dong Huang, Mohammad Reza Mousavi, and\nMark Harman. COMPAS: Difficulty-aware joint search for optimizing code generation. arXiv\npreprint arXiv:2608.04336, 2026b. URL https://arxiv.org/abs/2608.04336.\nMikaela Grace, Jeremy Hadfield, Rodrigo Olivares, and Jiri De Jonghe. Demystifying evals for\nAI agents. Anthropic Engineering, January 2026. URL https://www.anthropic.com/\nengineering/demystifying-evals-for-ai-agents. Published January 9, 2026.\nAlex Kulesza and Ben Taskar. Determinantal point processes for machine learning. Foundations\nand Trends in Machine Learning, 5(2–3):123–286, 2012.\nSongxin Lei, Kun Ouyang, Weilin Ruan, Yuqian Wu, Zhijiang Guo, Yushi Sun, and Fugee Tsung.\nMemoryCPT: An end-to-end agent memory framework for cost-performance trade-off. arXiv\npreprint arXiv:2608.04843, 2026. URL https://arxiv.org/abs/2608.04843.\nJiahang Lin, Shichun Liu, Chengjun Pan, Lizhi Lin, Shihan Dou, Zhiheng Xi, Xuanjing\nHuang, Hang Yan, Zhenhua Han, Tao Gui, and Yu-Gang Jiang. Agentic harness engineering: Observability-driven automatic evolution of coding-agent harnesses. arXiv preprint\narXiv:2604.25850, 2026. URL https://arxiv.org/abs/2604.25850.\n10\n\n\fUnder review\n\nKevin Lin, Charlie Snell, Yu Wang, Charles Packer, Sarah Wooders, Ion Stoica, and Joseph E.\nGonzalez. Sleep-time compute: Beyond inference scaling at test-time. arXiv preprint\narXiv:2504.13171, 2025. URL https://arxiv.org/abs/2504.13171.\nTengxiao Liu, Zifeng Wang, Jin Miao, I-Hung Hsu, Jun Yan, Jiefeng Chen, Rujun Han, Fangyuan\nXu, Yanfei Chen, Ke Jiang, Samira Daruki, Yi Liang, William Yang Wang, Tomas Pfister,\nand Chen-Yu Lee. Budget-aware tool use enables effective agent scaling. arXiv preprint\narXiv:2511.17006, 2025. URL https://arxiv.org/abs/2511.17006.\nR. T. Marler and J. S. Arora. Survey of multi-objective optimization methods for engineering. Structural and Multidisciplinary Optimization, 26(6):369–395, 2004. doi: 10.1007/\ns00158-003-0368-6.\nOpenAI. Agents API architecture. https://developers.openai.com/api/docs/\nguides/agents-api/architecture/, 2026. Accessed: 2026-09-12.\nSiru 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. URL https://openreview.net/forum?id=jL7fwchScm.\nWenbo Pan, Shujie Liu, Chin-Yew Lin, Jingying Zeng, Xianfeng Tang, Xiangyang Zhou, Yan Lu,\nand Xiaohua Jia. Evolving agents in the dark: Retrospective harness optimization via selfpreference. arXiv preprint arXiv:2606.05922, 2026a. URL https://arxiv.org/abs/\n2606.05922.\nZhuoshi Pan, Qizhi Pei, Junru Lu, Honglin Lin, H. Vicky Zhao, Di Yin, and Xing Sun. ContextPilot:\nTeaching agents for proactive context management via fine-grained RL. In Proceedings of the\n2026 Conference on Empirical Methods in Natural Language Processing, Budapest, Hungary,\nNovember 2026b. Association for Computational Linguistics.\nMirac Suzgun, Mert Yuksekgonul, Federico Bianchi, Dan Jurafsky, and James Zou. Dynamic cheatsheet: Test-time learning with adaptive memory. In Proceedings of the 19th Conference of the\nEuropean Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pp.\n7080–7106. Association for Computational Linguistics, 2026. doi: 10.18653/v1/2026.eacl-long.\n333. URL https://aclanthology.org/2026.eacl-long.333/.\nPatrick Szymkowiak. RTK: Rust Token Killer. GitHub repository, 2026. URL https://\ngithub.com/rtk-ai/rtk. Accessed September 20, 2026.\nThe Terminal-Bench Team. Terminal-Bench: A benchmark for AI agents in terminal environments,\nApril 2025. URL https://github.com/laude-institute/terminal-bench.\nXuhui Wang, Ruoqi Shu, Chen Dan, Tianhua Xu, Mengxi Luo, Yanming Mai, and Bo Wan.\nFRAMES: Guarded and dual-objective skill evolution for agents in policy-governed enterprise\nworkflows. arXiv preprint arXiv:2608.01772, 2026. URL https://arxiv.org/abs/\n2608.01772.\nJohn Yang, Kilian Lieret, Jeffrey Ma, Parth Thakkar, Dmitrii Pedchenko, Sten Sootla, Emily\nMcMilin, Pengcheng Yin, Rui Hou, Gabriel Synnaeve, Diyi Yang, and Ofir Press. ProgramBench: Can language models rebuild programs from scratch? arXiv preprint arXiv:2605.03546,\n2026a. URL https://arxiv.org/abs/2605.03546.\nYifan Yang, Ziyang Gong, Weiquan Huang, Qihao Yang, Ziwei Zhou, Zisu Huang, Yan Li, Xuemei\nGao, Qi Dai, Bei Liu, Kai Qiu, Yuqing Yang, Dongdong Chen, Xue Yang, and Chong Luo.\nSkillOpt: Executive strategy for self-evolving agent skills. arXiv preprint arXiv:2605.23904,\n2026b. URL https://arxiv.org/abs/2605.23904.\nAsaf Yehudai, Lilach Eden, Alan Li, Guy Uziel, Yilun Zhao, Roy Bar-Haim, Arman Cohan, and\nMichal Shmueli-Scheuer. A survey on evaluation of LLM-based agents. In Findings of the Association for Computational Linguistics: ACL 2026, pp. 26690–26714, 2026. doi: 10.18653/v1/\n2026.findings-acl.1330. URL https://aclanthology.org/2026.findings-acl.\n1330/.\n11\n\n\fUnder review\n\nJenny Zhang, Shengran Hu, Cong Lu, Robert Lange, and Jeff Clune. Darwin Godel machine:\nOpen-ended evolution of self-improving agents. In International Conference on Learning Representations, 2026. URL https://openreview.net/forum?id=43n76kz3F5.\nJiayi 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 International Conference on Learning\nRepresentations, 2025. URL https://arxiv.org/abs/2410.10762.\n\n12\n\n\fUnder review\n\nA\n\nI MPLEMENTATION D ETAILS\n\nA.1\n\nDPP-BASED C ORESET S ELECTION\n\nWe select the training coreset once, before harness evolution. Following RHO (Pan et al., 2026a), let\nU = {1, . . . , M } index the candidate tasks. For each task xi , we collect a trajectory under the initial\nharness. A language-model judge reads the task description and trajectory, then assigns a difficulty\nscore ri ∈ [0, 10] and an abstract failure-mode fingerprint ϕi . The fingerprint omits task-specific\nnames so that similarity reflects shared challenges rather than superficial project details.\nLet ui be the unit-normalized embedding of ϕi . We compute cosine similarity and construct a\ndifficulty-weighted DPP kernel:\nSij = u⊤\nqi = max(ri /10, ε),\ni uj ,\n\u0012\n\u0013α\nθ\nwi = qi / max qj\n,\nα=\n,\nj\n2(1 − θ)\nK = diag(w) S diag(w).\n\n(10)\n\nWe use ε = 0.1 and θ = 0.7, as in RHO. The difficulty weights favor challenging tasks, while\nthe determinant of a subset’s kernel penalizes redundant fingerprints. For a fixed coreset size k, the\ncorresponding k-DPP assigns each k-element subset Y ⊆ U probability (Kulesza &amp; Taskar, 2012)\ndet(KY )\n,\nZ⊆U , |Z|=k det(KZ )\n\nPr(Y ) = P\nk\n\n(11)\n\nwhere KY is the principal submatrix indexed by Y . We do not sample from this distribution. Instead,\nwe approximate its most probable subset by greedily adding the task that maximizes the resulting\ndeterminant:\nis = arg max det(KYs ∪{i} ),\ni∈U \\Ys\n(12)\nYs+1 = Ys ∪ {is },\nY0 = ∅.\nWe stop after k = 10 tasks and keep this coreset fixed across all evolution epochs. Neither official\ntest results nor validation outcomes enter coreset selection.\nA.2\n\nA DDITIONAL I MPLEMENTATION D ETAILS\n\nReasoning effort and mode weights. The default reasoning effort for GPT-5.5 is high on all three\nbenchmarks. For GLM-5.2, the default is max on Terminal-Bench 2 and SWE-Bench Pro, but\nhigh on ProgramBench, where max tends to induce extensive reasoning and tool use, substantially\nlengthening execution. For the selection rule in Equation 9, the performance-cost weights (αm , βm )\nare (1, 2) for lite, (1, 1) for medium, and (2, 1) for heavy. These weights remain fixed across epochs.\nGeneration settings. Our Codex configurations use the Responses API without explicitly setting\ntemperature, top p, or max output tokens. When used through Codex, GPT-5.5 therefore uses its\ndefault sampling settings. The model supports up to 128,000 output tokens per response.3 For\nGLM-5.2, Terminal-Bench 2 and SWE-Bench Pro use temperature 1.0, top-p 0.95, and a per-request\nmax tokens of 131,072. On ProgramBench, GLM-5.2 runtime uses temperature 1.0, top-p 1.0,\nand max tokens of 32,000, with a 2,000-turn limit.\nSolver and grading budgets. On Terminal-Bench 2, GPT-5.5 uses each task’s native solver limit\n(600–3,600 seconds on the test set). On SWE-Bench Pro, the solver time limit is 1200 seconds\nfor GPT-5.5 and 7,200 for GLM-5.2, and the grader limit is 3,600 seconds for both models. On\nProgramBench, the solver budget is 7,200 seconds, separate from the 14,400 second outer limit for\neach grading branch. These wall-clock limits are distinct from harness-level tool-call budgets.\n3\n\nhttps://developers.openai.com/api/docs/models/gpt-5.5\n\n13\n\n\fUnder review\n\nTable 4: Token prices used to compute execution costs.\nModel\nGPT-5.5 (&lt; 272K context)\nGLM-5.2\n\nUncached input\n\nCached input\n\nOutput\n\n5.00 $/M\n1.40 $/M\n\n0.50 $/M\n0.26 $/M\n\n30.00 $/M\n4.40 $/M\n\nTask environments. Terminal-Bench 2 and ProgramBench allocate 8 CPUs and 32 GiB of memory per solver. SWE-Bench Pro runs solvers in host workspaces without an explicit per-task CPU\nor memory limit. Candidate evaluation uses one rollout per validation task, and final testing is\nperformed only after evolution. Infrastructure failures are excluded and retried to avoid inaccurate\nresults.\nToken pricing. Table 4 reports the public API prices used to convert token usage into execution\ncost. We use the short-context price tier for GPT-5.5 because all requests remain below 272K context\ntokens. Prices follow the official OpenAI4 and Z.ai5 pricing pages.\n\n4\n5\n\nhttps://developers.openai.com/api/docs/pricing\nhttps://docs.z.ai/guides/overview/pricing\n\n14\n\n\fUnder review\n\nB\n\nE VOLUTION I NSTRUCTIONS\nListing 1\n\nCost-focused evolution instruction (I1 )\n\nPrioritize reducing average execution cost while preserving task correctness and\nreliable completion. Seek genuine efficiency gains, not lower bills obtained by\nskipping required work, abandoning difficult tasks, or weakening validation.\nUse the diagnostics, trajectories, and candidate implementations to distinguish\nnecessary work from avoidable expense. Look for recurring sources of redundant\nexploration, repeated context, or low−value verification. Consider the total cost of\nexecution, including unsuccessful attempts and any overhead introduced by the proposed\nchange; fewer steps or shorter outputs alone do not establish an improvement.\nPossible directions include adapting reasoning effort to individual public tasks,\nmanaging context and tool feedback economically, and improving convergence or recovery.\nPreserve the information and checks needed for dependable results. These are optional\nsearch directions, not a checklist: derive any mechanism from the available evidence,\nwithout assuming a routing rubric, fixed thresholds, profile taxonomy, or per−task rules.\nPropose a focused, generalizable plan rather than accumulating optimizations. Explain\nwhich observed expense each change addresses, why correctness should be preserved,\nand what regression risks remain. Distinguish expected savings from measured results;\nthe fixed external evaluator, not the plan’s claims, determines whether quality is\nmaintained and cost is reduced.\n\nListing 2\n\nBalanced evolution instruction (I2 )\n\nSeek a balanced improvement in task reliability and average execution cost. Treat\ncorrectness and efficiency as joint objectives: do not pursue savings by neglecting\nrequired behavior, or assume that additional computation necessarily improves quality.\nA balanced plan should improve the trade−off, not simply average the other directions.\nUse the diagnostics, trajectories, and candidate implementations to identify where\neffort contributes to successful completion and where it is redundant. Compare peer\ncandidates to understand their strengths, weaknesses, and interactions, rather than\ncopying their mechanisms wholesale. Prefer changes that remove low−value work while\npreserving or strengthening the reasoning and validation that matter.\nPossible directions include task−adaptive reasoning effort, concise but recoverable\ncontext, effective use of tool feedback, and verification or recovery guided by observed\nuncertainty. These are optional hypotheses, not prescribed designs. Infer an appropriate\napproach from the evidence; no routing rubric, fixed thresholds, profile names, or\nper−task rules are supplied. Account for the overhead and complexity of combining\nchanges.\nPropose a coherent, generalizable plan and explain its expected quality and cost effects\ntogether. Make uncertain trade−offs and regression risks explicit, including why any\nadded work is worthwhile. Keep predicted benefits separate from established findings\nand let the fixed external evaluator determine whether the joint improvement is real.\n\n15\n\n\fUnder review\n\nListing 3\n\nPerformance-focused evolution instruction (I3 )\n\nPrioritize improving task success while continuing to eliminate avoidable expense.\nFocus on reliable completion and correct behavior, not more elaborate execution for\nits own sake. Performance−focused evolution should invest effort where it can address\nmeaningful failures, rather than increase computation uniformly across tasks.\nUse the diagnostics, trajectories, and candidate implementations to identify\nconsequential failure patterns and the limitations behind them. Examine both successful\nand unsuccessful executions to distinguish useful reasoning or validation from activity\nthat merely adds cost. Draw on peer candidates when their behavior provides relevant\nevidence, but do not assume that a more complex harness is a more capable one.\nPossible directions include adapting reasoning effort to the public task, selective\ndeeper investigation or independent verification, and stronger context or recovery\nmanagement. These are optional hypotheses, not an implementation recipe. Derive the\nactual design from evidence; no routing rubric, fixed thresholds, mandatory review\nschedule, or per−task rules are supplied. Preserve efficient behavior where additional\nwork has no demonstrated purpose.\nPropose a focused, generalizable plan that explains which failures it aims to prevent\nand why the changes should help. If additional work is necessary, state the expected\nquality benefit, cost implications, and remaining risks without presenting predictions\nas measured gains. The fixed external evaluator determines whether the improvement\njustifies the resulting quality−cost trade−off.\n\n16\n\n\fUnder review\n\nC\n\nR EPRESENTATIVE M ULTI -AGENT A RTIFACTS\n\nC.1\n\nT RAJECTORY D IAGNOSES\n\nThese lightly edited analyzer outputs retain issue-level findings from three rollouts of each TerminalBench 2 training task. Outcomes use fixed LLM-generated tests.\nCaffe–CIFAR-10. All three runs failed before training. The analyzer separates a shared build\nbottleneck from run-specific stalls and a potential downstream risk.\nCase 1 Caffe–CIFAR-10: incomplete training\nTask: Build CPU−only Caffe and train CIFAR−10 for 500 iterations.\nOutcome: No run completed conversion or training, saved a model or log,\nor verified accuracy.\nIssue 1: All three workflows ended before training.\nProblem: Run 0 was fixing a protobuf build issue; run 1 had built\nCaffe but was downloading CIFAR−10; run 2 was still rebuilding after\nan out−of−memory (OOM) failure.\nCost impact: Long installs, builds, and downloads produced no final\ntraining artifacts.\nEvidence: run−0−trace−0.jsonl:89−97; run−1−trace−0.jsonl:96−111;\nrun−2−trace−0.jsonl:74−80.\nIssue 2: High build parallelism caused OOM failures in every run.\nProblem: Runs 0 and 1 used make all −j$(nproc), and run 2 used\ncmake −−build build −−parallel 7. OOM−killed compiler processes\nprompted lower−parallelism retries.\nQuality impact: Runs 0 and 2 still lacked a successful build at the\ntrace end, delaying data preparation and training.\nCost impact: Failed compile passes and rebuilds wasted time.\nEvidence: run−0−trace−0.jsonl:71−89; run−1−trace−0.jsonl:90−96;\nrun−2−trace−0.jsonl:61−80.\nIssue 3: The most advanced run stalled on the CIFAR−10 download.\nProblem: Run 1 interrupted a slow single−stream download, installed\naria2, and ended while its replacement parallel download was ongoing.\nQuality impact: Conversion, mean generation, training, and model\nverification were not reached despite a completed Caffe build.\nCost impact: The interrupted download, package install, and retry\nadded post−build time without completing data preparation.\nEvidence: run−1−trace−0.jsonl:96−111.\nIssue 4: A likely downstream data−preparation blocker (not observed).\nProblem: Run 0 configured Caffe without OpenCV, although the stock\nCIFAR pipeline calls compute image mean, which requires USE OPENCV.\nQuality impact: Had run 0 reached this step, mean generation would\nlikely have failed; the trace does not show such a failure.\nCost impact: An OpenCV−enabled rebuild or alternative preparation path\nwould likely have been needed after the existing build work.\nEvidence: run−0−trace−0.jsonl:60−69; run−1−trace−0.jsonl:69;\nrun−2−trace−0.jsonl:36−37.\nIssue 5: Run 0 recovered from an incorrect source tag.\nIt tried the nonexistent 1.0.0 branch, inspected tags, then used 1.0;\nthis added commands before the build but no lasting quality loss.\nEvidence: run−0−trace−0.jsonl:27−42.\n\n17\n\n\fUnder review\n\nMailman. In contrast, all three Postfix/Mailman 3 configurations passed the generated tests. The\ndiagnosis separates useful end-to-end verification from broad exploration, redundant checks, and\ntwo run-specific detours that increased cost without changing the final outcome.\nCase 2 Mailman: successful but costly execution\nTask: Configure a mailing list with join, leave, and post delivery.\nOutcome: All three rollouts passed the generated tests.\nIssue 1: Exploration went well beyond the relevant configuration.\nProblem: All runs dumped large Mailman/Postfix configs and package\nsource/tests after the task and eval narrowed the relevant surface\nto mailman.cfg, Postfix local delivery, and Mailman LMTP maps.\nQuality impact: Some inspection helped, but the broader search added\nlittle evidence for final correctness.\nCost impact: Trace totals reached 1,058,946, 1,763,487, and\n2,517,861 input tokens in runs 0, 1, and 2, respectively; broad\ndumps and repeated exploration were major contributors.\nEvidence: run−0−trace−0.jsonl:36−69,86−93,180;\nrun−1−trace−0.jsonl:22−27,175; run−2−trace−0.jsonl:18−19,180.\nIssue 2: Final evaluations repeated already covered behavior.\nProblem: Manual join/post/leave smoke tests usefully checked delivery\nand leave confirmation, but /app/eval.py was rerun after these and\nearlier evaluations had passed.\nQuality impact: Extra evals added little end−to−end coverage.\nCost impact: Each eval created Unix users, exercised mail queues,\nand included retry sleeps.\nEvidence: run−0−trace−0.jsonl:149−153;\nrun−1−trace−0.jsonl:158−173;\nrun−2−trace−0.jsonl:102−122,167−170.\nIssue 3: Run 2’s smoke test temporarily broke mail delivery.\nProblem: Opening /var/mail/&lt;user&gt; with mailbox.mbox() before Postfix\ncreated it produced a root−owned mailbox, so confirmation mail bounced.\nQuality impact: The agent diagnosed this test−induced failure and\nreran the smoke test successfully; the final outcome was unaffected.\nCost impact: Log/queue inspection, qfile decoding, reconnects, and\nanother full smoke test followed.\nEvidence: run−2−trace−0.jsonl:123−152.\nIssue 4: A service−control pipeline hung in run 1.\nProblem: A daemonized Mailman start inherited a pipe to sed, leaving\nthe wrapper running after the services started.\nQuality impact: Services ran, so the final result was unaffected.\nCost impact: The agent polled, inspected logs and processes, then\nterminated the wrapper before evaluation.\nEvidence: run−1−trace−0.jsonl:104−126.\nIssue 5: A broad recipient−validation workaround carried a risk.\nProblem: Run 1 disabled SMTP−time local recipient validation after\nlookup failures; run 2 also ended with local recipient maps empty.\nQuality impact: Delivery passed for valid Unix users. Invalid local\nrecipients might be accepted at SMTP time and fail later, a risk\nnot observed in the tests.\nCost impact: Two failed evals and map debugging preceded the fallback.\nEvidence: run−1−trace−0.jsonl:130−159;\nrun−2−trace−0.jsonl:99−100,172−173.\n\n18\n\n\fUnder review\n\nC.2\n\nE VOLUTION P LANS\n\nThe following Terminal-Bench 2 plans illustrate three performance-cost priorities. The medium and\nheavy plans start from the same initial harness and trajectory diagnoses. A later lite proposal for\nan edited descendant responds to a router that often chose high or xhigh. The listings retain the\nPlanner’s wording and structured fields, with line breaks added for readability. Some passages are\nomitted to save space.\nCase 3 Medium plan: introduce task-adaptive routing (excerpt)\nobjective: Improve the empty baseline harness by adding general solver\nguidance and lightweight execution support that preserves task−relevant\nverification while cutting repeated broad exploration, noisy command\noutput, and overconfident local−success conclusions.\nchanges:\nREADME.md: Add concise solver guidance: start from the public task\ncontract and required artifacts;\n\n...\n\n(content is excerpted to save space) ...\n\nruntime.json: Add a small runtime configuration referencing\nrouter prompt.txt and setting tool output token limit to a moderate\nvalue such as 12000, without adding a review session or replacing\nthe model instructions.\nrouter prompt.txt: Add a general cost−aware routing prompt that\nchooses the lowest reasoning effort likely to complete the public\ntask: low for bounded recovery or simple one−artifact tasks, medium\nfor routine code/configuration with clear tests, high for multi−file\nimplementations, builds, interpreters, protocol/integration work,\nnumerical algorithms, or weak local oracles, and xhigh only for\nunusually open−ended tasks where failure would likely come from\ndeep reasoning rather than environment setup. Require JSON with\nreasoning effort and a short rationale.\ntools/guarded−run: Add an executable POSIX shell helper for long or\nnoisy commands. It should run a command under a timeout, save full\nstdout/stderr to a log file, and print only exit status, elapsed\ntime, log path, and bounded head/tail excerpts.\n\n...\n\n(content is excerpted to save space) ...\n\ntools/quick−probe: Add an executable POSIX shell helper that prints a\ncompact one−time environment snapshot: cwd, top−level files, whether\nthe directory is a git repo, and availability of common tools.\n\n...\n\n(content is excerpted to save space) ...\n\nquality impact: Established findings show failures and regressions came\nless from insufficient raw deliberation and more from shallow or\nmisread validation, unfinished long−running workflows, environment\nassumptions, and task−integrity problems.\n\n...\n\n(content is excerpted to save space) ...\n\ncost impact:\n\n...\n\n(content is excerpted to save space) ...\n\nThe router adds a small high−effort classification call, but should\nrepay that overhead on simpler tasks by avoiding default high−effort\nsolving while preserving higher effort for tasks where it is likely\nuseful.\n\n...\n\n(content is excerpted to save space) ...\n\nrisks: The router may under−allocate effort for deceptively simple tasks,\nand the routing call can be net−negative on very small tasks. Output\ncaps and guarded summaries can hide important diagnostics unless the\nsolver follows the log−path recovery guidance.\n\n...\n\n(content is excerpted to save space) ...\n\n19\n\n\fUnder review\n\nCase 4 Heavy plan: verify task artifacts (excerpt)\nobjective: Add a small, general harness that steers solvers toward\npublic−contract verification, bounded exploration, and cheaper command\noutput while preserving flexibility for varied tasks.\n\n...\n\n(content is excerpted to save space) ...\n\nchanges:\nREADME.md: Create concise solver guidance: derive an acceptance\nchecklist from the public task first; use only public task files and\nlegitimate upstream documentation, never benchmark\nanswers/graders/solutions; inspect files in narrow slices; check\ntool availability once; prefer Python fallback inspection in minimal\ncontainers; avoid dumping large logs, matrices, generated files, or\nwhole source files; complete all running commands before final;\nverify required artifacts with semantic/end−to−end checks rather\nthan only syntax, existence, or nonblank outputs.\nruntime.json: Create with a conservative tool output token limit, for\nexample 16000, to cap accidental giant outputs from package managers,\nbuild logs, tracebacks, git usage text, and file dumps while still\nleaving room for meaningful compiler or test failures.\ntools/run logged.py: Add an executable Python helper with a shebang\nthat runs a command with an optional timeout, writes the full\nstdout/stderr stream to a log file, and prints only command, exit\ncode, elapsed time, and the final bounded tail. README should\nrecommend it for apt/build/train/long−test commands so expensive\nworkflows can preserve diagnostics without flooding context.\ntools/probe.py: Add an executable Python helper with a shebang for\ncommon low−dependency inspections: command−exists checks, limited\nhead/tail display, hex/ascii byte previews, JSON validation, CSV\ncolumn/row summaries, file size/hash, and simple BMP/PNG metadata\nwhere possible. This replaces repeated assumptions about\nunavailable utilities such as file, sqlite3, xxd, strings, and git.\nquality impact: Expected to improve reliability by making solvers\nexplicitly map public requirements to final artifacts, require\nsemantic verification before success claims, and avoid continuing\nfrom misleading checks such as command−not−found text hidden inside\nsuccessful pipelines.\n\n...\n\n(content is excerpted to save space) ...\n\ncost impact: Expected to reduce avoidable token and latency costs from\nrepeated broad file reads, package/build log dumps, missing−tool\nprobes, noisy git failures, and redundant post−success inspection.\n\n...\n\n(content is excerpted to save space) ...\n\nThere is no added second solver session or uniform extra reasoning\npass.\nrisks: Guidance−only changes depend on solver compliance, and an output\ncap can hide useful detail if commands are not logged through the\nhelper. The helper scripts must remain dependency−free and generic.\nMore rigorous semantic verification can add some task−local execution\ncost, so the README should emphasize checks tied to public\nrequirements rather than broad extra exploration.\n\n20\n\n\fUnder review\n\nCase 5 Lite plan: make routing more cost-sensitive (excerpt)\nobjective: Reduce solver and exploratory cost by correcting a router that\nwas observed to choose high or xhigh for most sampled tasks, while\nretaining task−specific reasoning−effort selection and public−contract\ncorrectness.\nchanges:\nruntime.json: Keep router prompt connected so each task still receives\na dynamically selected reasoning effort.\n\n...\n\n(content is excerpted to save space) ...\n\nReduce tool output token limit from 12000 to about 8000 to limit recurring\ntranscript growth without removing useful diagnostics.\nrouter prompt.txt: Rewrite the rubric to counter the observed\nhigh/xhigh bias: make medium the preferred starting point for bounded\ntasks with a plausible implementation path and practical checks,\neven when they mention several files, a build, data processing, or\nan unfamiliar domain. Choose low more readily when the requested\nchange is concrete and its result can be checked directly. Escalate\nto high only for substantial unresolved reasoning or weak\nverification, and to xhigh only for exceptional cases where deeper\nreasoning is likely to change the solution.\n\n...\n\n(content is excerpted to save space) ...\n\nREADME.md: Revise guidance to reference helpers by absolute harness\npath, such as $HARNESSPRO HARNESS/tools/guarded−run and\n$HARNESSPRO HARNESS/tools/quick−probe, because relative tools/ paths\nfailed from task working directories.\n\n...\n\n(content is excerpted to save space) ...\n\nstop extra stress testing\nonce public−contract coverage plus one meaningful semantic check\nhas passed.\ntools/guarded−run: Tighten defaults and output shaping: reduce the\ndefault excerpt size, add a per−line character cap while preserving\nthe full log path, and keep timeout/status/elapsed reporting.\n\n...\n\n(content is excerpted to save space) ...\n\ntools/quick−probe: Extend the probe output to include\nHARNESSPRO HARNESS, the absolute helper paths, and a compact\navailability table only.\n\n...\n\n(content is excerpted to save space) ...\n\nquality impact: Dynamic routing remains available for tasks that\ngenuinely need high or xhigh reasoning, while the solver guidance\nstrengthens public−contract and semantic validation. Favoring medium\nand, for directly checkable work, low should not sacrifice quality\nsolely to save tokens; the router must still escalate when the\napproach or verification is genuinely uncertain.\ncost impact: The observed router usually chose high or xhigh despite\nadding its own high−reasoning turn, so it incurred fixed routing cost\nwithout much solver−effort reduction.\n\n...\n\n(content is excerpted to save space) ...\n\nSavings remain a hypothesis until measured on task rollouts.\nrisks: The observed high/xhigh choices may include genuinely difficult\ntasks; shifting toward medium or low could hurt quality if public\ndescriptions hide hard reasoning or weak oracles.\n\n...\n\n(content is excerpted to save space) ...\n\nKeep high and xhigh available for substantial uncertainty, and\ncompare per−task outcomes and costs before treating the revised\nrubric as an improvement.\n\n21\n\n\fUnder review\n\nC.3\n\nT EST S YNTHESIZER C ONFIGURATION\n\nOur test-synthesis agent uses an instruction and skill together with an MCP-based validation tool.\nThe first two listings present selected passages from the deployed text, with output-schema fields\ncondensed; the third summarizes the tool interface. Together, they show how the agent designs tests\nfrom public evidence, checks them against a frozen artifact, and reviews the suite without access to\nofficial tests or labels.\nListing 4\n\nTest-synthesis instruction (excerpt)\n\nUse $empty−test−authoring. In this one Codex invocation, write ten distinct\nexecutable cases, validate them on the frozen Empty product, inspect the results,\nand self−review the final suite. No separate reviewer is part of this run.\n## Evidence boundary\nRead /work/public−task.json, relevant /public inputs, and the read−only\n/empty product. The task description and public files define the contract;\nEmpty is only an implementation and execution−diagnostic context, never an\nanswer key. Public sample programs and evaluation helpers may be used.\n...\nDo not seek or use the target’s hidden official tests, grader, solution,\ngrades, or earlier target suites, locally or online. Do not modify Empty.\n## Test design\nInventory the public requirements and the actual input and output interfaces\nbefore testing Empty. Cover distinct documented behaviors, valid alternatives,\nboundaries, and justified combinations; do not invent extra obligations to\nfill the fixed count.\n...\nFor each central requirement, invoke the real delivered product and assert a\nmeaningful relation between its output and independent public evidence.\nA file existing, successful process, shape, nonempty value, or plausible range\nalone does not establish the required behavior.\n...\nChoose the strongest justified oracle available: compatible public reference,\nknown answer, necessary content property, or discriminating metamorphic\nrelation. Never derive expected constants, hashes, tolerated values, or\nexecution paths from Empty.\n## Execute and self−review\nWrite the complete suite, then call validate generated tests on it. A tool\nresult with status=ok, passed=false is a valid execution with possible product\nfailures; making Empty pass is not the objective. infra error is inconclusive:\ninspect the traceback and public evidence to distinguish test/setup defects\nfrom product exceptions under valid invocation. Repair only demonstrated test\ndefects, preserving the public requirement and legitimate Empty failures. Do\nnot skip cases, catch all exceptions, or tune expectations toward Empty.\nAfter every executable edit, rerun the tool; the final executable files must\nmatch a completed execution without infrastructure error. Run tests serially.\nSelf−review every case, expected value, and shared helper after the final run.\n...\n## Output contract\nWrite UTF−8 files under /work/output, at most 1 MiB per file and 4 MiB total:\n− test generated.py: exactly test case 0001 through test case 0010 as\nunittest.TestCase methods; no skipped or unconditional padding cases.\n− case manifest.json: expected count: 10; each case has a meaningful\ndescription and kind behavioral, format, or unavailable oracle.\n− coverage.json: public evidence, requirements mapped to case IDs, checks\nperformed, what was not checked, and limitations.\n− repair−log.json: demonstrated defects, public evidence, edits, and rerun\n\n22\n\n\fUnder review\n\nListing 4\n\nTest-synthesis instruction (excerpt) (continued)\n\noutcomes; use [] if no repair was needed.\n− self−review.json: per−case assessment, reason, public evidence, suggested\nrepair, and any essential or supplemental coverage gaps.\n\nListing 5\n\nEmpty-test-authoring skill (excerpt)\n\nRead /work/public−task.json and relevant /public inputs first. Inspect\n/empty product only to understand the frozen candidate’s interfaces or to\ndiagnose execution. Its files correspond to original paths such as /app, but\nthe snapshot is not an oracle. The available public dependencies and fixture\nmounts are listed in validation environment in the task JSON. Disjoint\nexamples are read−only under /examples.\nWrite the suite in /work/output. Invoke the frozen empty MCP tool\nvalidate generated tests after writing executable tests and after each edit;\nthe tool executes the current suite in a fresh Empty container and returns\nonly synthetic diagnostics. If MCP discovery fails, send a JSON−RPC tools/call\nrequest to python3 /opt/harnesspro/empty−tools/tools/mcp server.py on stdin.\nKeep tests and validation calls serial. The model has no Docker socket or\nofficial grader.\nInterpret status=ok, passed=false as a completed execution, not a request\nto make Empty pass. Treat infra error as unresolved until its cause is\nidentified. Repair only test defects supported by public evidence, record\nthe change in repair−log.json, and rerun the changed suite. Preserve valid\nproduct failures and report any unresolved oracle or setup problem. Review\nthe final test design in the same invocation; do not launch another reviewer.\nPublic reference tools, if needed, are available in the authoring image;\nversion manifests are under /opt/harnesspro/reference−tools. Check that a\nreference is compatible with the public runtime before using exact outputs.\nThe main instruction defines the ten−case output and review schema.\n\nListing 6\n\nValidation tool interface and response (summary)\n\nTool: frozen empty.validate generated tests\nMCP discovery: tools/list advertises validate generated tests\nArguments: {} (no task−specific parameters; extra properties rejected)\nInput: the current test suite in /work/output\nRequest: a validate generated tests operation sent through /empty−tool−rpc\nExecution: a fresh container with the frozen Empty product\nResponse: JSON diagnostics from the suite execution, not official tests,\ngrader feedback, or labels\nCompleted execution: status == ok, whether passed is true or false\nInfrastructure failure: status == infra error; MCP isError is true\nTimeout: 7,200 seconds; an absent response raises an error rather than\ninventing a validation result\n\nD\n\nE VOLVED H ARNESS A RTIFACTS\n\nThis appendix presents the medium configurations of the evolved harnesses for Terminal-Bench 2,\nSWE-Bench Pro, and ProgramBench. For Terminal-Bench 2, we also show how the lite and heavy\nmodes differ from the medium configuration. Long lines wrap, JSON whitespace is normalized,\nand closing Markdown inline-code backticks are typeset as apostrophes where needed. The bundled\nfiles contain the evaluated settings. The directory listings show the evolved harness files.\n23\n\n\fUnder review\n\nD.1\n\nT ERMINAL -B ENCH 2\n\nListing 7 shows the runtime files of the medium-mode harness. A separate GPT-5.5 call uses the\nrubric to select an execution profile from the public task description. The evaluator reads the policy\nsettings and generates a Codex configuration that loads the instruction file and registers the hook.\nListing 7\n\nTerminal-Bench 2 medium-mode harness runtime files\n\nruntime/\nmodel instructions.md\nprofile rubric.md\npolicy.json\nhook.py\n\nD.1.1\n\nM EDIUM M ODE\n\nThe medium mode uses GPT-5.5 throughout, with five execution profiles spanning low, medium,\nand high reasoning effort. The listings below present its instructions, routing rubric, runtime hooks,\nand policy settings.\nListing 8\n\nMedium: runtime/model instructions.md\n\nYou are Codex, a non−interactive software agent. Work autonomously until the\nuser’s task is complete. Follow the task’s integrity, safety, path, and output\nrequirements exactly. Use the available tools to inspect, edit, execute, and\nverify; batch independent checks and avoid repeating unchanged reads. Preserve\nunrelated files and avoid destructive operations outside the requested scope.\nDo not replace a requested implementation or service with a mock, proxy, or\nlook−alike unless the task explicitly permits that substitution.\nDo not spawn other agents or ask the user to perform routine steps. Keep\nprogress messages brief. Before finishing, leave every requested artifact at\nits exact path and run the strongest allowed task−shaped verification. Report\nthe outcome concisely, including any genuine remaining uncertainty.\n\nListing 9\n\nMedium: policy.json: session context\n\nHarness guidance is already loaded; do not inventory harness/. Extract exact artifacts,\npaths, behavior, integrity restrictions, public interfaces, and final state from\ntask/prompt.md. Use its host−to−container pattern. For black−box work use only public\ninterfaces and implement general behavior. When the task names an API, wrapper, package,\nrevision, runtime, or service, exercise that named interface first and do not silently\nreplace it with a lower−level dependency, mock, proxy, or look−alike behavior; inspect\nthe public signature or implementation after an interface error. A source−only or\nsingle−artifact deliverable should not acquire undeclared runtime helpers. Start with\nthe smallest discriminating probe and batch independent checks. Bound downloads,\nexternal interaction, and potentially blocking commands well below the task watchdog;\nreserve time for final repair and verification. Validate requested behavior, not only\nsuperficial readiness signals. Run mutating workflow checks on disposable fixtures when\npossible; if the user is meant to perform the same workflow later, do not leave test\ndata or state that collides with its documented preconditions. Preserve the real\nrequested implementation and durable service state while removing only temporary\nverification artifacts. For quantitative work, identify units, variables, invariants,\nand the comparison objective before optimizing; exercise every publicly stated\ncorrectness dimension using a direct reference or invariant when one can be constructed.\nKeep temporary verification artifacts separate from final deliverables. Before\nfinishing, compare exact contents and state with every explicit requirement. Avoid\nnarration and unchanged rereads; do not skip necessary validation.\n\n24\n\n\fUnder review\n\nListing 10\n\nMedium: runtime/profile rubric.md\n\nChoose exactly one profile from observable task characteristics. Optimize\nexpected success per dollar. Never use historical outcomes remembered from prior\nruns or evaluations.\nProfiles:\n− ‘compact’: low reasoning; converge near 4 tool calls and stop near 8.\n− ‘lean’: low reasoning; converge near 10 calls and stop near 16.\n− ‘standard’: medium reasoning; converge near 26 calls and stop near 38.\n− ‘deep’: high reasoning; converge near 30 calls and stop near 48.\n− ‘research’: high reasoning with about 40 calls for source reconstruction.\nEvidence rules\n− Use only validation, interaction, dependencies, artifacts, and constraints\nexplicitly described in the task text. Never assume hidden−test behavior,\nprevious attempts, tool output, runtime results, or historical scores.\n− An undescribed validator has unknown quality, not weak quality. Unknown decisive\nevidence defaults to ‘standard’; missing information alone cannot justify\nanother profile.\n− A strong oracle must be explicitly local and repeatable and provide localized\nfailure, quantitative error, candidate ranking, deterministic simulation, or a\ndirectly inspectable target. Compilation, launch, an open port, one end−to−end\nrequest, or whole−task pass/fail is weak only when the text explicitly limits\nfeedback to that undifferentiated signal.\n− Count distinct evidence−resolvable hypotheses, not files, prose, commands, or\nretries. Extra iterations are valuable only when described probes can\ndistinguish hypotheses and change the plan.\n− Include the stated watchdog and expected probe cost in the value of\niteration. A precise oracle is not useful enough for ‘deep’ when only a few\nfull evaluations can fit and high reasoning does not create more evidence.\nApply the following gates in order and stop at the first match.\nGate 1: ‘compact’\nChoose ‘compact’ only when low marginal value is explicit and no faithful\ndecomposable oracle is described or structurally possible:\n1. Long serial graphical, remote, virtualized, or manual interaction whose\ncorrectness depends on visual or hidden state.\n2. Unavailable accounts, devices, services, credentials, or changing external\nstate without a faithful local substitute.\n3. Broad hidden or effectively unbounded behavior plus exact preservation of\nunrelated details, with explicitly end−to−end accept/reject feedback.\n4. One unchanged artifact must satisfy independent grammars, parsers, runtimes,\nor environments, while checks expose only a joint accept/reject objective.\n5. Bulk media or visual interpretation with no described numerical comparator\nand correctness resting on visual judgment.\nDifficulty, visualization, specialization, or virtualization alone is not enough.\nA small fixed visual artifact, scripted headless setup with direct checks, or\nlocal scorer that distinguishes candidates should continue to later gates.\nFile−existence or format checks do not make long visual/media search a strong\noracle when the decisive event must still be found by inspecting many frames.\nGate 2: ‘research’\nChoose ‘research’ only when the primary deliverable is factual reconstruction\n\n25\n\n\fUnder review\n\nListing 10\n\nMedium: runtime/profile rubric.md (continued)\n\nrequiring multiple accessible sources, version/date alignment, provenance, or a\nhistorical snapshot. A multi−record date/version ranking qualifies; one lookup or\nresearch used only to build an artifact does not. If decisive sources are\nexplicitly inaccessible, choose ‘compact’.\nGate 3: ‘deep’\nChoose ‘deep’ only when a strong local oracle is explicitly described or can be\nconstructed from an exact deterministic reference, transformation, simulator, or\nruntime supplied by the task, and at least one shape applies:\n1. Latent structure or parameter recovery plus exact compatibility or a\nquantitative objective.\n2. Correctness spans several interacting components, stages, or states and can be\nchecked through exact invariants, reference behavior, or round trips.\n3. Damaged structured−state recovery requiring competing format, ordering, or\ntransformation hypotheses.\n4. Constrained synthesis, compression, size reduction, or candidate search with\ncoupled hard constraints and an executable scorer.\n5. Nontrivial recovery, inference, or attack derived from many observations with\nexact candidate validation.\n6. An inverse problem with a deterministic simulator or quantitative objective.\n7. Candidate construction against a deterministic transformation or runtime,\nwith multiple materially different mechanisms that can be executed and observed.\n8. A severely constrained reimplementation of deterministic reference behavior,\nwhere exact candidate outputs can be compared locally despite language, size,\ncompatibility, or dependency restrictions.\n9. One source artifact must implement behavior while remaining valid under two\nor more independent grammars, compilers, or runtimes, each of which can be\nexercised separately for localized feedback.\nDo not choose ‘deep’ for terminology, long specifications, ordinary security or\nreverse engineering, or hidden tests alone. Ordinary performance tuning and\nordinary state propagation through services, hooks, or deployments are\n‘standard’. A binary validator alone is insufficient, but a deterministic local\ntransformation plus executable behavior can support meaningful candidate\niteration even when the final verdict is binary. Prefer ‘standard’ when each\ncandidate evaluation is described as expensive enough to consume a material\npart of the watchdog and the work is mainly bounded tuning against one supplied\nevaluator. Modifying an existing artifact against one supplied evaluator remains\n‘standard’ merely because it combines a quantitative objective with preservation\nconstraints; ‘deep’ additionally requires latent recovery, combinatorial search,\nor several materially different candidate mechanisms. ‘deep’ requires room for\nseveral evidence−changing iterations.\nGate 4: ‘lean’\nChoose ‘lean’ only when all are explicit:\n1. Bounded, mostly deterministic work.\n2. At most two meaningful uncertainties.\n3. A credible plan before broad exploration.\n4. A direct local check covering nearly all decisive behavior.\n5. About eight or fewer evidence−producing calls for inspection, implementation,\nand final validation.\nTypical cases are a localized transformation; enumerable mechanical cleanup with\na deterministic final scan; a simple build or single−service setup with one main\nuncertainty and a direct test; or bounded numerical work with direct value, shape,\n\n26\n\n\fUnder review\n\nListing 10\n\nMedium: runtime/profile rubric.md (continued)\n\nor residual validation.\nDo not choose ‘lean’ when several coupled uncertainties require iterative\ncandidate comparison, or when recovering latent state requires materially\ndifferent hypotheses. Apply the ‘deep’ gate first when a constructible exact or\nquantitative reference makes those iterations useful. Also do not choose ‘lean’\nfor broad cleanup where unaffected content must be preserved exactly and the\nset of true matches is not explicitly bounded; false−positive scope is a\nseparate uncertainty even when a final scan is deterministic.\nUse ‘standard’ when coordinating several schemas, formats, subsystems,\nintegration boundaries, correctness/performance constraints, or hidden edge−case\nfamilies. Also use it for multi−service state propagation, broad security\nproperties, builds combining source provenance with feature exclusion and\nmultiple runtime modes, corpus−wide cleanup with exact preservation of unaffected\ncontent, or unstructured recovery with several evidence paths but only final\ncandidate checks.\nGate 5: ‘standard’\nChoose ‘standard’ for everything else, including unknown oracle quality. It is\nthe default for ordinary implementation, debugging, data processing, service\nsetup, bounded numerical work, and analysis with several actionable\nuncertainties, and should normally be the plurality.\n\nListing 11 reproduces the budget-denial branch of pre tool use and the complete functions\nthat produce stage reminders and compact text outputs. Dispatch, storage, audit logging, and other\nhelper routines are omitted from the listing but retained in the accompanying full files.\nListing 11\n\nMedium: runtime/hook.py (excerpts)\n\n# Excerpt from pre tool use: counter, budget, and denial branch\ntool name = str(payload.get(\"tool name\") or \"\")\nstate = increment tool count(control state)\ncount = int(state[\"tool count\"])\nfinalize = int(selection.get(\"finalize after tools\") or 0)\nif finalize and count &gt; finalize:\naudit(\n\"pre tool use\",\ncwd=str(cwd),\ntool name=tool name,\ntool count=count,\ndecision=\"deny\",\n)\nprint(\njson.dumps(\n{\n\"hookSpecificOutput\": {\n\"hookEventName\": \"PreToolUse\",\n\"permissionDecision\": \"deny\",\n\"permissionDecisionReason\": (\n\"The task tool budget is exhausted. Preserve the current\nfiles, \"\n\"stop calling tools, and give the best final answer from\nexisting evidence.\"\n),\n}\n}\n\n27\n\n\fUnder review\n\nListing 11\n\nMedium: runtime/hook.py (excerpts) (continued)\n\n)\n)\nreturn 0\ndef stage context(count: int, selection: dict[str, Any]) −&gt; str:\neconomy = int(selection.get(\"economy after tools\") or 0)\nstrict = int(selection.get(\"strict after tools\") or 0)\nreminder = int(selection.get(\"strict reminder every\") or 8)\nif count == economy:\nreturn (\n\"Economy phase starts now. Batch independent ls/rg/read/test checks,\nsuppress \"\n\"process narration, and do not repeat unchanged checks. Do not trade away\nthe \"\n\"behavioral validation or exact final−state checks required by the task.\"\n)\nif count &gt;= strict and (count == strict or (count − strict) % reminder == 0):\nreturn (\n\"Convergence phase: stop broad exploration. Only inspect evidence directly\ntied to the \"\n\"current failure or deliverable. If a concrete failure, unexplained\ninstability, or \"\n\"mutated deliverable remains, repair it rather than finalizing because the\nphase changed. \"\n\"Avoid irreversible cleanup or broad state changes not required by the task,\nand keep \"\n\"temporary verification artifacts separate from final deliverables. \"\n\"Then recheck exact paths, interfaces, behavior, and final state once and\nfinish.\"\n)\nreturn \"\"\ndef compact text(text: str, ∗, head chars: int, tail chars: int) −&gt; str:\nlines = text.splitlines()\ndeduped: list[str] = []\nindex = 0\nwhile index &lt; len(lines):\nnext index = index + 1\nwhile next index &lt; len(lines) and lines[next index] == lines[index]:\nnext index += 1\nrepeats = next index − index\ndeduped.append(lines[index])\nif repeats &gt; 2:\ndeduped.append(f\"[previous line repeated {repeats − 1} more times]\")\nelif repeats == 2:\ndeduped.append(lines[index])\nindex = next index\ncompact = \"\\n\".join(deduped)\nif len(compact) &lt;= head chars + tail chars:\nreturn compact\nomitted = len(compact) − head chars − tail chars\nreturn (\ncompact[:head chars]\n+ f\"\\n... [{omitted} characters omitted; use the raw path for a targeted range]\n...\\n\"\n+ compact[−tail chars:]\n)\n\n28\n\n\fUnder review\n\nThe policy below specifies the execution profiles, routing rules, and output-retention settings.\nhistory token limit is a per-output history limit, not the model context-window size. The\nrubric guides profile selection. The runtime hook enforces the tool-call limits specified by the policy’s finalize after tools values. Tool thresholds count attempted calls.\nListing 12\n\nMedium: policy.json (selected fields)\n\n{\n\"default profile\": \"standard\",\n\"tool output\": {\n\"history token limit\": 900,\n\"max chars\": 4000,\n\"head chars\": 2400,\n\"tail chars\": 900,\n\"rtk enabled\": true\n},\n\"profiles\": {\n\"compact\": {\n\"reasoning effort\": \"low\",\n\"economy after tools\": 2,\n\"strict after tools\": 4,\n\"finalize after tools\": 14,\n\"strict reminder every\": 2\n},\n\"lean\": {\n\"reasoning effort\": \"low\",\n\"economy after tools\": 6,\n\"strict after tools\": 10,\n\"finalize after tools\": 22,\n\"strict reminder every\": 4\n},\n\"standard\": {\n\"reasoning effort\": \"medium\",\n\"economy after tools\": 14,\n\"strict after tools\": 26,\n\"finalize after tools\": 44,\n\"strict reminder every\": 8\n},\n\"deep\": {\n\"reasoning effort\": \"high\",\n\"economy after tools\": 16,\n\"strict after tools\": 30,\n\"finalize after tools\": 54,\n\"strict reminder every\": 8\n},\n\"research\": {\n\"reasoning effort\": \"high\",\n\"economy after tools\": 8,\n\"strict after tools\": 20,\n\"finalize after tools\": 46,\n\"strict reminder every\": 6\n}\n},\n\"classifier\": {\n\"type\": \"model\",\n\"model\": \"gpt−5.5\",\n\"reasoning effort\": \"medium\",\n\"transport\": \"responses\",\n\"fallback profile\": \"standard\",\n\"rubric file\": \"profile rubric.md\",\n\n29\n\n\fUnder review\n\nListing 12\n\nMedium: policy.json (selected fields) (continued)\n\n\"timeout s\": 120,\n\"max attempts\": 3,\n\"max output tokens\": 2048,\n\"samples\": 1,\n\"max task chars\": 24000\n},\n\"confidence overrides\": [],\n\"rules\": []\n}\n\nD.1.2\n\nL ITE M ODE\n\nThe lite mode retains the shared rubric but adjusts the tool budgets and reasoning settings through\npolicy.json. The deep and research profiles use medium reasoning effort. The executable\nsettings below therefore take precedence over the effort descriptions inherited in the rubric. Listing 13 gives the complete policy diff from the medium configuration; all other fields are unchanged.\nListing 13\n\nLite: runtime/policy.json (diff vs. medium)\n\n−−− medium/runtime/policy.json\n+++ lite/runtime/policy.json\n@@ −40,5 +40,5 @@\n\"economy after tools\": 2,\n\"strict after tools\": 4,\n−\n\"finalize after tools\": 14,\n+\n\"finalize after tools\": 8,\n\"strict reminder every\": 2\n},\n@@ −47,5 +47,5 @@\n\"economy after tools\": 6,\n\"strict after tools\": 10,\n−\n\"finalize after tools\": 22,\n+\n\"finalize after tools\": 16,\n\"strict reminder every\": 4\n},\n@@ −54,19 +54,19 @@\n\"economy after tools\": 14,\n\"strict after tools\": 26,\n−\n\"finalize after tools\": 44,\n+\n\"finalize after tools\": 38,\n\"strict reminder every\": 8\n},\n\"deep\": {\n−\n\"reasoning effort\": \"high\",\n+\n\"reasoning effort\": \"medium\",\n\"economy after tools\": 16,\n\"strict after tools\": 30,\n−\n\"finalize after tools\": 54,\n+\n\"finalize after tools\": 48,\n\"strict reminder every\": 8\n},\n\"research\": {\n−\n\"reasoning effort\": \"high\",\n+\n\"reasoning effort\": \"medium\",\n\"economy after tools\": 8,\n\"strict after tools\": 20,\n−\n\"finalize after tools\": 46,\n+\n\"finalize after tools\": 40,\n\n30\n\n\fUnder review\n\nListing 13\n\nLite: runtime/policy.json (diff vs. medium) (continued)\n\n\"strict reminder every\": 6\n}\n\nD.1.3\n\nH EAVY M ODE\n\nThe heavy mode uses GPT-5.5 with low, medium, or high reasoning effort, depending on the selected\nprofile, and allows larger tool budgets than medium. It has the same instruction and hook files as\nmedium. Only the routing rubric and the policy’s profiles and session context fields\ndiffer. The rubric diff below is relative to Listing 10; the changed policy fields follow.\nListing 14\n\nHeavy: profile rubric.md (diff vs. medium)\n\n−−− medium/runtime/profile rubric.md\n+++ heavy/runtime/profile rubric.md\n@@ −7,5 +7,5 @@\n−− ‘compact’: low reasoning; converge near 4 tool calls and stop near 8.\n−− ‘lean’: low reasoning; converge near 10 calls and stop near 16.\n−− ‘standard’: medium reasoning; converge near 26 calls and stop near 38.\n−− ‘deep’: high reasoning; converge near 30 calls and stop near 48.\n−− ‘research’: high reasoning with about 40 calls for source reconstruction.\n+− ‘compact’: low reasoning; converge near 8 tool calls and stop near 14.\n+− ‘lean’: medium reasoning; converge near 22 calls and stop near 36.\n+− ‘standard’: high reasoning; converge near 38 calls and stop near 60.\n+− ‘deep’: high reasoning; converge near 42 calls and stop near 68.\n+− ‘research’: high reasoning with up to about 60 calls for source reconstruction.\n@@ −113 +113 @@\n−5. About eight or fewer evidence−producing calls for inspection, implementation,\n+5. About twelve or fewer evidence−producing calls for inspection, implementation,\n\nListing 15\n\nHeavy: policy.json: session context\n\nHarness guidance is already loaded; do not inventory harness/. Extract exact artifacts,\npaths, behavior, integrity restrictions, public interfaces, and final state from\ntask/prompt.md. Use its host−to−container pattern. For black−box work use only public\ninterfaces and implement general behavior. When the task names an API, wrapper, package,\nrevision, runtime, or service, exercise that named interface first and do not silently\nreplace it with a lower−level dependency, mock, proxy, or look−alike behavior; inspect\nthe public signature or implementation after an interface error. A source−only or\nsingle−artifact deliverable should not acquire undeclared runtime helpers. Start with\nthe smallest discriminating probe and batch independent checks. Bound downloads,\nexternal interaction, and potentially blocking commands well below the task watchdog;\nreserve time for final repair and verification. Validate requested behavior, not only\nsuperficial readiness signals. For multi−stage services and persistent state, test from\na fresh external entry point and check repeated−operation behavior, defaults,\npermissions, and final ownership instead of trusting internal readiness. For numerical,\ntransformation, or recovery work, validate against an independent reference, invariant,\nround trip, or residual rather than only reusing the implementation’s own assumptions.\nRun mutating workflow checks on disposable fixtures when possible; if the user is meant\nto perform the same workflow later, do not leave test data or state that collides with\nits documented preconditions. Preserve the real requested implementation and durable\nservice state while removing only temporary verification artifacts. Keep temporary\nverification artifacts separate from final deliverables. Before finishing, reread the\npublic task once, inspect the actual final artifact or durable state, and compare every\nexplicit requirement against independent evidence. Avoid narration and unchanged\nrereads; do not skip necessary validation.\n\n31\n\n\fUnder review\n\nListing 16\n\nHeavy: policy.json: profiles\n\n{\n\"profiles\": {\n\"compact\": {\n\"reasoning effort\": \"low\",\n\"economy after tools\": 4,\n\"strict after tools\": 8,\n\"finalize after tools\": 14,\n\"strict reminder every\": 3\n},\n\"lean\": {\n\"reasoning effort\": \"medium\",\n\"economy after tools\": 10,\n\"strict after tools\": 22,\n\"finalize after tools\": 36,\n\"strict reminder every\": 4\n},\n\"standard\": {\n\"reasoning effort\": \"high\",\n\"economy after tools\": 18,\n\"strict after tools\": 38,\n\"finalize after tools\": 60,\n\"strict reminder every\": 8\n},\n\"deep\": {\n\"reasoning effort\": \"high\",\n\"economy after tools\": 20,\n\"strict after tools\": 42,\n\"finalize after tools\": 68,\n\"strict reminder every\": 8\n},\n\"research\": {\n\"reasoning effort\": \"high\",\n\"economy after tools\": 16,\n\"strict after tools\": 36,\n\"finalize after tools\": 60,\n\"strict reminder every\": 8\n}\n}\n}\n\nD.2\n\nSWE-B ENCH P RO\n\nThe medium mode harness uses GPT-5.5 and Codex. A separate GPT-5.5 call uses the rubric\nto select one of five reasoning and tool-budget profiles from the public task description. The\nrepository-repair workflow first extracts the contract, then checks the implementation and available references, makes a focused patch, and verifies task-shaped behavior. Listing 17 shows the\nstored harness files. The evaluator configures Codex to load the instructions and register the hook.\nThe repair-verify script provides basic code checks, while a checklist guides task-specific\nverification.\nListing 17\n\nSWE-Bench Pro medium-mode harness files\n\nREADME.md\nruntime/\nmodel instructions.md\nprofile rubric.md\npolicy.json\nhook.py\n\n32\n\n\fUnder review\n\nListing 17\n\nSWE-Bench Pro medium-mode harness files (continued)\n\nbin/\nrepair−verify\nchecklists/\ncontract−verification.md\n\nListing 18\n\nSWE-Bench Pro medium: model instructions.md\n\nYou are Codex, a non−interactive software agent. Work autonomously until the\nuser’s task is complete. Follow the task’s integrity, safety, path, and output\nrequirements exactly. Use the available tools to inspect, edit, execute, and\nverify; batch independent checks and avoid repeating unchanged reads. Preserve\nunrelated files and avoid destructive operations outside the requested scope.\nDo not replace a requested implementation or service with a mock, proxy, or\nlook−alike unless the task explicitly permits that substitution.\nDo not spawn other agents or ask the user to perform routine steps. Keep\nprogress messages brief. Before finishing, leave every requested artifact at\nits exact path and run the strongest allowed task−shaped verification. Report\nthe outcome concisely, including any genuine remaining uncertainty.\n\nListing 19\n\nSWE-Bench Pro medium: policy.json: session context\n\nThe repair workflow is already loaded; do not spend tool calls inventorying harness/.\nFirst establish the repository root under task/ and keep later commands rooted there.\nRead task/prompt.md as a contract and keep a concise ledger of exact public names,\nfiles, payloads, defaults, error behavior, compatibility requirements, and stated edge\ncases. Inspect the local implementation and nearby tests first. Look for an existing\nreference when the task sounds like a known fix: local Git history, tags, upstream\ncommits, tests, fixtures, or nearby implementation patterns. Prefer adapting proven\nbehavior over guessing. Trace the real execution and data path before editing, then make\nthe smallest production−source change that satisfies the contract. Start with narrow\ndiscriminating probes, batch independent reads and searches, and avoid unchanged\nrereads. Reserve enough budget for a post−change task−shaped test, investigation of any\nconcrete failure, and one final diff/contract review; compilation alone is insufficient.\nUse harness/bin/repair−verify only when its general checks are useful. Keep generated\nfiles, caches, and temporary tests out of the final patch. Before finishing, inspect the\ndiff and re−check every ledger item. Preserve unrelated behavior and do not replace\nrequested behavior with a mock, proxy, or look−alike implementation.\n\n33\n\n\fUnder review\n\nRelative to the Terminal-Bench 2 medium rubric in Listing 10, the SWE-Bench Pro rubric changes\nthe profile budgets and the lean selection gate. The diff below shows these changes.\nListing 20\n\nSWE-Bench Pro medium: profile rubric.md (diff vs. Terminal-Bench 2)\n\n−−− tb2/medium/runtime/profile rubric.md\n+++ swebench pro/medium/runtime/profile rubric.md\n@@ −7,6 +7,6 @@\n− ‘compact’: low reasoning; converge near 4 tool calls and stop near 8.\n−− ‘lean’: low reasoning; converge near 10 calls and stop near 16.\n−− ‘standard’: medium reasoning; converge near 26 calls and stop near 38.\n−− ‘deep’: high reasoning; converge near 30 calls and stop near 48.\n−− ‘research’: high reasoning with about 40 calls for source reconstruction.\n+− ‘lean’: low reasoning; converge near 16 calls and stop near 24.\n+− ‘standard’: medium reasoning; converge near 42 calls and stop near 64.\n+− ‘deep’: high reasoning; converge near 48 calls and stop near 72.\n+− ‘research’: high reasoning with up to about 64 calls for source reconstruction.\n@@ −112,4 +112,4 @@\n4. A direct local check covering nearly all decisive behavior.\n−5. About eight or fewer evidence−producing calls for inspection, implementation,\n−\nand final validation.\n+5. About twelve or fewer evidence−producing calls for inspection,\n+\nimplementation, failure diagnosis, and final validation.\n@@ −119,2 +119,8 @@\nor residual validation.\n+\n+For an existing−code repair, use ‘lean’ only when the described behavior is\n+confined to one narrow implementation surface and one focused local check can\n+cover both the requested success path and its stated edge cases. A short prompt\n+or a small−looking diff is not enough when compatibility, lifecycle, persistence,\n+concurrency, or cross−layer behavior remains coupled.\n\nThe selected policy fields below specify routing, profile effort and tool stages, confidence handling,\nand output retention. Tool thresholds count attempted calls, while history token limit limits\neach retained tool output, not the model context window.\nListing 21\n\nSWE-Bench Pro medium: policy.json (selected fields)\n\n{\n\"default profile\": \"standard\",\n\"tool output\": {\n\"history token limit\": 1400,\n\"max chars\": 6000,\n\"head chars\": 3600,\n\"tail chars\": 1400,\n\"rtk enabled\": true\n},\n\"profiles\": {\n\"compact\": {\n\"reasoning effort\": \"low\",\n\"economy after tools\": 2,\n\"strict after tools\": 4,\n\"finalize after tools\": 8,\n\"strict reminder every\": 2\n},\n\"lean\": {\n\"reasoning effort\": \"low\",\n\"economy after tools\": 8,\n\n34\n\n\fUnder review\n\nListing 21\n\nSWE-Bench Pro medium: policy.json (selected fields) (continued)\n\n\"strict after tools\": 16,\n\"finalize after tools\": 24,\n\"strict reminder every\": 4\n},\n\"standard\": {\n\"reasoning effort\": \"medium\",\n\"economy after tools\": 20,\n\"strict after tools\": 42,\n\"finalize after tools\": 64,\n\"strict reminder every\": 8\n},\n\"deep\": {\n\"reasoning effort\": \"high\",\n\"economy after tools\": 24,\n\"strict after tools\": 48,\n\"finalize after tools\": 72,\n\"strict reminder every\": 8\n},\n\"research\": {\n\"reasoning effort\": \"high\",\n\"economy after tools\": 16,\n\"strict after tools\": 40,\n\"finalize after tools\": 64,\n\"strict reminder every\": 8\n}\n},\n\"classifier\": {\n\"type\": \"model\",\n\"model\": \"gpt−5.5\",\n\"reasoning effort\": \"medium\",\n\"fallback profile\": \"standard\",\n\"rubric file\": \"profile rubric.md\",\n\"timeout s\": 120,\n\"max attempts\": 3,\n\"max task chars\": 24000\n},\n\"confidence overrides\": [\n{\n\"name\": \"uncertain lean to standard\",\n\"source profile\": \"lean\",\n\"below\": 0.9,\n\"reasoning effort\": \"medium\",\n\"economy after tools\": 20,\n\"strict after tools\": 42,\n\"finalize after tools\": 64,\n\"strict reminder every\": 8\n}\n],\n\"rules\": []\n}\n\nThe hook excerpts reproduce the complete budget gate, stage-reminder, and text-compaction functions. Dispatch, audit, storage, and the remaining helper routines are retained in the accompanying\ncomplete hook.py.\n\n35\n\n\fUnder review\n\nListing 22\n\nSWE-Bench Pro medium: hook.py (excerpts)\n\ndef pre tool use(\npayload: dict[str, Any],\ncwd: Path,\ncontrol state: Path,\nselection: dict[str, Any],\n) −&gt; int:\ntool name = str(payload.get(\"tool name\") or \"\")\nstate = increment tool count(control state)\ncount = int(state[\"tool count\"])\nfinalize = int(selection.get(\"finalize after tools\") or 0)\nif finalize and count &gt; finalize:\naudit(\n\"pre tool use\",\ncwd=str(cwd),\ntool name=tool name,\ntool count=count,\ndecision=\"deny\",\n)\nprint(\njson.dumps(\n{\n\"hookSpecificOutput\": {\n\"hookEventName\": \"PreToolUse\",\n\"permissionDecision\": \"deny\",\n\"permissionDecisionReason\": (\n\"The task tool budget is exhausted. Preserve the current\nfiles, \"\n\"stop calling tools, and give the best final answer from\nexisting evidence.\"\n),\n}\n}\n)\n)\nreturn 0\ncontext = stage context(count, selection)\nupdated input = rtk rewrite(payload, selection) if tool name == \"Bash\" else None\naudit(\n\"pre tool use\",\ncwd=str(cwd),\ntool name=tool name,\ntool count=count,\nstage= stage name(count, selection),\ninput rewritten=updated input is not None,\n)\nif context or updated input is not None:\nspecific: dict[str, Any] = {\"hookEventName\": \"PreToolUse\"}\nif context:\nspecific[\"additionalContext\"] = context\nif updated input is not None:\nspecific[\"permissionDecision\"] = \"allow\"\nspecific[\"updatedInput\"] = updated input\nprint(json.dumps({\"hookSpecificOutput\": specific}))\nreturn 0\ndef stage context(count: int, selection: dict[str, Any]) −&gt; str:\neconomy = int(selection.get(\"economy after tools\") or 0)\nstrict = int(selection.get(\"strict after tools\") or 0)\n\n36\n\n\fUnder review\n\nListing 22\n\nSWE-Bench Pro medium: hook.py (excerpts) (continued)\n\nreminder = int(selection.get(\"strict reminder every\") or 8)\nif count == economy:\nreturn (\n\"Economy phase starts now. Batch independent ls/rg/read/test checks,\nsuppress \"\n\"process narration, and do not repeat unchanged checks. Do not trade away\nthe \"\n\"behavioral validation or exact final−state checks required by the task.\"\n)\nif count &gt;= strict and (count == strict or (count − strict) % reminder == 0):\nreturn (\n\"Convergence phase: stop broad exploration. Only inspect evidence directly\ntied to the \"\n\"current failure or deliverable. If a concrete failure, unexplained\ninstability, or \"\n\"mutated deliverable remains, repair it rather than finalizing because the\nphase changed. \"\n\"Avoid irreversible cleanup or broad state changes not required by the task,\nand keep \"\n\"temporary verification artifacts separate from final deliverables. \"\n\"Then recheck exact paths, interfaces, behavior, and final state once and\nfinish.\"\n)\nreturn \"\"\ndef compact text(text: str, ∗, head chars: int, tail chars: int) −&gt; str:\nlines = text.splitlines()\ndeduped: list[str] = []\nindex = 0\nwhile index &lt; len(lines):\nnext index = index + 1\nwhile next index &lt; len(lines) and lines[next index] == lines[index]:\nnext index += 1\nrepeats = next index − index\ndeduped.append(lines[index])\nif repeats &gt; 2:\ndeduped.append(f\"[previous line repeated {repeats − 1} more times]\")\nelif repeats == 2:\ndeduped.append(lines[index])\nindex = next index\ncompact = \"\\n\".join(deduped)\nif len(compact) &lt;= head chars + tail chars:\nreturn compact\nomitted = len(compact) − head chars − tail chars\nreturn (\ncompact[:head chars]\n+ f\"\\n... [{omitted} characters omitted; use the raw path for a targeted range]\n...\\n\"\n+ compact[−tail chars:]\n)\n\nD.3\n\nP ROGRAM B ENCH\n\nThe ProgramBench medium-mode harness uses a fixed GPT-5.5 high-effort profile instead of taskadaptive routing. The workflow builds an independent program from bundled documentation and\npermitted black-box probes, validates it against the public reference, and reserves time for a clean\noffline rebuild. Listing 23 shows the stored harness files. This fixed-profile harness has no routing\nrubric. The evaluator configures Codex to load the instruction file and execute the budget hook.\n37\n\n\fUnder review\n\nListing 23\n\nProgramBench medium-mode harness files\n\nREADME.md\nruntime/\nmodel instructions.md\npolicy.json\nhook.py\n\nListing 24\n\nProgramBench medium: model instructions.md\n\n# ProgramBench Reconstruction Harness\nUse this harness as a task−agnostic control loop for rebuilding a program from\ndocumentation and black−box observations. It supplements the benchmark rules;\nit never permits source retrieval, internet access, decompilation, tracing, or\nreuse of the reference executable.\n## Evidence−first workflow\n1. Read all bundled documentation and turn it into a compact behavior ledger:\ncommands, flags, inputs, outputs, exit status, file effects, defaults, error\nbehavior, formatting, and explicitly documented edge cases.\n2. Establish a runnable skeleton early. Create ‘compile.sh’, build a minimal\nindependent executable, and confirm the complete build/run cycle before\ninvesting in secondary behavior.\n3. Probe the reference through its normal public interface. Use small,\ndiscriminating experiments that separate plausible behaviors; record the\nobserved input, output, status, and state change instead of relying on\nassumptions based on the program name.\n4. Prioritize breadth before polish. Implement the documented happy paths and\ncommon input classes, then error handling, boundary cases, formatting, and\nlow−frequency options. Keep a list of remaining unsupported behavior.\n5. Compare your implementation and the reference on the same locally generated\ncases. When they differ, reduce the case and fix the underlying general rule\nrather than adding a one−off special case.\n6. Rebuild from a clean state periodically. A solution that works only because\nof cached artifacts, undeclared tools, or files outside the submission is\nnot complete.\n7. Before finalizing, verify that ‘compile.sh’ is executable, produces\n‘./executable’ without network access, and that representative success and\nfailure probes agree with the reference.\n## Efficiency rules\n− Batch independent documentation reads and related probes when practical.\n− Prefer high−information probes over broad random exploration.\n− Keep outputs bounded and summarize findings in the behavior ledger.\n− Stop repeating probes once a stable rule has been established.\n− Reserve the final portion of the budget for a clean rebuild and end−to−end\nvalidation rather than continued exploration.\n## Reference lifecycle\nKeep the black−box reference available until differential validation is finished.\nDevelop a separately built candidate at another path, with the same executable\nbasename where relevant. Do not overwrite the reference during implementation.\nIf a permitted move is necessary, retain the execute−only reference on the same\nfilesystem without reading/copying its bytes or changing its permissions.\nThe reference is only a development oracle: never include it in the submission\nor invoke it from the submitted implementation. Self−authored expected outputs\n\n38\n\n\fUnder review\n\nListing 24\n\nProgramBench medium: model instructions.md (continued)\n\ndo not replace an actual reference−versus−candidate comparison. Build the final\ndeliverable from the validated independent source after the last comparison.\n\nThe policy’s history token limit is a per-output history-retention limit, not the model context\nsize. The hook applies staged tool budgets; its hard-stop threshold is the finalization threshold plus\nthe larger of eight and the reminder interval.\nListing 25\n\nProgramBench medium: policy.json\n\n{\n\"version\": 1,\n\"default profile\": \"heavy\",\n\"session context\": \"Follow the reconstruction workflow: read bundled documentation,\npreserve the reference for permitted black−box comparisons, build an independent\nimplementation, and reserve time for an offline rebuild and end−to−end validation.\",\n\"codex\": {\n\"model instructions file\": \"model instructions.md\",\n\"model verbosity\": \"low\",\n\"disabled features\": [\n\"apps\",\n\"auth elicitation\",\n\"browser use\",\n\"browser use external\",\n\"browser use full cdp access\",\n\"computer use\",\n\"fast mode\",\n\"goals\",\n\"image generation\",\n\"in app browser\",\n\"multi agent\",\n\"personality\",\n\"plugins\",\n\"remote plugin\",\n\"shell snapshot\",\n\"skill mcp dependency install\",\n\"tool call mcp elicitation\",\n\"tool suggest\",\n\"workspace dependencies\"\n]\n},\n\"tool output\": {\n\"history token limit\": 3000,\n\"max chars\": 4500,\n\"head chars\": 2700,\n\"tail chars\": 1100,\n\"rtk enabled\": false\n},\n\"profiles\": {\n\"heavy\": {\n\"reasoning effort\": \"high\",\n\"economy after tools\": 36,\n\"strict after tools\": 60,\n\"finalize after tools\": 76,\n\"strict reminder every\": 8\n}\n},\n\"rules\": []\n}\n\n39\n\n\fUnder review\n\nListing 26\n\nProgramBench medium: hook.py\n\n#!/usr/bin/env python3\n\"\"\"Task−agnostic staged budget hook for ProgramBench Codex runs.\"\"\"\nfrom\n\nfuture\n\nimport annotations\n\nimport fcntl\nimport json\nimport os\nfrom pathlib import Path\nimport sys\n\ndef selection() −&gt; dict:\npath = os.environ.get(\"RHO RUNTIME SELECTION PATH\", \"\").strip()\nif not path:\nreturn {}\ntry:\nvalue = json.loads(Path(path).read text(encoding=\"utf−8\"))\nexcept (OSError, json.JSONDecodeError):\nreturn {}\nreturn value if isinstance(value, dict) else {}\n\ndef next count(cwd: Path) −&gt; int:\nconfigured = os.environ.get(\"RHO RUNTIME STATE ROOT\", \"\").strip()\nstate dir = Path(configured).resolve() if configured else cwd / \".rho runtime\"\nstate dir.mkdir(parents=True, exist ok=True)\npath = state dir / \"tool−count.json\"\nlock path = state dir / \"tool−count.lock\"\nwith lock path.open(\"a+\") as lock:\nfcntl.flock(lock, fcntl.LOCK EX)\ntry:\nvalue = json.loads(path.read text(encoding=\"utf−8\"))\ncount = int(value.get(\"tool count\") or 0) + 1\nexcept (OSError, ValueError, TypeError, json.JSONDecodeError):\ncount = 1\ntemp = path.with suffix(\".tmp\")\ntemp.write text(json.dumps({\"tool count\": count}) + \"\\n\", encoding=\"utf−8\")\ntemp.replace(path)\nreturn count\n\ndef context(event: str, text: str) −&gt; None:\nprint(json.dumps({\"hookSpecificOutput\": {\"hookEventName\": event,\n\"additionalContext\": text}}))\n\ndef main() −&gt; int:\npayload = json.load(sys.stdin)\nevent = str(payload.get(\"hook event name\") or \"\")\nselection = selection()\nif event == \"SessionStart\":\ncontext = str(selection.get(\"session context\") or \"\").strip()\nif context:\ncontext(\"SessionStart\", context)\nreturn 0\nif event != \"PreToolUse\":\nreturn 0\ncwd = Path(str(payload.get(\"cwd\") or os.getcwd())).resolve()\n\n40\n\n\fUnder review\n\nListing 26\n\nProgramBench medium: hook.py (continued)\n\ncount = next count(cwd)\neconomy = int(selection.get(\"economy after tools\") or 0)\nstrict = int(selection.get(\"strict after tools\") or 0)\nfinalize = int(selection.get(\"finalize after tools\") or 0)\nreminder = int(selection.get(\"strict reminder every\") or 1)\nhard stop = finalize + max(8, reminder) if finalize else 0\nif hard stop and count &gt; hard stop:\nprint(\njson.dumps(\n{\n\"hookSpecificOutput\": {\n\"hookEventName\": \"PreToolUse\",\n\"permissionDecision\": \"deny\",\n\"permissionDecisionReason\": (\n\"The exploration budget is exhausted. Preserve the current\nfiles, \"\n\"finish from existing evidence, and do not call more tools.\"\n),\n}\n}\n)\n)\nreturn 0\nif finalize and count &gt;= finalize and (\ncount == finalize or (count − finalize) % max(4, reminder) == 0\n):\ncontext(\n\"PreToolUse\",\n\"Finalization stage: stop adding semantic scope. Use the remaining small\ngrace \"\n\"window only for implementation completion, a clean build, a focused check, \"\n\"artifact cleanup, or submission. Then finish.\",\n)\nelif strict and count &gt;= strict and (count == strict or (count − strict) % reminder\n== 0):\ncontext(\n\"PreToolUse\",\n\"Convergence stage: stop broad exploration. Revisit the public behavior\nledger, \"\n\"use only probes that distinguish a live hypothesis or repair a concrete\nmismatch, \"\n\"and preserve enough budget for an offline rebuild and final contract\ncheck.\",\n)\nelif economy and count == economy:\ncontext(\n\"PreToolUse\",\n\"Economy stage: consolidate the behavior ledger, batch related checks, and\ncover \"\n\"remaining documented semantic families before low−frequency polish.\",\n)\nreturn 0\n\nif\n\nname == \" main \":\nraise SystemExit(main())\n\n41\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"