"<!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>CMB: A C ODING M EMORY B ENCHMARK FOR L ONG H ORIZON AND I NTERLEAVED C ODING AGENTS\nJiazheng Kang∗\nTencent Hunyuan\n\nTianxiang Fei∗\nTencent Hunyuan\n\nMao Zheng\nTencent Hunyuan\n\nA BSTRACT\nCoding agents increasingly operate in long sessions where tasks are interrupted,\nrequirements evolve, branches diverge, and unfinished work must later be resumed. Memory must therefore support subsequent repository actions, not\nmerely recall prior text. We introduce CodeMemoryBench (CMB), an executiongrounded benchmark for memory in long-session coding agents. CMB constructs controlled, interleaved task histories in real repositories, freezes interaction\nstreams and repository checkpoints, and replays identical histories to every memory mechanism. It comprises 216 code-editing tasks and 750 diagnostic questions over 5,595 turns from nine repositories in four languages. Experiments with\nfive existing memory mechanisms reveal substantial room for improvement: the\nstrongest mechanism resolves only 36.6% of CMB tasks with the stronger of two\nagent backbones. To address this limitation, we propose a three-layer memory that\nlinks task facts, reusable experience, and concrete code diffs through provenance\nand evolution relations. It reaches 43.1% and 35.6% on CMB across the two backbones, compared with 36.6% and 28.2% for the strongest baselines. On SWEContextBench, it achieves 47.5% and 28.3%, versus 45.5% and 25.3% for the\nstrongest competing memories. CMB connects diagnostic recall with executable\noutcomes, measuring whether memory enables agents to resume and complete\ncoding work.\n\n1\n\nI NTRODUCTION\n\nA substantial coding session spans more than one self-contained request. A developer may ask an\nagent to implement a configuration option, investigate an unrelated failure, change an earlier requirement, and then continue the original task. By that point, the conversation contains useful knowledge\nabsent from the current request: constraints already agreed upon, unsuccessful approaches, the reason for a design choice, and work that remains unfinished. A capable coding agent must retain and\nuse this context throughout the session.\nMemory plugins address context limits by storing and retrieving information outside the immediate\nprompt (Chhikara et al., 2025; Li et al., 2025; Packer et al., 2023). Yet remembering long coding\nsessions requires more than retrieving text about a related topic. A recalled fact can lose its task\ncontext; a useful procedure can be applied outside the conditions that made it work; and a summary\nof a change can omit the code needed to continue it. Interruptions, branch switches, and repeated\nedits amplify these problems. Version confusion is one concrete symptom of a broader failure to\nconnect what happened, what was learned, and what changed in the repository.\nThis motivates an evaluation of memory through both recalled content and the subsequent coding action. Conversational benchmarks study temporal reasoning, knowledge updates, and crosssession recall (Maharana et al., 2024; Wu et al., 2024). Repository issue benchmarks provide\nexecution-based correctness (Jimenez et al., 2024). Our focus is the memory needed to sustain a\nlong developer–agent coding session, where task-relevant information is distributed across earlier\ninteractions and must be used when work resumes.\nWe introduce CodeMemoryBench for this setting. We construct long sessions in real repositories,\ninterleave coding tasks with noise turns, record the resulting work, and freeze the histories. Every\n∗\n\nEqual contribution.\n\n1\n\n\fmemory mechanism ingests the same recorded stream before the agent answers a history-dependent\nrequest or edits the repository. The benchmark contains 216 executable tasks and 750 diagnostic\nquestions over nine repositories and four languages, with 302–928 turns per repository. Code evolution supplies a demanding task family: the agent must retain decisions and implementation evidence\ndespite later edits. Existing memory mechanisms solve at most 36.6% of the code tasks under the\nstronger backbone, demonstrating substantial room for improvement.\nWe propose TriLink, a coding memory with three connected layers. Fact Memory records task\nprogress and outcomes. Experience Memory records useful approaches and their applicability. Diff\nMemory preserves concrete implementation changes. The layers evolve with the same interaction stream: updated facts retain experience links, experiences point back to supporting facts, and\nretrieved facts anchor relevant code histories. The agent can therefore combine the task’s state,\nreusable lessons, and implementation evidence when continuing its work.\nOur contributions are CMB, an execution-graded benchmark of memory in long coding sessions;\nTriLink, a method linking facts, experience, and code evolution; and an evaluation on both CMB\nand the external SWE-ContextBench suite under two backbones. The latter tests the usefulness of\nthe combined memory for experience reuse across related coding tasks.\n\n2\n\nR ELATED W ORK\n\nMemory for agents. Recent surveys organize agent memory by its theories, taxonomies, and\nevaluations (Bai et al.). Generative Agents retrieves observations and synthesizes reflections, while\nMemGPT manages memory tiers (Park et al., 2023; Packer et al., 2023). Mem0 consolidates conversational content; MemoryOS organizes short-, mid-, and long-term storage (Chhikara et al., 2025;\nKang et al., 2025). MemOS manages memory lifecycles (Li et al., 2025), and OpenViking1 organizes context hierarchically. DCPM goes beyond retrieval with a dual-process design that models\nbelief evolution, latent intentions, and cross-domain abstractions (Fei et al., 2026b). A-Mem updates interconnected notes, while MAGE preserves execution dependencies in a state tree (Xu et al.,\n2026; Chen et al., 2026). Procedural memory emphasizes reuse: MemP distills and revises instructions from trajectories; Reflexion retains feedback-derived reflections for later trials (Fang et al.,\n2026; Shinn et al., 2023). These works motivate evolving memory; TriLink links task facts and\nreusable experience to concrete code changes.\nMemory for software engineering. RepoCoder alternates retrieval and completion; GraphCoder\nuses control and data dependencies to retrieve repository context (Zhang et al., 2023; Liu et al.,\n2024). Repository memory reuses commits, linked issues, and module summaries for localization\n(Wang et al., 2026a). CodeMem maintains AST-guided repository context and session memory\nfor iterative development, including checks for forgetting (Wang et al., 2026b). CodeDelegator\ninstead separates persistent planning from ephemeral code execution, keeping debugging traces and\nfailed attempts out of the planner’s context (Fei et al., 2026a). These methods already address code\nstructure and changing context. TriLink keeps task progress, reusable solutions, and ordered patch\nevidence connected as development continues, so retrieval can support interrupted work.\nMemory and coding benchmarks. LoCoMo evaluates recall and temporal reasoning over dialogues, while LongMemEval additionally targets knowledge updates and abstention (Maharana\net al., 2024; Wu et al., 2024). MemoryBench studies learning from user feedback, and MemoryArena tests memory use across dependent agentic sessions (Ai et al., 2025; He et al., 2026). In\nsoftware engineering, SWE-bench evaluates issue resolution, CodeIF-Bench tests instruction retention during iterative coding, and SWE-Bench-CL examines learning and forgetting across chronological issues (Jimenez et al., 2024; Wang et al., 2025; Joshi et al., 2025). SWE-ContextBench\nmeasures reuse of related coding experience, while ContextBench evaluates retrieval using annotated repository contexts (Zhu et al., 2026; Li et al., 2026). CMB fixes an interleaved coding history\nfor every compared mechanism and evaluates both QA and executable edits, connecting recalled\ndecisions with their use in continued development. Table 1 summarizes the settings: long session\ndenotes a single extended agent session; interleaving denotes interrupted and resumed coding tasks;\nmemory denotes an explicit retention or reuse objective.\n1\n\nhttps://github.com/volcengine/OpenViking\n\n2\n\n\fTable 1: Benchmark settings and evaluation targets. ✓: explicitly covered; ×: not a target of the\nprotocol.\nBenchmark\n\nLong session\n\nCoding\n\nInterleaving\n\nMemory\n\nRepo tests\n\nLoCoMo\nLongMemEval\nMemoryArena\nSWE-bench\nCodeIF-Bench\nSWE-ContextBench\n\n×\n×\n×\n×\n×\n×\n\n×\n×\n×\n✓\n✓\n✓\n\n×\n×\n×\n×\n×\n×\n\n✓\n✓\n✓\n×\n✓\n✓\n\n×\n×\n×\n✓\n✓\n✓\n\nCMB (ours)\n\n✓\n\n✓\n\n✓\n\n✓\n\n✓\n\n3\n\nC ODE M EMORY B ENCH : M EMORY IN L ONG C ODING S ESSIONS\n\n3.1\n\nE VALUATION UNIT AND TASK CONSTRUCTION\n\nA CMB instance is a repository-level long session with multiple coding tasks. Figure 1 gives the\nconstruction-to-evaluation flow. For task i, the source artifact is τi = (Ri , bi , Fi , p⋆i , t⋆i , Ti+ , Ti= ):\nrepository, base commit, editable files, reference patch, test patch, F2P tests, and P2P tests. The\nreference patch and test specifications are used for construction and grading, not inserted as answers\ninto memory. A point is one technical decision within a task; a turn is one developer instruction and\nthe resulting agent/tool trace. Several point-level edits contribute to one task-level executable result.\n1. Construct the session and generate traces\n1.2 Decompose into points\n\n1.1 Select orthogonal tasks\nSelected tasks (same repository)\n\nSWE-bench Pro\n\nTask A\nfeat/A\nIssue\n\nTask B\nfeat/B\n\nTask C\nfeat/C\n\nSource tree\n\nReference\npatch\n\nSelect\northogonal\ntasks\n\nTests\n\nFiles:\nA/*\n\nFiles:\nB*\n\nFiles:\nC*\n\nP1 Modify parsing logic\n\nparser.py\n\nP2 Handle edge cases\n\nutils.py\n\nP3 Update error messages errors.py\n\nScheduled instructions\nA1 B1 C1 N1 A2 …\n\nA instructions\n\nHeld-out\nrequest q\n\nIssue + code + patch + tests\n\nTechnical decision points\n\n1.4 Generate coding traces\n\n1.3 Interleave + add noise\n\nTask A (example)\n\nA1\n\nA2\n\nA3\n\n…\n\nB instructions\nHistory instructions\n(for each point)\n\nB1\n\n(not in history)\n\nB2\n\nB3\n\nRepository (same repo)\n…\n\nInterleave\n(scheduled order)\n\nv1: initial request\n\nC instructions\n\nv2: refine requirement\n\nC1\n\nv3: address review\n\nNoise (repo inspection)\n\n…\n\nN1\n\nC2\n\nC3\n\nN2\n\nN3\n\n&gt;-\n\n…\nExecution traces + checkpoints\n\n…\n\nReserved\nfor evaluation\n\nCoverage + reference checks\nRevise / supplement\n\nA1\n\nB1\n\nC1\n\nN1\n\n+-\n\n&gt;---\n\nSession schedule\nNon-overlapping file scopes\n\nRead code\nEdit files\nRun commands\n\nCoding agent\n\nA2\n\n…\n\nTool\nAgent actions observations\n\nInstructions\n\nCode\nchanges\n\nRepo\ncheckpoints\n\n2. Long coding session across branches\nSame repository\nTask A / feat/A\n\nA1\n\nSwitch branch\n\nTask B / feat/B\nTask C / feat/C\n\nA2\nnoise\n\nB1\nC1\n\nFrozen benchmark\n\nReturn to feat/A\nResume prior work\n\nA3\nnoise\n\nB2\n\nInteraction history\nInstructions\nAgent actions\nTool\nobservations\nCode changes\n\nB3\nC3\n\nC2\n\n…\n\nRepository checkpoints\nfeat/A\nfeat/B\nfeat/C\n\n…\n…\n…\n\nTime\n\nIllustrative task / branch schedule\n\n3. Evaluation\n\nHeld-out request q\n(for code evaluation only)\n\nFullContext\n\nFrozen benchmark\nInteraction history\n+\nRepository checkpoints\n\nSame frozen history\n\nQA\nAnswer from history\n\n…\n\nRAG\nCode\n\nMemory Plugin\n\nEdit and test\n\nFigure 1: CMB construction: select repository tasks, derive decision points and history-dependent\nqueries, execute an interleaved session, then freeze its text and repository checkpoints. Evaluation\nreplays this history for each memory mechanism and measures recall and subsequent code edits.\n1. Select tasks and prepare repository states. We use SWE-bench Pro (Deng et al., 2025) issue/patch/test artifacts. After filtering documentation, lock files, CI paths, and test-only\n⋃︁edits, candidates are visited in increasing editable-file count. Task i is admitted only when Fi ∩ j∈S Fj = ∅\nfor the already selected set S. This prevents overlapping patch scopes, but does not prove semantic\nindependence. Each selected task receives a dedicated branch rooted at its own bi , verified before\ntrajectory generation.\n2. Turn reference changes into decisions and queries. The constructor reads the issue, basecode excerpts, reference patch restricted to Fi , and test information. It first extracts points (k, f, g):\na stable identifier, file anchor, and the required behavior g. Coverage checks compare these points\n3\n\n\fagainst the external patch/test specification and prompt targeted supplements for omissions. Each\npoint is then expanded into three to five implementation instructions followed by a separate final\nrequest:\n1:n\npij = (kij , fij , gij , uij ij , qij ),\nnij ∈ {3, 4, 5}.\n(1)\n1:n\n\nHere j indexes points and uij ij is the ordered instruction list. The instructions express alternatives;\nqij refers back to the intended decision without restating its full implementation. Positional, ordinal,\ndescriptive, and exclusion-based references prevent a single wording from defining the task. The\nconstructor checks referential consistency, filename anchors, and answer restatement, retrying failed\npoints. These are rule/LLM checks rather than exhaustive execution of every alternative.\n3. Execute and freeze the long session. For each task, we concatenate its non-final point instructions; a round-robin merge interleaves these task streams, inserting noise turns that query repository\nstate between rounds of tasks. The first encounter names the feature branch; subsequent requests\nrefer to the task and require the agent to recall its branch. The generator uses that task’s prior turns\nwhen producing a new response. Four generation shards are merged by their original global indices,\nproducing one interleaved replay stream per repository. Thus the long session is the memory input;\ngeneration need not place every unrelated task in each LLM prompt. The frozen bundle retains\ninstructions, traces, intended/actual branches, and repository checkpoints identified by point and\nsegment.\n4. Replay memory, then evaluate. Every mechanism ingests the same frozen text stream in order.\nThe agent starts from a clone of the frozen repository. For each point, we retrieve memory for qij\nand reset the agent’s message history; edits accumulate in the workspace across points. We then\nextract the task’s patch from the designated branch relative to bi , restricted to Fi , and grade it with\nt⋆i :\n]︁\n[︁\nyi = vi 1 (Ti+ ∪ Ti= ) ⊆ Passed(bi , pˆ︁i , t⋆i ) .\n(2)\nHere vi = 1 requires∑︁\na nonempty patch and a valid test report; otherwise vi = 0 and Passed is empty.\nThe reported rate is i yi /N over N tasks. Final requests are absent from the initial frozen stream.\nThe QA track evaluates whether an agent can recover decisions from the same long session without\nediting the repository. We group related technical decision points into a set Q of 750 open questions,\neach with a reference answer. For every question, the memory mechanism retrieves from the frozen\nsession and the agent produces an answer independently. For each answer, a judge derives mq\nrequirements from the reference and counts 0 ≤ hq ≤ mq matches. Invalid judgments have mq = 0.\nThe QA score is\n{︃\n1 ∑︂\nhq /mq , mq &gt; 0,\nSQA =\ncq ,\ncq =\n(3)\n0,\nmq = 0.\n|Q|\nq∈Q\n\nThe denominator is judge-derived rather than fixed across runs, so QA is a diagnostic complement\nto execution grading.\n3.2\n\nS CALE AND MEMORY DEMANDS\n\nTable 4 summarizes the recorded histories and executable tasks. Each repository contributes 302–\n928 interaction turns (median 583), with 5,595 turns and 8.23M frozen-trajectory tokens in total.\nOf these turns, 5,377 are coding turns and 218 are noise turns. The histories cover 212 branches\nand 216 graded tasks across four languages. A turn is one developer instruction and its corresponding agent/tool response, not an individual tool call. Turn counts include the frozen pre-evaluation\nhistory; task counts refer to the execution-graded Code track. Frozen tokens measure the stored\ntrajectory text under the cl100k base tokenizer; they exclude system prompts, instruction templates,\nand repeated context sent across later agent steps.\nThese sessions require retaining earlier constraints, reconnecting task context after interruptions, and\napplying remembered decisions to code. We make these demands executable through a revisionintensive task family. Of 1,482 technical decision points, 1,284 (87%) refer to a non-latest revision;\nthe point-depth counts are 760 at three revisions, 513 at four, and 209 at five. Version reasoning is\nthus an important diagnostic within CMB’s long-session setting. Tables 7 and 4 summarize revision\npatterns and dataset scale; the aggregate results do not isolate each memory demand.\n4\n\n\f(a) Memory construction and evolution\nNext observed interaction\n\nCoding interaction: instruction · actions · outcome · patch\nLLMs\n\nRecover code changes\n\nExtract + reconcile\n\nProcess recorded code evidence\n\nFact Memory\nTask state\nEarlier fact\nGoal: fix API error\nApproach: inspect logs\nOutcome: insufficient\n\nLogging Files: api.py\n\nSource links\n\nUpdated fact\nTask\nprogression\n\nGoal: fix API error\nApproach: add logger\nand test\nOutcome: logs working\nFiles: api.py, test_api.py\n\nsuperseded\n\nactive\n\nNew facts inherit\nexperience links\n\nExperience Memory\n\nDiff Memory\n\nReusable solutions\n\nImplementation evidence\nAppend / merge edits\n\nExisting experience\n\nRefined experience\nUpdate\nsolution +\nconditions\n\nSolution: Use structured\nlogging\nCondition: Python API\nservice\n\nSolution: Using logging\nwith levels\nCondition: API service\nwith tests\nKeys: logging, levels,\ntesting, api.py\n\nKeys: logging, handler,\nPreserve +\nextend links\n\nformat\nsuperseded\n\nGoal · approach · outcome · files\n\nactive\n\nEdit A\n\nEdit B\n\nEdit C\n\nAdd logger\nsetup.\n\nUpdate endpoint\nlogging.\n\nAdd test for\nlogging.\n\n+ logger = ...\n+ logger.setLevel(...)\n\n+ logger.info(...)\n− print(...)\n\n+ def test_log():\n+ assert ...\n\nFile: api.py\n\nFile: api.py\n\nFile: test_api.py\n\nAdd · update · remove\n\nBranch · file · code object\n\n(b) Fact-guided retrieval and use\nDiff Memory\n(from a)\n\nRetrieve Diff chains\n\nBranch / file anchors\n\nFact Memory\n(from a)\n\nExperience Memory\n(from a)\nActive + relevant\nFact 1\n\nQuery\nRetrieve Facts\n\nHow to add\nlogging to the API?\n\nFact 2\n\nGoal: add ... Goal: test ...\nFiles: api.py Files: test_...\n...\n...\n\nDiff evidence\napi.py (Edit A)\n+logger = ...\n\nQuery ranking\n\nGather linked\nexperiences\n\nNext observed\ninteraction\n\nAssemble context\nCandidate experiences\n\nFact–Experience\nlinks\n\napi.py (Edit B)\n+ logger.info(...)\n...\n(Linked to related facts)\n\nExp 1\n... Exp 2 Exp 3\n...\n...\n\nQuery relevance\n\nSelect\nexperiences\n\nSelected\nExperiences\n\nDiff evidence\n\nExp 1\n... Exp 2\n...\n\nRemaining Facts\nExperiences\n\nCoding agent\nGenerate and apply\ncode changes\n\nDeduplicate\n\nQuery-conditioned selection criteria\n\nCurrent request\n\nFigure 2: TriLink links evolving task facts, reusable experience, and code changes. The main retrieval path follows facts to relevant experience and diff evidence; direct experience matches can\nsupplement it. New observations update memory. Diff maintenance uses recorded code evidence\nwithout LLM calls.\n\n4\n\nT RI L INK : FACT, E XPERIENCE , AND D IFF M EMORY\n\nTriLink connects task state, reusable solutions, and implementation changes so that the agent can\nrecover their relationship when work resumes. Facts identify the task context for retrieving experience and code evidence. Each observation ot = (ut , at , ∆t , ct ) contains developer input, agent/tool\noutput, a code change, and repository/branch context. Memory evolves as\nMt = (Ft , Et , Dt ; Lt , St ),\n\nMt+1 = U(Mt , ot+1 ),\n\nCq = R(Mt , q).\n\n(4)\n\nF, E, and D store facts, experience, and diffs, keyed by stable identifiers. Using identifiers to denote\ntheir records, L ⊆ F × E links facts to existing experience; S ⊆ F × F records fact succession.\nFact metadata anchors diff retrieval (Figure 2).\n4.1\n\nT HREE COMPLEMENTARY REPRESENTATIONS\n\nFacts summarize a task’s goal, approach, outcome, and affected files, with an active/superseded status. Experiences describe reusable solutions: the task they address, solution steps, retrieval keys, and\napplicability conditions. Their source-fact references connect these abstractions to the observations\nthat produced them. The distinction separates the state of a particular task from knowledge that may\nhelp with subsequent work.\nDiffs preserve implementation evidence that summaries can omit. A chain dκ holds ordered records\n(j, uj , δj , tj ): revision index, instruction, patch fragment, and time. Its scope κ = (b, f, o, s, I) combines branch, file, optional object identifier, symbol, and line region. Recorded diffs, checkpoints,\nor supported edit commands supply the patches. Symbol and nearby line-region matches extend\nchains within the same branch, file, and object; fragments with identical instruction text are merged.\nCMB’s point/segment metadata supports construction-time grouping and checkpoint lookup, but is\nnot used to select the answer chain at query time.\n4.2\n\nC OUPLED UPDATES WITH PRESERVED PROVENANCE\n\nLLM-based extraction produces fact and experience drafts; reconciliation compares them with retrieved candidates. When work advances the same task, new facts supersede earlier states. Experience is added, refined, skipped as duplicate, or removed when explicitly invalidated. Refinement\n5\n\n\fupdates the solution, retrieval keys, and conditions under the same identifier while preserving source\nreferences.\nFor a successful write, F + denotes new facts, E + surviving added/updated experience, and P (f )\nthe predecessors superseded by f . Lt retains previous links to existing experience:\nS ′ = St ∪ {(p, f ) : f ∈ F + , p ∈ P (f )},\nL′ = Lt ∪ (F + × E + ) ∪ {(f, e) : f ∈ F + , p ∈ P (f ), (p, e) ∈ Lt }.\n\n(5)\n\nEquation 5 preserves earlier experience links when task state advances and connects facts to experience written in the same batch. Reverse references are updated consistently. Superseded facts\nremain traversable but leave the active retrieval index; stale references are ignored. These links\nrecord shared provenance, not a one-to-one or causal correspondence.\nThe layers can change at different times. Fact and experience updates preserve their associations,\nwhile recorded edits independently extend Diff Memory. At retrieval, fact anchors reconnect the task\nstate to this code history. This is the implemented co-evolution: shared observations and persistent\naccess relations, with existence checks for partially persisted records.\n4.3\n\nP ROVENANCE - GUIDED RETRIEVAL AND CONTEXT ASSEMBLY\n\nA query first retrieves active facts, then follows their links to candidate experience. One query\nembedding scores fact summaries and experience task/key matches. Let ranksq sort finite, scoped\ncandidates by score, takek keep the first k, and NL (F ) list linked experience in fact order. For\npositive relevance thresholds,\nFq = takekF ranksq {f ∈ CandF (q) : sq (f ) ≥ θF },\n˜︁q = {e ∈ CandE (q) : sq (e) ≥ θE },\nE\n(︂\n)︂\n˜︁q ] ∥ ranks (E\n˜︁q ) .\nEq = takekE live dedup [e ∈ NL (Fq ) : e ∈ E\nq\n\n(6)\n\nBrackets preserve order and ∥ concatenates lists. Linked experience must pass the query-relevance\ngate; direct matches supplement it after linked candidates. Deduplication keeps the first occurrence,\nand live removes missing records before truncation. Provenance therefore changes priority, while\nthe query still determines relevance.\nIn parallel, selected facts locate Diff chains through branch information, with file anchors as a fallback. Query overlap with recorded instructions and added code ranks the chains; symbol mentions\nalso guide ordering. The rendered block Bq includes the associated fact text, whose indices are\nIq ⊆ {1, . . . , |Fq |}. Context is assembled as\nCq = Bq ∥ text([Fq [i] : i ∈\n/ Iq ]) ∥ text(Eq ).\n\n(7)\n\nFacts without usable Diff evidence remain in the context. The Code configuration uses kF = kE = 5\nwith separate layer quotas. Diff rendering limits chains, code lines, and instruction length while\nretaining revision labels, using a character-budget heuristic. Diff maintenance requires no additional\nLLM or embedding calls.\n\n5\n\nE XPERIMENTS\n\n5.1\n\nS ETUP AND METRICS\n\nWe evaluate with claude-sonnet-5 and deepseek-v4-flash in the same mini-swe-agent scaffold (Yang\net al., 2024), using frozen initial histories and common prompt construction. The five CMB baselines are Mem0, MemOS, RAG, OpenViking, and RepoMemory. RAG performs plain vector retrieval over the frozen interaction history. FullContext provides a raw-history reference. SWEContextBench Lite Related supplies an external 99-task evaluation, with NoMemory and FullContext references; the RAG baseline is not part of that suite’s reported comparison.\nThe CMB main table reports resolved task counts by repository, Resolved (%) for Code, and QA\nscore (%). The SWE-ContextBench table reports Patch N/A, test-level F2P/P2P micro-averages,\n6\n\n\ftask-level F2P/P2P rates, and Resolved; the corresponding CMB metrics appear in Table 9 in the\nappendix. Missing-patch tasks remain failures in task-level metrics. CMB Resolved requires F2P\nand P2P together; the SWE-ContextBench harness used here determines resolution from F2P and\nreports P2P separately.\n5.2\n\nM AIN RESULTS\n\nTable 2: CMB results across nine repositories. Repository columns and Total report resolved task\ncounts; Code and QA report Resolved and QA scores (%), respectively. Bold: best; underline:\nsecond best, excluding references (grey method names). Improvement compares Code/QA with the\nbest other memory method for each model, in percentage points.\nModel\n\nClaude\nSonnet-5\n\nResolved tasks by repository\n\nMethod\nFullContext\nRAG\nMem0\nMemOS\nOpenViking\nRepoMemory\nTriLink\n\nOverall\n\nvu\n\nfl\n\nna\n\ntu\n\nNo\n\nqu\n\nel\n\nol\n\nan\n\nTotal\n\nCode↑\n\nQA↑\n\n6\n3\n5\n5\n4\n2\n5\n\n10\n7\n7\n6\n6\n4\n7\n\n12\n2\n4\n6\n3\n2\n6\n\n8\n5\n5\n6\n6\n3\n7\n\n11\n8\n8\n8\n9\n7\n11\n\n21\n11\n10\n13\n6\n6\n11\n\n19\n9\n13\n12\n13\n5\n13\n\n15\n12\n11\n7\n6\n4\n15\n\n25\n18\n16\n12\n10\n5\n18\n\n127\n75\n79\n75\n63\n38\n93\n\n58.8\n34.7\n36.6\n34.7\n29.2\n17.6\n43.1\n\n56.1\n48.0\n37.8\n51.9\n46.8\n18.7\n58.2\n\n6.5↑\n\n6.3↑\n\n28.2\n26.9\n21.8\n28.2\n13.0\n11.6\n35.6\n\n53.4\n62.2\n40.0\n51.4\n38.6\n9.6\n64.2\n\n7.4↑\n\n2.0↑\n\nImprovement (pp)\n\nDeepSeek\nv4-flash\n\nFullContext\nRAG\nMem0\nMemOS\nOpenViking\nRepoMemory\nTriLink\n\n5\n5\n1\n3\n1\n2\n5\n\n7\n5\n5\n4\n4\n3\n6\n\n4\n4\n4\n7\n4\n2\n6\n\n3\n2\n3\n2\n1\n2\n5\n\n6\n7\n6\n6\n4\n4\n10\n\nImprovement (pp)\n\n12\n5\n6\n7\n2\n2\n7\n\n7\n8\n6\n13\n2\n5\n14\n\n4\n8\n8\n10\n3\n2\n9\n\n13\n14\n8\n9\n7\n3\n15\n\n61\n58\n47\n61\n28\n25\n77\n\nOn CMB, TriLink improves Resolved over the strongest existing memory by 6.5 and 7.4 percentage\npoints with Sonnet-5 and flash, respectively (Table 2). QA improves by 6.3 and 2.0 points. Resolved\naggregates task outcomes rather than averaging repository percentages.\nThe tracks rank methods differently. With Sonnet-5, Mem0 beats RAG on Resolved (36.6% versus\n34.7%) but trails on QA (37.8% versus 48.0%). With flash, RAG approaches TriLink on QA (62.2%\nversus 64.2%) while lagging on Resolved (26.9% versus 35.6%). These rankings motivate evaluating both recall and executable edits. The tracks use different units and scoring rules, so their score\ndifference is not an implementation failure rate.\nFullContext is sensitive to the backbone: it reaches 58.8% with Sonnet-5 and 28.2% with flash. Raw\nhistory can help, but its use still depends on the agent’s ability to identify and apply relevant details.\nOn SWE-ContextBench, TriLink reaches 47.5% and 28.3% Resolved, exceeding the strongest competing memories at 45.5% and 25.3% (Table 3). Several plugins fall below NoMemory: retrieved\ncontext must help the next action, and its presence alone does not ensure a benefit. These fixed-run\ncomparisons support usefulness beyond CMB without establishing statistical significance.\n5.3\n\nA BLATION STUDY\n\nOn CMB, removing Diff Memory, Experience Memory, or Fact Memory reduces Resolved from\n35.6% to 20.8%, 19.9%, or 19.9%, respectively (Figure 3). Removing Diff Memory also lowers\nSWE-ContextBench Resolved from 28.3% to 21.2%. The losses are 14.8 and 7.1 percentage points:\n7\n\n\fTable 3: SWE-ContextBench Lite Related results (%). Bold: best; underline: second best, excluding references (grey method names). Improvement is relative to the best other memory method for\neach metric, in percentage points; - denotes a decrease after accounting for lower-is-better Patch\nN/A.\nModel\n\nPatch\n\nMethod\n\nClaude\nSonnet-5\n\nFullContext\nNoMemory\nMem0\nMemOS\nOpenViking\nRepoMemory\nTriLink\n\nDeepSeek\nv4-flash\n\nTasks\n\nF2P↑\n\nP2P↑\n\nF2P↑\n\nP2P↑\n\n↑\n\n5.1\n4.0\n6.1\n4.0\n4.0\n6.1\n6.1\n\n71.9\n72.2\n70.8\n70.3\n70.5\n73.5\n80.4\n\n99.8\n98.9\n97.9\n99.0\n98.8\n98.8\n98.9\n\n37.4\n43.4\n38.4\n39.4\n36.4\n45.5\n47.5\n\n85.9\n86.9\n81.8\n88.9\n83.8\n85.9\n89.9\n\n37.4\n43.4\n38.4\n39.4\n36.4\n45.5\n47.5\n\n-\n\n6.9↑\n\n-\n\n2.0↑\n\n1.0↑\n\n2.0↑\n\n8.1\n6.1\n10.1\n2.0\n7.1\n7.1\n3.0\n\n52.5\n57.7\n24.6\n23.4\n55.5\n22.6\n23.4\n\n99.2\n97.9\n98.8\n99.2\n97.9\n99.5\n99.4\n\n23.2\n20.2\n25.3\n25.3\n19.2\n19.2\n28.3\n\n76.8\n80.8\n78.8\n84.8\n76.8\n79.8\n84.8\n\n23.2\n20.2\n25.3\n25.3\n19.2\n19.2\n28.3\n\n-\n\n-\n\n-\n\n3.0↑\n\n0.0\n\n3.0↑\n\nImprovement (pp)\nCMB\n\nSWE-ContextBench\n\nw/o Diff Memory\n\n20.8%\n\nw/o Experience Memory\n\n19.9%\n\nw/o Fact Memory\n\n19.9%\n\n10\n\n20\n\n30\n\n28.3%\n\nFull TriLink\n\n35.6%\n\nFull TriLink\n\n0\n\nResolved\n\nN/A↓\n\nImprovement (pp)\nFullContext\nNoMemory\nMem0\nMemOS\nOpenViking\nRepoMemory\nTriLink\n\nTests\n\n23.2%\n\nw/o Experience + Diff Memory\n\n40\n\nw/o Diff Memory\n\n21.2%\n\nw/o Fact + Diff Memory\n\n21.2%\n\nw/o All Memory\n\n20.2%\n\n0\n\nResolved (%)\n\n10\n\n20\n\n30\n\nResolved (%)\n\nFigure 3: Layer ablations with deepseek-v4-flash. Labels identify removed components (Section 4),\nincluding joint removals on SWE-ContextBench. Bar labels show Resolved (%).\nconcrete code evidence helps in both settings, with a larger observed effect in CMB’s revisionintensive sessions.\nThe components interact through retrieval: facts anchor Diff chains, while experiences provide\nreusable procedures. On SWE-ContextBench, facts alone reach 23.2%, above the 21.2% of facts and\nexperience without diffs. Additional representations therefore need not improve Resolved. Layer removal changes both retrieval and context; these experiments do not isolate the links themselves. Full\nTriLink is best or tied across the four CMB variants in eight of nine repositories, with qutebrowser\nthe exception. Table 10 provides the repository breakdown.\n\n8\n\n\fA NALYSIS EXPERIMENT: PERFORMANCE UNDER REPEATED CODE REVISIONS\n\nWe group Code tasks by the largest number\nof recorded revisions among their decision\npoints. Figure 4 shows the 3-, 4-, and 5revision groups for both backbones; Table 8\ngives the exact values. The three-revision\ngroup contains only 12 tasks and is shown\nfor completeness.\n\nSonnet-5\n60\nResolved (%)\n\n5.4\n\n58\n\nv4-flash\n\n52\n36\n\n40\n\n42\n\n41\n32\n\n20\n\nTriLink reaches 58%, 52%, and 36% with\nSonnet-5, and 42%, 41%, and 32% with\n0\nflash. In the five-revision group, the strongest\n3\n4\n5\n3\n4\n5\nshown memory baseline reaches 30% with\nCode revisions\nTriLink\nMem0\nMemOS\nRAG\nSonnet-5 and 25% with flash. The advantage\ntherefore persists when several plausible implementations coexist in the history, a setting\nFigure 4: Resolved on CMB across 3–5 revisions.\nwhere retrieving the right topic alone leaves\nthe agent to distinguish among competing decisions.\nFrom four to five revisions, TriLink’s flash score drops nine points, versus seven for MemOS. These\nstrata contain different tasks and may differ in complexity, so the comparison does not isolate the\ncausal effect of additional revisions.\n5.5\n\nA NALYSIS EXPERIMENT: TOKEN EFFICIENCY\n\nFigure 5 compares injected memory tokens and\nResolved on SWE-ContextBench/flash; the star\nmarks TriLink and the dashed line NoMemory.\nResolved (%)\n\n30\n\nRetrieval volume alone does not explain Resolved scores. TriLink reaches 28.3% Resolved\nwith 690 injected tokens, compared with 25.3%\nat 479 tokens for MemOS and 25.3% at 257 tokens for Mem0. RepoMemory and OpenViking\ninject roughly 1,500 tokens yet resolve 19.2%\nof tasks, below the 20.2% NoMemory baseline.\nTriLink uses less than half their retrieved context while achieving a higher Resolved score.\n\nTriLink\nMem0\n\n25\nMemOS\nOpenViking\n\n20\n\nNoMemory\nRepoMemory\n\n0\n\n500\n1000\nInjected memory tokens\n\n1500\n\nMem0 and MemOS achieve equal scores with Figure 5: Injected memory tokens and Resolved\ndifferent injection sizes; TriLink adds 211 to- on SWE-ContextBench/flash.\nkens over MemOS for a 3.0-point gain. This\ntradeoff favors evidence that supports the next action over retrieval volume alone. These are observed operating points, without matched token budgets. Tokens cover retrieved memory only, excluding other agent input and memory construction costs. Table 11 lists the plotted values.\n\n6\n\nD ISCUSSION AND C ONCLUSION\n\nCMB evaluates whether memory supports continued coding through frozen repository sessions,\ndiagnostic recall, and executable edits. The results motivate linking task progress, reusable solutions,\nand code evidence: TriLink improves over existing memory mechanisms on CMB and remains\nuseful on SWE-ContextBench.\nThe evaluation has limits. Sessions are synthetic and deliberately emphasize interleaving and revision. CMB replay supplies code-object metadata that assists diff grouping; robustness without\nthat metadata needs separate evaluation. QA rubrics and construction checks depend on LLM judgments. Further work should study naturally occurring developer sessions and explicit ablations of\nthe links between the three layers.\n\n9\n\n\fAI USE STATEMENT\nGenerative models produced the coding trajectories and the evaluated agent outputs. AI tools also\nassisted with drafting, code inspection, analysis scripts, and figure preparation. The authors are\nresponsible for verifying the final text, artifacts, and measurements before submission.\nE THICS STATEMENT\nThe benchmark uses public open-source repositories and synthetic interaction sessions rather than\npersonal developer conversations. Repository and dependency licenses apply to distributed artifacts.\nRelease preparation must exclude credentials and unrelated private data from traces and supplementary files.\nR EPRODUCIBILITY STATEMENT\nCMB construction and evaluation are described in Section 3, with construction checks, trajectory\ngeneration, and replay details in Appendix A.3.1. TriLink’s memory representations, update rules,\nand retrieval procedure are specified in Section 4; implementation settings and context assembly are\ndetailed in Appendix A.3.2. Dataset statistics and supplementary results are provided in Appendices A.1 and A.2.\n\nR EFERENCES\nQingyao Ai, Yichen Tang, Changyue Wang, Jianming Long, Weihang Su, and Yiqun Liu. Memorybench: A benchmark for memory and continual learning in llm systems. arXiv preprint\narXiv:2510.17281, 2025.\nTing Bai, Jiayang Fan, Xiaoshuai Wen, Jiazheng Kang, Hengzhi Lan, Ruochen Zhao, Pingzheng\nWu, Zepeng Zhang, Yutian Zhong, Gezi Li, et al. Survey on AI memory: Theories, taxonomies,\nevaluations, and emerging trends.\nYaoqi Chen, Haibin Lai, Yuru Feng, Chuyu Han, Qianxi Zhang, Baotong Lu, Menghao Li, Xinjiang\nWang, Zhirui Wang, Shusen Xu, et al. Beyond semantic organization: Memory as execution state\nmanagement for long-horizon agents. arXiv preprint arXiv:2606.06090, 2026.\nPrateek Chhikara, Dev Khant, Saket Aryan, Taranjeet Singh, and Deshraj Yadav. Mem0: Building\nproduction-ready ai agents with scalable long-term memory. arXiv preprint arXiv:2504.19413,\n2025.\nXiang Deng, Jeff Da, Edwin Pan, Yannis Yiming He, Charles Ide, Kanak Garg, Niklas Lauffer,\nAndrew Park, Nitin Pasari, Chetan Rane, et al. Swe-bench pro: Can ai agents solve long-horizon\nsoftware engineering tasks? arXiv preprint arXiv:2509.16941, 2025.\nRunnan Fang, Yuan Liang, Xiaobin Wang, Jialong Wu, Shuofei Qiao, Pengjun Xie, Fei Huang,\nHuajun Chen, and Ningyu Zhang. Memp: Exploring agent procedural memory. In Findings of\nthe Association for Computational Linguistics: ACL 2026, pp. 17490–17502, 2026.\nTianxiang Fei, Cheng Chen, Yue Pan, Mao Zheng, and Mingyang Song. CodeDelegator: Mitigating\ncontext pollution via role separation in code-as-action agents. arXiv preprint arXiv:2601.14914,\n2026a.\nTianxiang Fei, Mingyang Song, Mao Zheng, and Xiang Yu. Memory beyond recall: A dual-process\ncognitive memory system for self-evolving LLM agents. arXiv preprint arXiv:2606.09483,\n2026b.\nZexue He, Yu Wang, Churan Zhi, Yuanzhe Hu, Tzu-Ping Chen, Lang Yin, Ze Chen, Tong Arthur\nWu, Siru Ouyang, Zihan Wang, et al. Memoryarena: Benchmarking agent memory in interdependent multi-session agentic tasks. arXiv preprint arXiv:2602.16313, 2026.\nCarlos E Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik\nNarasimhan. Swe-bench: Can language models resolve real-world github issues? In International\nConference on Learning Representations, volume 2024, pp. 54107–54157, 2024.\n10\n\n\fThomas Joshi, Shayan Chowdhury, and Fatih Uysal. Swe-bench-cl: Continual learning for coding\nagents. arXiv preprint arXiv:2507.00014, 2025.\nJiazheng Kang, Mingming Ji, Zhe Zhao, and Ting Bai. Memory OS of AI Agent. In Proceedings of\nthe 2025 Conference on Empirical Methods in Natural Language Processing, pp. 25972–25981.\nAssociation for Computational Linguistics, 2025.\nHan Li, Letian Zhu, Bohan Zhang, Rili Feng, Jiaming Wang, Yue Pan, Earl T Barr, Federica Sarro,\nZhaoyang Chu, and He Ye. Contextbench: A benchmark for context retrieval in coding agents.\narXiv preprint arXiv:2602.05892, 2026.\nZhiyu Li, Chenyang Xi, Chunyu Li, Ding Chen, Boyu Chen, Shichao Song, Simin Niu, Hanyu\nWang, Jiawei Yang, Chen Tang, et al. Memos: A memory os for ai system. arXiv preprint\narXiv:2507.03724, 2025.\nWei Liu, Ailun Yu, Daoguang Zan, Bo Shen, Wei Zhang, Haiyan Zhao, Zhi Jin, and Qianxiang\nWang. Graphcoder: Enhancing repository-level code completion via code context graph-based\nretrieval and language model. arXiv preprint arXiv:2406.07003, 2024.\nAdyasha Maharana, Dong-Ho Lee, Sergey Tulyakov, Mohit Bansal, Francesco Barbieri, and Yuwei\nFang. Evaluating very long-term conversational memory of llm agents. In Proceedings of the\n62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers),\npp. 13851–13870, 2024.\nCharles Packer, Sarah Wooders, Kevin Lin, Vivian Fang, Shishir G Patil, Ion Stoica, and Joseph E\nGonzalez. Memgpt: Towards llms as operating systems. arXiv preprint arXiv:2310.08560, 2023.\nJoon Sung Park, Joseph O’Brien, Carrie Jun Cai, Meredith Ringel Morris, Percy Liang, and\nMichael S Bernstein. Generative agents: Interactive simulacra of human behavior. In Proceedings\nof the 36th annual acm symposium on user interface software and technology, pp. 1–22, 2023.\nNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion:\nLanguage agents with verbal reinforcement learning. Advances in neural information processing\nsystems, 36:8634–8652, 2023.\nBoshi Wang, Weijian Xu, Yunsheng Li, Xuemei Gao, Yujia Xie, Huan Sun, and Dongdong Chen.\nImproving code localization with repository memory. In International Conference on Learning\nRepresentations, volume 2026, pp. 111266–111285, 2026a.\nPeiding Wang, Li Zhang, Fang Liu, Lin Shi, Minxiao Li, Bo Shen, and An Fu. Codeif-bench: Evaluating instruction-following capabilities of large language models in interactive code generation.\narXiv preprint arXiv:2503.22688, 2025.\nPeiding Wang, Li Zhang, Fang Liu, Chongyang Tao, and Yinghao Zhu. Codemem: Ast-guided\nadaptive memory for repository-level iterative code generation. In Findings of the Association for\nComputational Linguistics: ACL 2026, pp. 16903–16917, 2026b.\nDi Wu, Hongwei Wang, Wenhao Yu, Yuwei Zhang, Kai-Wei Chang, and Dong Yu. Longmemeval:\nBenchmarking chat assistants on long-term interactive memory. arXiv preprint arXiv:2410.10813,\n2024.\nWujiang Xu, Zujie Liang, Kai Mei, Hang Gao, Juntao Tan, and Yongfeng Zhang. A-mem: Agentic\nmemory for llm agents. Advances in Neural Information Processing Systems, 38:17577–17604,\n2026.\nJohn Yang, Carlos Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan,\nand Ofir Press. Swe-agent: Agent-computer interfaces enable automated software engineering.\nAdvances in Neural Information Processing Systems, 37:50528–50652, 2024.\nFengji Zhang, Bei Chen, Yue Zhang, Jacky Keung, Jin Liu, Daoguang Zan, Yi Mao, Jian-Guang\nLou, and Weizhu Chen. Repocoder: Repository-level code completion through iterative retrieval\nand generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 2471–2484, 2023.\n11\n\n\fJiayuan Zhu, Junde Wu, Minhao Hu, Shengda Zhu, Jiazhen Pan, Weixiang Shen, Yijun Yang,\nFenglin Liu, Jianye Hao, Yueming Jin, et al. Swe context bench: A benchmark for context\nlearning in coding. arXiv preprint arXiv:2602.08316, 2026.\n\n12\n\n\fA\n\nA DDITIONAL D ETAILS AND R ESULTS\n\nA.1\n\nDATASET S TATISTICS AND A NALYSIS\n\nR EPOSITORY HISTORIES AND EVALUATION UNITS\nCMB separates the history available to memory from the requests used to evaluate it. Turns measure\ndeveloper–agent interactions in the frozen history; points identify technical decisions within a task;\nCode tasks are graded by repository execution. QA questions examine decisions from those same\nhistories. Keeping these units separate is necessary to interpret both the scale of the benchmark and\nthe aggregate scores.\nTable 4 reports the history for each repository, in the order used by the main CMB table. Coding and\nnoise turns sum to the full session length. Frozen tokens count the stored trajectory text, including\nagent and tool responses. They describe how much history must be represented, rather than the input\nconsumed by a single evaluation request.\nTable 4: Frozen histories and Code tasks by repository. Token counts use cl100k base and exclude\nsystem prompts, templates, and repeated context.\nRepository\n\nLanguage\n\nTurns\n\nFrozen tokens\n\nCoding\n\nNoise\n\nTasks\n\nvuls\nflipt\nnavidrome\ntutanota\nNodeBB\nqutebrowser\nelement-web\nopenlibrary\nansible\n\nGo\nGo\nGo\nTS\nJS\nPy\nTS\nPy\nPy\n\n324\n468\n546\n302\n774\n583\n836\n928\n834\n\n591.2K\n952.7K\n1.17M\n509.4K\n868.1K\n727.5K\n1.12M\n1.19M\n1.11M\n\n305\n444\n520\n282\n742\n563\n808\n899\n814\n\n19\n24\n26\n20\n32\n20\n28\n29\n20\n\n16\n18\n20\n14\n23\n27\n28\n30\n40\n\nTotal\n\n4\n\n5,595\n\n8.23M\n\n5,377\n\n218\n\n216\n\nLanguage groups: Go 54 tasks; TypeScript/JavaScript 65 tasks; Python 97 tasks.\n\nSession length and evaluation size vary independently. For example, openlibrary has 928 turns for\n30 Code tasks, whereas ansible has 834 turns for 40 tasks. Thus the repository with more graded\nrequests need not have the longest history. This variation matters because memory must retain useful\ncontext throughout the recorded work, while each Code task contributes one outcome to Resolved.\nTable 5 connects those tasks to the underlying decisions and diagnostic questions. There are 6.9\npoints per Code task on average, with repository averages ranging from 5.0 in vuls to 8.6 in openlibrary. These averages include the four tasks without constructed decision points. QA groups related\ndecisions into 750 questions; a question may cover several points, so question counts and point\ncounts are not interchangeable.\n\n13\n\n\fTable 5: Code tasks, technical decision points, and QA questions by repository. Averages use all\nCode tasks.\nRepository\n\nCode tasks\n\nPoints\n\nQA questions\n\nPoints/task\n\nQA/task\n\nvuls\nflipt\nnavidrome\ntutanota\nNodeBB\nqutebrowser\nelement-web\nopenlibrary\nansible\n\n16\n18\n20\n14\n23\n27\n28\n30\n40\n\n80\n124\n145\n83\n196\n158\n223\n258\n215\n\n48\n71\n75\n41\n101\n80\n107\n114\n113\n\n5.0\n6.9\n7.3\n5.9\n8.5\n5.9\n8.0\n8.6\n5.4\n\n3.0\n3.9\n3.8\n2.9\n4.4\n3.0\n3.8\n3.8\n2.8\n\nTotal\n\n216\n\n1,482\n\n750\n\n6.9\n\n3.5\n\nThe two tracks consequently place different demands on memory. Code requires the relevant decisions to be applied together in a working edit. QA can reveal which requirements the agent recalls\neven when its account is incomplete. Their shared histories make the tracks complementary, but\ntheir scores should be interpreted using their own grading units.\nH ISTORICAL REFERENCES AND CODE REVISIONS\nTable 6 describes how a final Code request refers to earlier work. Positional cues identify a decision\nthrough its place in the history, while ordinal cues specify a particular attempt. Descriptive cues\nname a distinguishing behavior or structure; exclusion cues eliminate rejected alternatives. These\nforms require the retrieved context to preserve enough information to tell related decisions apart.\nTable 6: Reference forms in the 1,482 point-level Code requests.\nReference\n\nCue in the final request\n\nPositional\nOrdinal\nDescriptive\nExclusion\n\nLocate an earlier decision by its position in the history.\nIdentify a decision by its numbered attempt.\nIdentify a decision through a distinguishing feature.\nRecover a decision by ruling out the alternatives.\n\nTotal\n\nPoints\n\nShare (%)\n\n319\n363\n400\n400\n\n21.5\n24.5\n27.0\n27.0\n\n1,482\n\n100.0\n\nEach reference form accounts for between 21.5% and 27.0% of the points, so none dominates the\nrequests. The categories describe how the Code requests are worded. They do not partition the QA\ntrack or provide separate execution scores for each form, since a task can contain several kinds of\npoint-level request.\nTable 7 separates the requested revision from the number of alternatives in the history. Earlier\nrevisions are requested at 1,284 points, while 198 target the latest one. A policy that always uses the\nmost recent edit therefore does not recover the intended decision at most points. The second block\nrecords how many revisions were present, regardless of which one the final request selects.\n\n14\n\n\fTable 7: Requested and recorded revisions. Each block partitions the same 1,482 decision points.\nCharacteristic\n\nCategory\n\nPoints\n\nShare (%)\n\nRequested revision\n\nEarlier\nLatest\n\n1,284\n198\n\n86.6\n13.4\n\nRecorded revisions\n\n3\n4\n5\n\n760\n513\n209\n\n51.3\n34.6\n14.1\n\nThree-revision points are the largest group, but many tasks contain at least one point with more\nrevisions. This explains why point counts and task counts have different distributions: the task\ngrouping uses the maximum revision count among its points, rather than the most common count\nacross the repository.\nP ERFORMANCE UNDER REPEATED CODE REVISIONS\nTable 8 provides the task-level results behind the main-text analysis. The three strata contain 12, 88,\nand 112 tasks, respectively. The four tasks without constructed points remain outside this stratification. One task changes the smallest group by over eight percentage points, so its results are reported\nwithout ranking the methods.\nTable 8: CMB Resolved by task revision count (%). Bold marks the best reported memory result in\nthe two larger strata; grey names indicate references.\nModel\n\nRevisions\n\nMethod\n3\n\n4\n\n5\n\nClaude\nSonnet-5\n\nTriLink\nMem0\nRAG\nMemOS\nRepoMemory\n\n58\n50\n33\n25\n8\n\n52\n47\n42\n48\n25\n\n36\n29\n30\n27\n16\n\nDeepSeek\nv4-flash\n\nTriLink\nMemOS\nFullContext\nRAG\nMem0\n\n42\n42\n33\n33\n17\n\n41\n32\n30\n30\n32\n\n32\n25\n26\n24\n15\n\nTriLink has the highest Resolved score among memory methods in both larger strata under each\nbackbone. With Sonnet-5, the ordering of other methods changes: MemOS reaches 48% in the\nfour-revision group, just above Mem0 at 47%, but falls below it in the five-revision group, at 27%\nversus 29%. With flash, TriLink reaches 32% in the latter group, compared with 25% for MemOS\nand 24% for RAG. The advantage persists across these groups, although the absolute scores show\nthat repeated revision remains difficult.\nThe groups contain different tasks, so their score differences also reflect differences in task and\nrepository composition. They describe where a method succeeds within CMB; they do not measure\nthe effect of adding one revision to an otherwise identical request. This distinction is especially\nrelevant when comparing a method’s decline with its absolute Resolved score.\n\n15\n\n\fA.2\n\nS UPPLEMENTARY R ESULTS AND A BLATIONS\n\nR EADING THE EXECUTION METRICS ALONGSIDE QA\nTable 9 expands the Code and QA results in the main paper. Patch N/A captures failures to produce an applicable edit. F2P measures the requested behavior, while P2P checks whether existing\nbehavior is preserved. Test-level rates pool individual tests; task-level rates require every test in the\ncorresponding group to pass. Resolved requires both groups to pass and remains the main measure\nof completed Code tasks.\nThese columns can rank methods differently. With Sonnet-5, MemOS reaches an F2P test score\nof 80.6%, above TriLink’s 65.8%, but its F2P task score is 38.4%, below TriLink’s 47.2%. Tasks\ncontribute different numbers of tests, and passing some checks does not complete a request. The\nimprovement row uses the strongest other memory method in each column, accounting for the loweris-better direction of Patch N/A.\nTable 9: Detailed CMB execution metrics and QA scores (%). Bold: best; underline: second best,\nexcluding references (grey names). Improvement is in percentage points; - denotes a decrease.\nModel\n\nClaude\nSonnet-5\n\nMethod\nFullContext\nRAG\nMem0\nMemOS\nOpenViking\nRepoMemory\nTriLink\n\nImprovement (pp)\n\nDeepSeek\nv4-flash\n\nFullContext\nRAG\nMem0\nMemOS\nOpenViking\nRepoMemory\nTriLink\n\nImprovement (pp)\n\nPatch\n\nTests\n\nTasks\n\nResolved\n\nQA\n\nN/A↓\n\nF2P↑\n\nP2P↑\n\nF2P↑\n\nP2P↑\n\n↑\n\n↑\n\n10.2\n17.1\n13.9\n14.4\n15.8\n19.4\n13.0\n\n89.4\n47.8\n48.1\n80.6\n54.3\n33.5\n65.8\n\n98.5\n94.1\n96.1\n96.3\n93.9\n95.8\n97.6\n\n62.0\n39.4\n40.3\n38.4\n33.5\n20.8\n47.2\n\n81.5\n69.4\n68.1\n70.4\n67.0\n59.3\n74.5\n\n58.8\n34.7\n36.6\n34.7\n29.2\n17.6\n43.1\n\n56.1\n48.0\n37.8\n51.9\n46.8\n18.7\n58.2\n\n0.9↑\n\n-\n\n1.3↑\n\n6.9↑\n\n4.1↑\n\n6.5↑\n\n6.3↑\n\n16.7\n16.7\n13.9\n14.4\n26.9\n24.5\n11.6\n\n38.9\n36.5\n40.3\n72.9\n21.9\n28.6\n52.0\n\n94.9\n96.9\n96.8\n96.3\n89.1\n92.1\n96.9\n\n29.6\n29.6\n25.5\n31.9\n14.4\n13.4\n38.9\n\n70.4\n68.5\n66.2\n70.4\n53.2\n52.8\n72.7\n\n28.2\n26.9\n21.8\n28.2\n13.0\n11.6\n35.6\n\n53.4\n62.2\n40.0\n51.4\n38.6\n9.6\n64.2\n\n2.3↑\n\n-\n\n0.0\n\n7.0↑\n\n2.3↑\n\n7.4↑\n\n2.0↑\n\nP2P shows the same difference in granularity. TriLink passes 97.6% of individual P2P tests with\nSonnet-5, while 74.5% of tasks pass their full P2P group. A small share of failed tests can therefore\naffect a substantial share of tasks. Both views are useful: one describes the amount of preserved\nbehavior, and the other whether a task meets all of its preservation requirements.\nQA adds a different view of the remembered context. Under flash, RAG reaches 62.2% on QA,\nclose to TriLink’s 64.2%, while their Resolved scores are 26.9% and 35.6%. A recalled requirement\nmay be incomplete or may not lead to a successful implementation. These aggregate scores motivate\nevaluating both tracks; they do not identify which individual QA errors caused a Code failure.\n\n16\n\n\fH OW LAYER CONTRIBUTIONS VARY ACROSS REPOSITORIES\nTable 10 compares the layer ablations by repository under flash. Full TriLink is best or tied in eight\nrepositories, with varying contributions from each layer. The Overall row is weighted by task count.\nTable 10: CMB ablations by repository with deepseek-v4-flash: Resolved (%). Bold marks the best\nvariant in each row; Overall is weighted by tasks.\nRepository\n\nRemoved memory\n\nTriLink\nDiff\n\nExperience\n\nFact\n\nvuls\nflipt\nnavidrome\ntutanota\nNodeBB\nqutebrowser\nelement-web\nopenlibrary\nansible\n\n31.3\n33.3\n30.0\n35.7\n43.5\n25.9\n50.0\n30.0\n37.5\n\n18.8\n22.2\n25.0\n7.1\n21.7\n29.6\n25.0\n16.7\n17.5\n\n12.5\n16.7\n10.0\n14.3\n34.8\n33.3\n25.0\n13.3\n15.0\n\n6.3\n22.2\n15.0\n35.7\n21.7\n29.6\n25.0\n10.0\n17.5\n\nOverall\n\n35.6\n\n20.8\n\n19.9\n\n19.9\n\nOn navidrome, removing Experience Memory lowers Resolved from 30.0% to 10.0%, while removing Diff Memory gives 25.0%. On tutanota, removing Fact Memory leaves Resolved at 35.7%, but\nremoving Diff Memory lowers it to 7.1%. Aggregate reductions therefore conceal different dependencies across repositories.\nOn qutebrowser, all three ablated variants outperform full TriLink; removing Experience Memory\ngives the highest Resolved score. Some retrieved material may be unhelpful, but establishing the\ncause requires inspecting the retrieved records and subsequent agent actions.\nI NJECTED MEMORY TOKENS AND R ESOLVED\nTable 11 shows the tradeoff between injected memory tokens and Resolved. Mem0 uses 257 tokens,\nwhile MemOS uses 479 for the same 25.3% Resolved. TriLink achieves the highest score with 690\ntokens.\nTable 11: Injected memory tokens and Resolved on SWE-ContextBench/flash.\nMethod\n\nInjected memory tokens\n\nResolved (%)\n\n0\n257\n479\n690\n1,500\n1,517\n\n20.2\n25.3\n25.3\n28.3\n19.2\n19.2\n\nNoMemory\nMem0\nMemOS\nTriLink\nOpenViking\nRepoMemory\n\nOpenViking and RepoMemory each inject about 1,500 tokens yet score below NoMemory on Resolved, so more retrieved text does not consistently improve this metric. These measurements exclude other agent input, memory construction, and execution costs. They compare the reported\nconfigurations; rankings under matched token budgets remain untested.\n17\n\n\fA.3\n\nI MPLEMENTATION D ETAILS\n\nThis section specifies construction checks, stored information, and retrieval settings. The evaluated\ninput is the frozen history; regenerating synthetic conversations would produce a different input\nunder the same procedure.\nA.3.1\n\nB ENCHMARK CONSTRUCTION AND REPLAY\n\nEach source task retains its base revision, editable files, issue, reference patch, test patch, and\nF2P/P2P test identifiers. After file-disjoint selection (Section 3), each task branch is initialized at its\nown base revision and checked against it. The branches coexist in one repository while preserving\nthe original task states.\nConstruction separates decision specification from dialogue generation. The first prompt receives\nthe issue, base-code excerpts, the patch restricted to editable files, and test requirements. It produces\ndecision identifiers, file anchors, and target behaviors. Overloaded decisions are split further. Coverage checks compare the combined decisions with the patch and tests; missing behaviors and newly\nintroduced symbols trigger targeted supplements.\nA second prompt generates three to five implementation instructions per decision, followed by a\nfinal Code request. The instructions describe distinct alternatives at the same location, including the\nintended behavior, and are prompted to name the file and symbol. The final request uses its assigned\nhistorical reference form and is reserved for evaluation without restating the implementation.\nPoint-level checks assess filename anchoring, answer recoverability, and answer restatement. Failed\ninstructions are regenerated with the rejection reason, preserving the decision identifier and target\nbehavior; the default permits three additional attempts. Dialogue coverage is then checked against\nthe patch and tests. Missing decisions trigger new points, while specified decisions omitted from\nthe dialogue trigger instruction repair. Specification and dialogue coverage each allow up to three\nrounds. Deduplication follows, retaining unresolved diagnostics. These checks combine rules and\nLLM judgments; they do not certify that every intermediate implementation passes the task tests.\nThe round-robin schedule takes the next non-final instruction from each task and is computed before\ngeneration is divided across four shards. After each block of as many coding turns as selected tasks,\na noise turn asks about commits, working-tree state, files, or branches. A task’s branch is named\nonly at its first encounter. The construction agent receives that task’s prior turns. The saved histories\nrecord claude-sonnet-5 as this agent. Each coding or noise turn runs for at most 100 agent steps.\nEach turn stores its global position, instruction, trace, and task identity. Coding turns additionally\nstore point and segment identifiers and intended and observed branches; checkpoints preserve the\nresulting code. Shard outputs are merged by global position and their branches collected into the\nfrozen repository. Auditing checks instruction coverage, unique point–segment pairs, and replay\norder. Observed branches retain evidence of generation errors.\nInitial ingestion reads the frozen stream without rerunning the construction agent. Code evaluation\nretrieves context per final request and resets the agent’s conversation while retaining workspace\nedits. Each task patch is extracted from its designated branch relative to its base and graded in the\ncorresponding repository environment. QA records group related decisions into open questions with\nreference answers and covered-point identifiers. QA retrieval is read-only and answers are generated\nindependently, using the grading rules in Section 3.\nA.3.2\n\nT RI L INK IMPLEMENTATION\n\nSQLite stores records and relations; separate vector indices cover active fact statements and experience task descriptions/search keys. Experience matches are grouped by identifier using the highest\nsimilarity score. The default embedder is text-embedding-3-small with 1,536 dimensions. Each\nCMB repository has its own memory namespace. Retrieval receives no target-branch filter; it must\nrecover that information from the evidence.\nOne extraction call can produce a task-state fact and reusable experiences from an observation.\nFact reconciliation compares up to five active candidates to identify progress on the same task. A\nsuccessor receives a new identifier, inherits experience links, and supersedes its predecessors while\n\n18\n\n\fretaining their records. Its evolution summary inspects up to eight predecessors and is returned as\ncontext, but is excluded from the fact embedding.\nExperience reconciliation compares up to three candidates and adds, updates, skips, or deletes\nrecords. Updates retain identifiers and source-fact references. After persistence, new facts and\nadded/updated experiences from the same write are linked in both directions (Equation 5); missing records are filtered on retrieval. Fact Memory and Experience Memory can ingest subsequent\nCode-agent observations after the initial frozen history.\nDiff ingestion uses recorded patches, checkpoint differences, or supported edit commands, without LLM reconciliation. Noise and final-evaluation turns are excluded. Chains group changes by\nbranch, file, and optional code object, using symbol matches and nearby line regions with a 20-line\ntolerance. Fragments with identical instructions share one revision index. CMB point/segment identifiers support ingestion and checkpoint lookup, but not query-time chain selection. Each chain also\nretains an excerpt around its latest available checkpoint.\nOne query embedding scores active facts and experience candidates. Code uses separate quotas of\nfive facts and five experiences; QA defaults to seven each, with relevance thresholds of 0.20 for\nboth layers. The base experience candidate request is max(4kE , 8) before scope filtering and deduplication. Linked experiences are visited in fact order and must pass the query threshold; absence\nfrom the scored pool excludes a record. Other eligible direct matches follow. Missing records and\nduplicates are removed before applying the experience quota.\nIn parallel, facts locate Diff chains by branch, falling back to file anchors. Symbol mentions guide\nordering; query overlap with instructions and added code ranks competing chains. The renderer augments the first fact with usable evidence with up to three chains, retaining revision labels. Table 12\nlists the adapter defaults.\nTable 12: Default TriLink adapter settings.\nSetting\n\nDefault\n\nFact / Experience quota, Code\nFact / Experience quota, QA\nFact / Experience relevance threshold\nFact / Experience reconciliation candidates\nPredecessors used in a fact evolution summary\nFacts augmented with Diff evidence\nDiff chains per augmented fact\nRevisions per chain with detailed code\nCode excerpt per revision\nDeveloper instruction per revision\nLatest checkpoint excerpt per chain\n\n5/5\n7/7\n0.20 / 0.20\n5/3\nUp to 8\nFirst 1 with usable chains\nUp to 3\nUp to 8\n6 lines, 480 characters\n800 characters\n900 characters\n\nContext contains the Diff block, remaining facts, and experiences, in that order. Facts included in\nthe block are removed from the separate list; facts without usable diffs remain available. The two\nlayer quotas apply separately.\n\n19\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"