"<!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>Preprint\n\nH YBRID CUA: L EARNING TO O RCHESTRATE GUI AND\nCLI FOR C OMPUTER -U SE AGENTS\nTongbo Chen1* , Junbo Niu2* , Zhengxi Lu1 , Niu Lian3 , Fei Tang1 , Yuchen Yan1\nYike Hong1 , Yong Du1 , Yizhou Liu1 , Bofan Chen1 , Yongliang Shen1†\n1\n\nZhejiang University\n\narXiv:2609.38008v1 [cs.CV] 29 Sep 2026\n\n§ Code\n\n2\n\nPeking University\n\n Homepage\n\n3\n\nTsinghua University\n\nHugging Face\n\nA BSTRACT\nComputer use agents (CUAs) have demonstrated strong capabilities in completing\ndigital tasks. However, existing CUAs either rely solely on graphical user interface (GUI) interactions, which are often inefficient and error prone, or augment\nGUI interactions with application specific APIs or tools, which require substantial\nengineering effort and are difficult to scale across applications. We argue that the\nnext generation of CUAs should combine GUI interactions with the command line\ninterface (CLI), leveraging the generality of the GUI and the efficiency of shell\ncommands. A critical challenge, however, is that current models do not know\nwhen or how to use the CLI during task execution. To address this challenge,\nwe develop a data construction pipeline that produces three types of trajectories:\nGUI only, CLI only, and interleaved GUI and CLI trajectories. This pipeline results in HybridCUA-8K, containing 5K hybrid trajectories and 3K verified RLVR\ntasks. Building on these data, we propose a training framework with two stages:\nsupervised fine tuning on the constructed trajectories, followed by reinforcement\nlearning with our CLI aware rewards that encourages agents to use the CLI selectively and reliably. Experiments show that HybridCUA-9B achieves 53.6% accuracy on OSWorld, improving over the base model by 14.8 percentage points, and\nimproves performance on WindowsAgentArena by 4.0 percentage points. These\nresults demonstrate the effectiveness and cross platform generalizability of the\nhybrid GUI and CLI paradigm for computer use agents.\n\nFigure 1: Comparison of GUI only, GUI–tool, and GUI–CLI interleaved actions. GUI only\nagents use low level clicks and keystrokes; GUI–tool agents invoke application specific tools; and\nGUI–CLI agents combine GUI interaction with general purpose shell commands.\n* Equal Contribution\n\n†\n\nCorresponding Author\n\n1\n\n\fPreprint\n\n1\n\nI NTRODUCTION\n\nComputer-use agents (CUAs) built on multimodal large language models (MLLMs) typically act\nthrough clicks and keystrokes on graphical user interfaces (GUIs)—general, but slow and prone to\ncascading errors over long action sequences (Qin et al., 2025; Wang et al., 2025b; Xue et al., 2026;\nLu et al., 2026b). Application-specific APIs and tools speed things up, but only by sacrificing generality, as each must be built per application (Jia et al., 2025; Yang et al., 2025; Hu et al., 2026).\nCoding agents (OpenClaw Contributors, 2026; Claude Code Team, 2026; OpenAI, 2026) suggest\na way out: the command-line interface (CLI), which ships with the operating system and can collapse a long GUI sequence into a single command. We therefore argue that next-generation CUAs\nshould be hybrid, using the GUI for visual interaction and the shell for programmable operations\n(Figure 1). Neither interface suffices on its own, but together they pair the generality of the GUI\nwith the efficiency of code.\nHybrid interaction, however, does not come for free: simply handing a capable MLLM a shell does\nnot help, but in fact hurts. As shown in Figure 2a, once the CLI is exposed, all four representative\nagents lose 2.5 to 11.5 percentage points on OSWorld, indicating that they do not know how to\nturn shell access into effective actions. Some do not even recognize when to use it: Qwen3.527B (Qwen Team, 2026a) and EvoCUA-32B (Xue et al., 2026) route only 15.0% and 0.15% of their\nsteps through the CLI (Figure 2b), grinding through long GUI sequences that a single command\ncould replace. The bottleneck, in short, is not access to the shell but knowing when and how to use\nit.\nWe trace this deficit to two gaps in how current CUAs are trained. First, the data never shows\nwhat hybrid behavior looks like. GUI, shell, and code corpora are each abundant but siloed:\nCUA datasets contain almost exclusively GUI actions (Wu et al., 2024), whereas terminal and code\ndatasets omit the GUI context in which commands are issued. Second, the supervision is blind\nto interface choice. Step-level imitation favors locally plausible actions, while outcome rewards\nmerely check task completion (Lai et al., 2025); neither can tell a well-chosen interface from a\nsuccessful but inefficient path.\nWe close both gaps with HybridCUA, a unified data and training framework for reliable GUI–CLI\norchestration. Our key observation is that hybrid supervision need not be collected from scratch,\nsince many GUI action sequences admit equivalent shell commands. Leveraging this, we construct\na scalable pipeline spanning three execution schemas: GUI only trajectories converted from opensource datasets, CLI only trajectories sampled from strong models with an execution harness, and\ninterleaved trajectories obtained by both free-form interface switching and GUI-to-CLI rewriting.\nThe resulting 5,000 trajectories ground interface selection and command execution in GUI context. Beyond hybrid data construction, we further make interface choice an explicit training signal.\n\nFigure 2: The GUI–CLI orchestration problem. (a) Adding CLI interface to existing agents\nreduces OSWorld accuracy, whereas the trained HybridCUA-9B improves over its GUI only counterpart. (b) CLI step share varies substantially across existing agents; HybridCUA learns to use the\nCLI selectively rather than merely maximizing command usage.\n2\n\n\fPreprint\n\nFollowing supervised fine-tuning (SFT), we perform reinforcement learning with verifiable rewards\n(RLVR) in a live dual-interface environment, with two CLI-aware rewards mirroring the two missing\nabilities: a task-level reward RCLI that teaches when to invoke the CLI, and an action-level reward\nRexec that teaches how, using terminal feedback to improve command reliability.\nThe resulting HybridCUA-9B reaches 53.6% on OSWorld, 14.8 percentage points above its base\nmodel and the best among comparably sized models. Notably, it uses the CLI for 64.0% of its steps,\non par with the most CLI-heavy baseline, yet gains where that baseline loses (Figure 2), confirming\nthat the improvement comes from knowing when and how to use the shell rather than from using it\nmore. The gains carry over to Windows: on WindowsAgentArena, HybridCUA-9B reaches 36.0%,\na 4.0-point improvement over the base model.\nOur main contributions are summarized as follows:\n• We develop a scalable data generation pipeline and construct HybridCUA-8K, comprising\n5,000 GUI only, CLI only, and interleaved trajectories together with 3,000 verified RLVR\ntasks, each labeled by whether CLI use offers a clear execution advantage.\n• We propose a two-stage training framework that performs SFT on the 5,000 trajectories,\nfollowed by RLVR on the 3,000 verified tasks with CLI-aware rewards that separately target\nrouting and execution errors.\n• We train HybridCUA-9B, which achieves 53.6% on OSWorld, improving over the base\nmodel by 14.8 percentage points. We will release the trajectories, RLVR tasks, data generation and training pipelines, and the HybridCUA-9B model.\n\n2\n\nR ELATED W ORK\n\n2.1\n\nGUI-BASED C OMPUTER -U SE AGENTS\n\nRecent computer-use agents leverage large scale GUI dataset, and interaction trajectories to jointly\nimprove visual understanding, visual grounding, task planning, and reasoning (Wu et al., 2024; Lu\net al., 2026a; Qin et al., 2025; Wang et al., 2025b; Lu et al., 2025). These advances enable a single policy to operate across diverse applications and platforms through screenshots and human-like\nmouse and keyboard actions. More recently, CUA-Gym and ScaleCUA scale reinforcement learning with verifiable rewards through automatic task generation, scalable environments, and efficient\nonline training (Wang et al., 2026; Lv et al., 2026). However, these agents still operate primarily\nthrough atomic actions such as clicking, typing, and scrolling. Tasks involving file manipulation,\ntext editing, or repeated operations may therefore require long GUI sequences even when concise\nprogrammatic solutions exist, reducing efficiency and increasing the risk of cascading errors.\n2.2\n\nH YBRID C OMPUTER U SE\n\nRecent work extends computer-use agents beyond GUI only interaction. MCPWorld and OSWorldMCP benchmark coordination between GUI actions and APIs or MCP tools, while ComputerRL,\nUltraCUA, ToolCUA, and UI-TARS-2 learn policies over related hybrid action spaces (Yan et al.,\n2025; Jia et al., 2025; Lai et al., 2025; Yang et al., 2025; Hu et al., 2026; Wang et al., 2025a). Such\ntools can compress repetitive low level interactions, but their coverage and portability are bounded\nby predefined, application-specific interfaces.\nThe shell escapes this constraint, and recent work has begun to explore GUI–CLI workflows through\nbenchmarks, environments, and agent systems (Li et al., 2026; Yang et al., 2026; Zhou et al., 2026).\nThe two closest efforts differ mainly in how they supervise hybrid behavior. CUA-Universe synthesizes hybrid tasks at scale and collects guided trajectories, but scores them with a VLM rather than\ntask-specific programmatic verification, leaving feedback too coarse for online training (Shi et al.,\n2026). RecreationWorld does offer verifiable application-recreation environments, yet supervises\ntask outcomes alone, so interface selection remains implicit in trajectory imitation (Bai et al., 2026).\nIn neither case is the choice of interface part of the learning signal. HybridCUA closes this gap\nby pairing executable task verifiers with CLI-aware rewards that directly supervise interface routing\nand command reliability.\n3\n\n\fPreprint\n\nFigure 3: The HybridCUA data and training pipeline. (a) Scalable generation of GUI only, CLI\nonly, and interleaved GUI–CLI trajectories, together with annotated RL tasks. (b) Supervised fine\ntuning on DSFT . (c) Online agentic reinforcement learning with CLI aware reward signals.\n\n3\n\nH YBRID CUA\n\n3.1\n\nH YBRID C OMPUTER -U SE F ORMULATION\n\nEnvironment and observation. We formulate computer use as a partially observable Markov decision process M = ⟨S, A, P, R, Ω, O, γ⟩. The latent state st ∈ S contains the complete computer\nstate, whereas the agent observes only\not = (It , ỹt−1 ) ∼ O(· | st ),\n\n(1)\n\nwhere It is the current screenshot and ỹt−1 is the stdout/stderr of the preceding CLI action, or empty\notherwise. Each action returns one post action screenshot, paired with its CLI output when available.\nUnified GUI–CLI action space. Rather than exposing separate GUI and CLI, all executable interactions use the same bash action. We define the unified executable action space as\nA = {bash(c, δ) | c ∈ CCLI ∪ CGUI } ∪ {wait, terminate, answer} ,\n\n(2)\n\nwhere c is the command and δ is an optional timeout. CCLI contains direct shell commands and\nCGUI contains quoted Python heredocs with one or more pyautogui code. The complete action\nschema is provided in Appendix Table 5.\n3.2\n\nS CALABLE H YBRID DATA G ENERATION P IPELINE\n\nAccordingly, our scalable pipeline in Figure 3(a) constructs SFT trajectories across all three interface\nmodes and synthesizes RLVR tasks labeled by whether CLI use offers a clear execution advantage.\nTrajectory construction across interface modes. GUI only. We convert open source UI-MOPD\ntrajectories (Lian et al., 2026), re-expressing each GUI action as equivalent pyautogui code in\nour unified action format. CLI only. For each application, we distill its documentation and reference\ncode into an application-specific CLI skill listing the available CLI interfaces, common commands,\nand representative usage patterns, used only for this collection. Equipped with these skills, a Claude\nCode harness, and the CLI interface alone, Qwen3.8-27B (Qwen Team, 2026b) solves tasks sampled\nfrom CUA-Gym (Wang et al., 2026), and we retain its successful rollouts. Interleaved GUI–CLI.\n4\n\n\fPreprint\n\nTwo complementary routes yield trajectories spanning both interfaces. In the first, Qwen3.8-27B\naccesses both and chooses between them during execution. In the second, we rewrite suitable segments of its GUI only trajectories into equivalent CLI commands, then replay the result and keep\nonly successful replays. Appendix C.1 details all three routes.\nRLVR task construction and CLI advantage labeling. Building on the CUA-Gym pipeline,\nwe construct 3,000 verified tasks and label whether CLI use provides a clear execution advantage.\nFor each application, an interface guide built from its documentation and reference code lists the\navailable CLI interfaces, the operations where CLI is more efficient or reliable, and those that require\nor favor the GUI, letting the task generator locate the capability boundary between the two interfaces\nand compose hybrid tasks. The pipeline then synthesizes the task, its environment states, assets, and\nverifier, keeping those with an executable verifier and a reachable target state. To label a retained\ntask, we sample 16 rollouts under each of GUI only, CLI only, and GUI–CLI and rank the three\nmodes by success rate, breaking near-ties by step count. We assign b⋆ = 1 to tasks where CLI use\noffers a clear execution advantage, and b⋆ = 0 otherwise. All tasks are retained. Appendix C.2\nreports thresholds and label counts.\n3.3\n\nT WO S TAGE T RAINING PARADIGM\n\nWe train HybridCUA in two stages (Figure 3(b), (c)). Supervised fine-tuning teaches GUI–CLI\nexecution in the unified action format and interface switching, while reinforcement learning with\nverifiable rewards improves interface selection and CLI execution through online interaction.\nStage I: supervised warm-up. We combine the three trajectory types into the supervised training\nset DSFT . Each trajectory is serialized as a task instruction followed by observations and actions in\nthe unified action format. We optimize the next token prediction loss over agent generated responses:\n\" T\n#\nX\nLSFT = −Eτ ∼DSFT\nlog πθ (at | x, ht ) ,\n(3)\nt=0\n\nwhere x is the instruction and ht = (o0 , a0 , . . . , ot ) is the interaction history. The three trajectory\ntypes provide complementary supervision for GUI control, shell command, and interface routing.\nStage II: CLI aware online agentic reinforcement learning. We next optimize the model\nthrough online interaction with a live GUI-CLI environment. Standard agentic RL typically uses\na final accuracy reward Racc , which encourage task completion but provide limited supervision for\ninterface selection and CLI reliability. Successful rollouts receive the same accuracy reward despite\nunnecessary interface switches, while failed CLI commands go unpenalized if the task is eventually\ncompleted. This weak credit assignment makes it difficult to learn when and how to use the CLI.\nTo address these issues, we introduce a CLI aware reward consisting of a task level CLI use signal\nand a step level command execution signal. Each of the 3,000 verified tasks has the binary annotation\nb⋆ defined above. For a rollout τ , let b(τ ) = I[τ contains at least one direct CLI command]. We\ndefine the CLI reward as\nRCLI = I[Success(τ )] I[b(τ ) = b⋆ ] .\n(4)\nBy rewarding successful rollouts whose CLI usage matches the task-specific label, RCLI encourages\nthe model to select the CLI when it offers a clear execution advantage and avoid unnecessary CLI use\notherwise. It thereby teaches task dependent interface selection. For command execution, terminal\nfeedback provides localized supervision. We define the step-level execution reward as\n\u001a\n−1, if the command incurs a shell-level execution failure,\nrtexec =\n(5)\n0,\notherwise,\nand set rtexec = 0 at non-CLI steps. The two CLI-aware signals operate at complementary granularities. Because RCLI evaluates whether the rollout selects an appropriate interface strategy, we\nincorporate it into the trajectory level reward:\nR(τ ) = Racc + λCLI RCLI .\n5\n\n(6)\n\n\fPreprint\n\nTable 1: Main results on OSWorld. “Action space” denotes the executable interfaces available to\neach model. Accuracy is reported in percentage. Lower average steps indicate shorter trajectories.\nModel\n\nAction space\n\nAcc.↑\n\nAvg. Steps↓\n\nGUI\nGUI\n\n51.4\n50.4\n\n25.7\n26.3\n\nSpecialized CUA Models\nOpenCUA-7B (Wang et al., 2025b)\nOpenCUA-32B (Wang et al., 2025b)\nEvoCUA-8B (Xue et al., 2026)\nEvoCUA-32B (Xue et al., 2026)\nToolCUA-8B (Hu et al., 2026)\nAutoGLM-OS-9B (Lai et al., 2025)\nUltraCUA-32B (Yang et al., 2025)\n\nGUI\nGUI\nGUI\nGUI\nGUI+API\nGUI+API\nGUI+API\n\n28.1\n34.1\n46.1\n56.7\n46.8\n48.9\n43.7\n\n19.8\n18.7\n31.1\n25.0\n14.9\n–\n–\n\nOurs\nQwen3.5-9B (Qwen Team, 2026a)\n+ SFT\n+ SFT + RL\n\nGUI\nGUI\nGUI\n\n38.8\n44.2 +5.4\n50.4 +11.6\n\n31.6\n26.3 −5.3\n22.1 −9.5\n\nQwen3.5-9B (Qwen Team, 2026a)\n+ SFT\nHybridCUA-9B\n\nGUI+CLI\nGUI+CLI\nGUI+CLI\n\n18.4 −20.4\n46.0 +7.2\n53.6 +14.8\n\n22.1 −9.5\n19.8 −11.8\n14.0 −17.6\n\nGeneral Models\nQwen3.5-27B (Qwen Team, 2026a)\nQwen3.5-35B-A3B (Qwen Team, 2026a)\n\nIn contrast, rtexec attribute a shell execution failure to the responsible CLI action. For a GRPO group\nof G rollouts, let µG and σG denote the mean and standard deviation of their trajectory rewards. We\naugment the normalized trajectory advantage only for tokens belonging to action at :\nbt,j = R(τ ) − µG + λexec rexec ,\nA\nt\nσG + ϵ\n\nj ∈ Tok(at ),\n\n(7)\n\nwhere ϵ ensures numerical stability.\n\n4\n\nE XPERIMENTS\n\n4.1\n\nE XPERIMENTAL S ETTINGS\n\nImplementation details. We initialize HybridCUA-9B from Qwen3.5-9B (Qwen Team, 2026a)\nand adopt a two-stage training pipeline: supervised warm-up for 2 epochs on the three trajectory\ntypes, followed by online agentic RL with GRPO using our constructed RLVR tasks, where the CLI\naware reward uses λCLI = 0.1 at the trajectory level and λexec = 0.3 at the step level. We use\nverl (Sheng et al., 2025) and Megatron-LM (Shoeybi et al., 2019) for supervised training, and\nslime (THUDM, 2025) with Megatron-LM and SGLang (Zheng et al., 2024) for RL optimization\nand rollout. Dataset statistics and full training configurations are provided in Appendices C and D.\nBaselines and benchmarks. We use OSWorld (Xie et al., 2024) as our primary benchmark and\ncompare HybridCUA-9B against three categories of baselines: (i) GUI only agents, including\nQwen3.5 (Qwen Team, 2026a), OpenCUA (Wang et al., 2025b), and EvoCUA (Xue et al., 2026);\n(ii) GUI–API agents, including ToolCUA (Hu et al., 2026), AutoGLM-OS-9B (Lai et al., 2025), and\nUltraCUA (Yang et al., 2025); and (iii) Qwen3.5-9B equipped with either the GUI only or GUI–\nCLI action space. Following the official evaluation protocol, we report task accuracy (Acc.) and\naverage steps (Avg. Steps), with a maximum 50 steps per task. To evaluate out-of-distribution generalization along two complementary axes, we further test HybridCUA-9B on OSWorld-MCP and\nWindowsAgentArena (Bonatti et al., 2024). OSWorld-MCP measures transfer to an MCP-enabled\nenvironment, whereas WindowsAgentArena measures cross operating-system transfer.\n6\n\n\fPreprint\n\n4.2\n\nM AIN R ESULTS\n\nGUI–CLI vs. GUI only. In Table 1, HybridCUA-9B reaches 53.6% accuracy with 14.0 average\nsteps, the best on both metrics among comparably sized models. Merely exposing the CLI is instead\nharmful: steps fall by 9.5 but accuracy drops from 38.8% to 18.4%, so shorter trajectories here\nreflect early failure, not efficiency. Once trained to use it, the second interface pays off at both\nstages, 46.0% versus 44.2% after SFT and 53.6% versus 50.4% after RL, with steps cut from 26.3\nto 19.8 and from 22.1 to 14.0. Both branches share the same base model, comparable SFT corpora,\nand identical RLVR tasks and RL steps, isolating the added interface.\nGUI–CLI vs. GUI–API. HybridCUA-9B exceeds AutoGLM-OS-9B by 4.7 percentage points,\nToolCUA-8B by 6.8, and the four times larger UltraCUA-32B by 9.9, with 0.9 fewer steps than\nToolCUA-8B. All three rely on application-specific APIs, whereas the shell requires no perapplication construction.\n4.3\n\nA BLATION S TUDY\n\nWe ablate the two training stages in turn: first the composition of the supervised corpus, then the\ncontribution of online RL and its CLI-aware reward.\nEffect of SFT data composition. Table 2 shows\nthat mixing all three trajectory types yields\nhigher accuracy than any single type SFT. The\nmixed corpus achieves 46.0% accuracy, outperforming GUI only, CLI only, and hybrid only SFT by\n2.8, 14.3, and 5.0 percentage points, respectively. It\naverages 19.8 steps, only 0.7 more than CLI only\nSFT. Notably, interleaved trajectories alone do not\nmatch the mixed corpus, suggesting that single interface demonstrations and hybrid trajectories provide complementary supervision.\n\nTable 2: SFT data ablation on OSWorld.\nConfiguration\nAcc.↑ Avg. Steps↓\nQwen3.5-9B\n38.8\n31.6\nw/ CLI only\n31.7\n19.1\nw/ GUI only\n43.2\n29.5\nw/ Hybrid only\n41.0\n22.6\nHybridCUA-9B-SFT 46.0\n19.8\n\nEffect of RL. Starting from the mixed-data SFT checkpoint, RL increases accuracy from 46.0%\nto 53.6% and reduces average steps from 19.8 to 14.0 (Tables 2 and 1). This yields a 7.6 percentagepoint accuracy gain and saves 5.8 steps per task on average, a 29.3% reduction relative to SFT. Thus,\nRL improves task completion while further shortening trajectories beyond supervised warm-up.\n\nFigure 4: RL ablation curves on OSWorld. The four panels report task accuracy, average environment steps, the percentage of executable steps issued through the CLI, and CLI execution error rate.\nTo isolate the contribution of each CLI-aware signal, we compare three RL variants in Figure 4, all\ninitialized from the same SFT checkpoint under an identical GRPO budget: the full HybridCUA9B, a variant without the task-level RCLI , and a variant without the step-level rtexec , with the SFT\ncheckpoint shown as a reference line. The two signals govern different quantities. Removing RCLI\ncosts little accuracy but stalls the efficiency gain: CLI usage reaches only 58.9% instead of 64.0%,\nand trajectories shorten by 18.2% rather than 29.3% relative to SFT. Removing rtexec leaves accuracy\nand steps nearly intact, yet execution errors climb back to 16.5% by step 120, above the SFT level,\nwhile the full model settles at 11.5%. The task-level reward therefore decides when to use the CLI,\nwhereas the step-level reward governs how reliably commands execute.\n7\n\n\fPreprint\n\n4.4\n\nO UT- OF -D ISTRIBUTION G ENERALIZATION\nTable 3: Out-of-distribution generalization on OSWorld-MCP and WindowsAgentArena.\nModel\n\nAction space OSWorld-MCP WindowsAgentArena\n\nQwen3-VL-8B-Instruct (Bai et al., 2025)\nQwen3-VL-235B-A22B (Bai et al., 2025)\nQwen3.5-9B (Qwen Team, 2026a)\nToolCUA-8B (Hu et al., 2026)\nHybridCUA-9B (ours)\n\nGUI\nGUI\nGUI\nGUI + API\nGUI + CLI\n\n28.2\n38.1\n38.0\n46.8\n47.1\n\n26.4\n32.1\n32.0\n33.8\n36.0\n\nAs shown in Table 3, HybridCUA-9B achieves 47.1% accuracy on OSWorld-MCP, exceeding\nQwen3.5-9B by 9.1 percentage points and performing comparably to ToolCUA-8B. This suggests that learned GUI–CLI orchestration transfers to an MCP-enabled environment while remaining competitive with application-specific GUI–API integration. For cross operating-system\ntransfer, HybridCUA-9B reaches 36.0% on WindowsAgentArena, outperforming Qwen3.5-9B and\nToolCUA-8B by 4.0 and 2.2 percentage points, respectively. Notably, it issues PowerShell commands despite training only on Linux shells, suggesting that what transfers is when to delegate to\nthe shell rather than memorized commands. Together, these gains across both environments support our motivation to learn when and how to combine GUI and CLI as a transferable alternative to\napplication-specific tool integration.\n4.5\n\nA NALYSIS\n\nInterface selection. Figure 5 suggests that HybridCUA selects interfaces according to domain\nspecific interaction needs: CLI dominates OS tasks (84%), where shell commands provide direct\naccess to files and system settings, whereas GUI dominates Chrome tasks (74%), where interaction\ncenters on web pages. The breakdown in Figure 6 links these preferences to operation requirements:\nCLI dominates content editing (85.8%) and result verification (98.4%), which suit direct data manipulation and state inspection, while GUI is favored for spatial adjustment (58.4%), where visual\nfeedback guides positioning and layout.\n\nFigure 5: Domain-level accuracy and GUI/CLI step shares on OSWorld.\nComplementary GUI–CLI cooperation. Figure 7 illustrates two levels of GUI–CLI cooperation in an essay-formatting task. Across the trajectory, GUI steps focus the Writer window and\nopen its menu (step 7), while CLI steps use python-docx to apply 12 point text and single, double,\nand one-and-a-half line spacing to the introduction, body, and conclusion, respectively, before saving the file (step 10). These steps combine application interaction with direct document editing to\nadvance the same task. Within a hybrid step, step 13 first dismisses the menu using pyautogui,\nthen reopens the saved file through the CLI to check font size, line spacing, and spacing rules. Both\noperations execute sequentially in a single bash call, combining GUI state handling with file level\nverification within one step.\n8\n\n\fPreprint\n\nFigure 6: GUI/CLI step shares by operation category for HybridCUA-9B.\n\nFigure 7: GUI–CLI cooperation in essay formatting. Code is excerpted and screenshots are cropped.\n\nUnified action schema matters. We isolate the Table 4: Effect of action schema on OSWorld.\neffect of the action schema by fine-tuning two\nvariants from the same Qwen3.5-9B base and tra- Configuration\nAcc.↑ Avg. Steps↓\njectories under matched settings. The separate- Qwen3.5-9B\n38.8\n31.6\n38.8\n16.8\ntool schema keeps the two interfaces in distinct Separate GUI/CLI tools\n19.8\ntools, computer use for GUI actions and cli Unified bash action (ours) 46.0\nfor shell actions, whereas the unified schema expresses both through a single bash action. As shown in Table 4, the unified format achieves 46.0%\naccuracy with 19.8 average steps, outperforming the separate-tool schema by 7.2 percentage points\nat the cost of 3.0 additional steps. It also improves over the GUI only base, indicating that a shared\naction grammar improves task completion while remaining more efficient than the base.\n\n5\n\nC ONCLUSION\n\nWe introduced HybridCUA, a framework that teaches computer-use agents when and how to combine GUI and CLI actions. HybridCUA constructs three types of trajectories together with verified RLVR tasks, and trains a unified policy model through supervised fine-tuning and CLI-aware\nonline reinforcement learning. Experiments across multiple computer-use benchmarks show that\nHybridCUA improves both task completion and interaction efficiency over its base model, while\ngeneralizing across interfaces and operating systems. These results demonstrate that the GUI and\nCLI provide complementary capabilities and that learning to orchestrate them offers a promising\ndirection for accurate, efficient, and generalizable computer-use agents.\n9\n\n\fPreprint\n\nAI U SE S TATEMENT\nWe used AI assistants in a limited supporting role for language polishing, LATEX formatting, coding, and debugging. Large language models are also part of our methodology, as our data construction pipeline samples CLI only and interleaved trajectories from strong models through an execution\nharness (Section 3.2). The authors reviewed AI-assisted outputs before incorporating them into the\npaper. The authors made the final decisions regarding the methodology, experiments, analyses, and\npresentation, and take full responsibility for the content and results of this work.\n\nE THICS S TATEMENT\nThis work studies hybrid GUI and CLI orchestration for computer-use agents in benchmark computer environments. The experiments do not involve human participants or the collection of private\nor personally identifiable information. All trajectory collection, training, and evaluation are carried\nout in sandboxed virtual machines that are reset between episodes and have no access to real user\naccounts or credentials. Because shell access amplifies what an agent can do in a single action,\nbehavior and safety in real-world deployments are beyond the scope of this study; such deployments\nwould require further evaluation, safeguards, and human oversight.\n\nR EPRODUCIBILITY S TATEMENT\nSection 3 describes the hybrid formulation, the data generation pipeline, and the two-stage training\nparadigm with the CLI-aware reward. Appendix B specifies the action space and interaction protocol, and Appendix C details trajectory construction, RLVR task labeling, and dataset statistics.\nAppendix D reports the supervised and RL hyperparameters and compute setup, while Appendix E\ndocuments the benchmark settings, baselines, and metric definitions, and Appendix G provides the\nsystem prompts used for evaluation and data construction. We will release the trajectories, RLVR\ntasks, data generation and training pipelines, and the HybridCUA-9B model.\n\nR EFERENCES\nShuai Bai, Yuxuan Cai, Ruizhe Chen, et al.\narXiv:2511.21631, 2025.\n\nQwen3-VL technical report.\n\narXiv preprint\n\nShuai Bai, Jiayong Deng, Sicheng Fan, et al. RecreationWorld: Scalable and verifiable environments\nfor hybrid computer-use agents. arXiv preprint arXiv:2609.22000, 2026.\nRogerio Bonatti, Dan Zhao, Francesco Bonacci, et al. Windows agent arena: Evaluating multimodal os agents at scale. arXiv preprint arXiv:2409.08264, 2024.\nClaude Code Team. Claude Code. GitHub repository, 2026. URL https://github.com/\nanthropics/claude-code.\nXuhao Hu, Xi Zhang, Haiyang Xu, et al. ToolCUA: Towards optimal gui-tool path orchestration for\ncomputer use agents. arXiv preprint arXiv:2605.12481, 2026.\nHongrui Jia, Jitong Liao, Xi Zhang, Haiyang Xu, Tianbao Xie, Chaoya Jiang, Ming Yan, Si Liu, Wei\nYe, and Fei Huang. OSWorld-MCP: Benchmarking mcp tool invocation in computer-use agents.\narXiv preprint arXiv:2510.24563, 2025.\nHanyu Lai, Xiao Liu, Yanxiao Zhao, et al. ComputerRL: Scaling end-to-end online reinforcement\nlearning for computer use agents. arXiv preprint arXiv:2508.14040, 2025.\nWanli Li, Bowen Zhou, Yunyao Yu, Zhou Xu, Yifan Yang, Dongsheng Li, and Caihua Shan.\nWeaveBench: A long-horizon, real-world benchmark for computer-use agents with hybrid interfaces. arXiv preprint arXiv:2606.09426, 2026.\nNiu Lian, Tongbo Chen, Zhehao Yu, Chengzhen Duan, Fazhan Liu, Hui Liu, Pei Fu, Jian Luan,\nHeng Qu, Shu-Tao Xia, and Jinpeng Wang. UI-MOPD: Multi-platform on-policy distillation for\nunified gui agents. arXiv preprint arXiv:2607.04425, 2026.\n10\n\n\fPreprint\n\nZhengxi Lu, Jiabo Ye, Fei Tang, Yongliang Shen, Haiyang Xu, Ziwei Zheng, Weiming Lu, Ming\nYan, Fei Huang, Jun Xiao, et al. Ui-s1: Advancing gui automation via semi-online reinforcement\nlearning. arXiv preprint arXiv:2509.11543, 2025.\nZhengxi Lu, Yuxiang Chai, Yaxuan Guo, Xi Yin, Liang Liu, Hao Wang, Han Xiao, Shuai Ren,\nPengxiang Zhao, Guangyi Liu, et al. Ui-r1: Enhancing efficient action prediction of gui agents\nby reinforcement learning. In Proceedings of the AAAI Conference on Artificial Intelligence,\nvolume 40, pp. 17608–17616, 2026a.\nZhengxi Lu, Fei Tang, Guangyi Liu, Jin Ma, Kaitao Song, Xu Tan, Wenqi Zhang, Weiming Lu,\nJun Xiao, Yueting Zhuang, et al. Ui-copilot: Advancing long-horizon gui automation via toolintegrated policy optimization. In Proceedings of the 64th Annual Meeting of the Association for\nComputational Linguistics (Volume 1: Long Papers), pp. 19741–19762, 2026b.\nBowen Lv, Xiao Liu, Yanyu Ren, Hanyu Lai, Bohao Jing, Hanchen Zhang, Yanxiao Zhao, Shuntian\nYao, Jie Tang, and Yuxiao Dong. SCALECUA: Scaling computer use agents with verifiable task\nsynthesis and efficient online rl. arXiv preprint arXiv:2607.11185, 2026.\nOpenAI. Codex for (almost) everything. OpenAI, April 2026. URL https://openai.com/\nindex/codex-for-almost-everything/. Published April 16, 2026.\nOpenClaw Contributors. Peekaboo: Mac automation that sees the screen and does the clicks. GitHub\nrepository, 2026. URL https://github.com/openclaw/Peekaboo.\nYujia Qin, Yining Ye, Junjie Fang, et al. UI-TARS: Pioneering automated gui interaction with native\nagents. arXiv preprint arXiv:2501.12326, 2025.\nQwen Team. Qwen3.5: Towards native multimodal agents. Qwen Blog, 2026a. URL https:\n//qwen.ai/blog?id=qwen3.5. Published February 15, 2026.\nQwen Team. Qwen3.8. Qwen Blog, 2026b. URL https://qwen.ai/blog?id=qwen3.8.\nQwen3.8-27B open-weight release, August 14, 2026.\nGuangming Sheng, Chi Zhang, Zilingfeng Ye, Xibin Wu, Wang Zhang, Ru Zhang, Yanghua Peng,\nHaibin Lin, and Chuan Wu. HybridFlow: A flexible and efficient RLHF framework. In Proceedings of the Twentieth European Conference on Computer Systems (EuroSys), 2025.\nHaoting Shi, Wenhao Wang, Weicheng Fang, Yaozhong Liang, Tian Jin, Pengxiang Zhao, Guangyi\nLiu, Siheng Chen, and Yanfeng Wang. CUA-Universe: A scalable and dynamic environment for\nhybrid GUI+CLI agents. arXiv preprint arXiv:2609.05374, 2026.\nMohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan\nCatanzaro. Megatron-LM: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053, 2019.\nTHUDM. slime: An LLM post-training framework for RL scaling. https://github.com/\nTHUDM/slime, 2025.\nBowen Wang, Dunjie Lu, Junli Wang, Tianyi Bai, Shixuan Liu, Zhipeng Zhang, Haiquan Wang,\nHao Hu, Tianbao Xie, Shuai Bai, Dayiheng Liu, Que Shen, Junyang Lin, and Tao Yu. CUAGym: Scaling verifiable training environments and tasks for computer-use agents. arXiv preprint\narXiv:2605.25624, 2026.\nHaoming Wang, Haoyang Zou, Huatong Song, et al. UI-TARS-2 technical report: Advancing gui\nagent with multi-turn reinforcement learning. arXiv preprint arXiv:2509.02544, 2025a.\nXinyuan Wang, Bowen Wang, Dunjie Lu, et al. OpenCUA: Open foundations for computer-use\nagents. arXiv preprint arXiv:2508.09123, 2025b.\nZhiyong Wu, Zhenyu Wu, Fangzhi Xu, et al. OS-ATLAS: A foundation action model for generalist\ngui agents. arXiv preprint arXiv:2410.23218, 2024.\nTianbao Xie, Danyang Zhang, Jixuan Chen, et al. OSWorld: Benchmarking multimodal agents for\nopen-ended tasks in real computer environments. arXiv preprint arXiv:2404.07972, 2024.\n11\n\n\fPreprint\n\nTaofeng Xue, Chong Peng, Mianqiu Huang, Linsen Guo, Tiancheng Han, Haozhe Wang, Jianing\nWang, Xiaocheng Zhang, Xin Yang, Dengchang Zhao, Jinrui Ding, Xiandi Ma, Yuchen Xie,\nPeng Pei, Xunliang Cai, and Xipeng Qiu. EvoCUA: Evolving computer use agents via learning\nfrom scalable synthetic experience. arXiv preprint arXiv:2601.15876, 2026.\nYunhe Yan, Shihe Wang, Jiajun Du, et al. MCPWorld: A unified benchmarking testbed for api, gui,\nand hybrid computer use agents. arXiv preprint arXiv:2506.07672, 2025.\nYuhao Yang, Zhen Yang, Zi-Yi Dou, et al. UltraCUA: A foundation model for computer use agents\nwith hybrid action. arXiv preprint arXiv:2510.17790, 2025.\nYuhao Yang, Tianyu Fan, and Chao Huang. CLI-Anything: Towards agent-native computer use.\narXiv preprint arXiv:2606.03854, 2026.\nLianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun, Jeff Huang, Cody Hao Yu, Shiyi Cao,\nChristos Kozyrakis, Ion Stoica, Joseph E. Gonzalez, Clark Barrett, and Ying Sheng. SGLang:\nEfficient execution of structured language model programs. In Advances in Neural Information\nProcessing Systems (NeurIPS), 2024.\nHanzhang Zhou, Panrong Tong, Xu Zhang, Quyu Kong, Chenglin Cai, Tianyu Xia, Gongjie Zhang,\nJianan Zhang, Long Li, Long Chen, Lei Wang, Gaole Dai, Pengxiang Li, Liangyu Chen, Yue\nWang, and Steven Hoi. Qwen-UI-Agent technical report: Toward next-generation real-world\ncentric foundation GUI agents. arXiv preprint arXiv:2607.28227, 2026.\n\n12\n\n\fPreprint\n\nA\n\nL IMITATIONS\n\nHybridCUA has several limitations. First, its benefits depend on the availability and stability\nof command-line interfaces. Applications without usable CLIs, restricted-shell environments, or\noperating-system-specific command semantics may require substantially different interface-routing\nbehavior. Although we evaluate transfer on OSWorld-MCP and WindowsAgentArena, these benchmarks do not cover the full diversity of applications, operating systems, permission settings, and\nlong-horizon workflows. Second, our data construction currently focuses primarily on the applications included in OSWorld. Although these applications cover common desktop workflows, they do\nnot fully represent the diversity of domain-specific applications or out-of-distribution environments\nencountered in real-world use. Future work should extend the data construction pipeline to a broader\nrange of specialized applications and synthesize more diverse OOD environments for HybridCUA\ntraining, thereby improving its generalization to unseen applications, workflows, and interface configurations.\n\nB\n\nACTION S PACE AND I NTERACTION P ROTOCOL\n\nTable 5 specifies the executable and control actions. The shared bash interface is an action representation: using this wrapper does not make a PyAutoGUI interaction a CLI operation. GUI actions\nmanipulate the visible interface through PyAutoGUI, whereas direct CLI commands operate through\nthe shell and the programs it invokes.\nTable 5: Action space in HybridCUA.\nAction\nImplementation\nExecutable Action\nbash\nbash(command, timeout)\n\nGUI\n\nDefinition\nExecutes either a GUI or CLI command through a\nsingle shell interface.\n\npython3 &lt;&lt;’PY’\nimport pyautogui\n...\nPY\npyautogui.click(x, y)\npyautogui.doubleClick(x, y)\npyautogui.tripleClick(x, y)\npyautogui.rightClick(x, y)\npyautogui.middleClick(x, y)\npyautogui.moveTo(x, y)\npyautogui.dragTo(x, y, duration=0.5)\npyautogui.mouseDown()\npyautogui.mouseUp()\npyautogui.scroll(-5)\n\nCLI\n\npyautogui.press(’enter’)\npyautogui.hotkey(’ctrl’, ’s’)\npyautogui.typewrite(’text’, interval=0.02)\npyautogui.keyDown(’shift’)\npyautogui.keyUp(’shift’)\nDirect shell command\n\nInteraction and Control Actions\nwait\nwait(time)\nterminate\nterminate(status)\nanswer\nanswer(text)\n\nExecutes one or more pyautogui calls in a\nquoted Python heredoc.\nLeft-clicks at (x, y).\nDouble-clicks at (x, y).\nTriple-clicks at (x, y).\nRight-clicks at (x, y).\nMiddle-clicks at (x, y).\nMoves the cursor to (x, y).\nDrags from the current position to (x, y).\nPresses and holds the mouse button.\nReleases the mouse button.\nScrolls downward; a positive value scrolls upward.\nPresses a single key.\nPresses a keyboard shortcut.\nTypes the specified text.\nPresses and holds a modifier key.\nReleases a modifier key.\nExecutes a command in the shell; its stdout/stderr\nis paired with the subsequent screenshot.\nWaits for the interface to stabilize.\nEnds the task with a status of success or failure.\nSubmits a textual answer and finishes the task.\n\nAt decision step t, the agent receives the current screenshot It and, when the preceding action is a\ndirect CLI command, its stdout/stderr ỹt−1 . The task instruction and preceding interaction history\nprovide the context for generating the next action. After execution, the environment returns a postaction screenshot together with CLI output when available. Thus, CLI only trajectories restrict the\naction interface, not the observation modality: they can still contain visual observations.\nThe executable action bash(command, timeout) accepts either a direct shell command or a\nquoted Python heredoc containing PyAutoGUI operations. The control actions wait, terminate,\nand answer respectively allow the interface to settle, end an episode with a status, or submit a\n13\n\n\fPreprint\n\nfinal textual response. A model-generated completion declaration is distinct from the task verifier’s\nassessment of the resulting state.\n\nC\n\nDATASET C ONSTRUCTION AND S TATISTICS\n\nHybridCUA-8K comprises two different data units: a corpus of 5,023 supervised trajectories and a\npool of 3,000 verified RL tasks. A trajectory records one execution, while an RL task specifies an\nenvironment and a verifiable objective from which multiple rollouts can be sampled.\n\nC.1\n\nS UPERVISED F INE -T UNING DATA C ONSTRUCTION\n\nThe SFT corpus contains 5,023 trajectories spanning 11 application domains and three complementary interaction modes: GUI only, CLI only, and hybrid GUI–CLI execution. LibreOffice Impress,\nWriter, and Calc contribute 866, 818, and 811 trajectories, respectively, while the multi-application\nsplit contributes 786. Trajectories contain 10.4 logical steps on average, with a median of 7, a 90th\npercentile of 22, and a maximum of 50. Figure 8 summarizes the domain and modality composition\ntogether with the trajectory-length distribution. We construct each trajectory type as follows.\n\nGUI only trajectories. The GUI only split is derived from UI-MOPD trajectories (Lian et al.,\n2026). Figure 9 shows selected steps from a representative trajectory that changes a presentation\nslide background from the default color to red. To preserve the original GUI supervision while\nmatching the unified action space, each source operation, including clicking, dragging, scrolling,\nkeyboard shortcuts, and text entry, is translated into an equivalent PyAutoGUI call. For coordinatebased operations, the model performs visual grounding in a 1000 × 1000 coordinate space shared\nby its visual input and predicted GUI locations; the predicted coordinates are then mapped to the\nenvironment display coordinates at execution time. The converted calls are serialized as quoted\nPython heredocs inside the same bash(command, timeout) wrapper used by the other trajectory types. For example, a source click action becomes a pyautogui.click(x, y) call inside\nthis wrapper. The wrapper standardizes action serialization and execution but does not change the\ninterface category: PyAutoGUI-based interface manipulation remains a GUI action, whereas only a\ncommand that directly invokes a shell program or an application CLI is classified as a CLI action.\n\nFigure 8: Composition of the supervised fine-tuning corpus. (a) Application-domain totals, with\nthe outer-ring shade indicating GUI only, CLI only, or hybrid interaction within each domain. (b)\nOverall trajectory counts by modality. (c) Distribution of logical steps per trajectory, stacked by\nmodality.\n14\n\n\fPreprint\n\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nleft_click\n&lt;/parameter&gt;\n&lt;parameter=coordinate&gt;\n[906, 287]\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nleft_click_drag\n&lt;/parameter&gt;\n&lt;parameter=coordinate&gt;\n[593, 401]\n&lt;/parameter&gt;\n&lt;parameter=start_coordinate&gt;\n[456, 401]\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nleft_click\n&lt;/parameter&gt;\n&lt;parameter=coordinate&gt;\n[202, 223]\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nkey_down\n&lt;/parameter&gt;\n&lt;parameter=keys&gt;\n[\"shift\"]\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nleft_click\n&lt;/parameter&gt;\n&lt;parameter=coordinate&gt;\n[202, 464]\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nkey_up\n&lt;/parameter&gt;\n&lt;parameter=keys&gt;\n[\"shift\"]\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\n⇒\n\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nbash\n&lt;/parameter&gt;\n&lt;parameter=command&gt;\npython3 &lt;&lt;’PY’\nimport pyautogui\npyautogui.click(906, 287)\nPY\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\n⇒\n\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nbash\n&lt;/parameter&gt;\n&lt;parameter=command&gt;\npython3 &lt;&lt;’PY’\nimport pyautogui\npyautogui.moveTo(456, 401)\npyautogui.dragTo(593, 401, duration=0.5)\nPY\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\n⇒\n\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nbash\n&lt;/parameter&gt;\n&lt;parameter=command&gt;\npython3 &lt;&lt;’PY’\nimport pyautogui\npyautogui.click(202, 223)\npyautogui.keyDown(’shift’)\npyautogui.click(202, 464)\npyautogui.keyUp(’shift’)\nPY\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\n15\n\n\fPreprint\n\nFigure 9: A representative GUI only trajectory paired with its direct PyAutoGUI representation.\n\nCLI only trajectories. We construct application-specific CLI skills from online application documentation and reference implementations, and use Qwen3.8-27B (Qwen Team, 2026b) equipped\nwith these skills and a Claude Code harness to sample trajectories in CUA-Gym (Wang et al., 2026).\nFigure 10 shows selected steps from an Impress example. Using Python/UNO, the agent identifies\nslides 1 and 5 from their speaker-photo placeholders, changes their backgrounds from white to pale\nyellow (#FFFFCC), saves the presentation, and cross-checks the live UNO state against the saved\nXML while confirming that the other four slides remain unchanged.\n\nFigure 10: A representative CLI only trajectory.\nInterleaved GUI–CLI trajectories. Two construction routes produce trajectories containing both\ninterfaces. In the first, Qwen3.8-27B has access to GUI and CLI actions and chooses between\nthem during execution. In the second, we apply a semantics-preserving action-level transformation to GUI only trajectories generated by Qwen3.8-27B. We first identify typing actions that enter\ncommands in a terminal, rather than ordinary text in an application. Because one command may\nbe split across many actions, we reconstruct the complete command before replacement. For example, typing mkdir -p /tmp/proj and then pressing Enter becomes one direct CLI action;\nlikewise, a heredoc entered line by line is folded into one multiline command. We rewrite both\nthe executable action and its tool call, remove terminal-opening shortcuts, submission keystrokes,\nand folded content lines, and preserve all genuine GUI interactions and non-command text input.\nThus, the transformation may fold multiple GUI actions into one CLI action, but never splits one\naction into several. The converted trajectories are replayed, and only successful replays are retained,\n16\n\n\fPreprint\n\nsince a shorter command sequence need not preserve the application state expected by subsequent\nGUI actions. Figure 11 illustrates this interaction. The CLI first installs the Night Owl extension,\nmaking it available to VS Code; GUI actions then open the theme picker, select and preview the\nexact theme, and confirm the choice. Finally, the trajectory returns to the CLI and reads back the\npersisted workbench.colorTheme setting, verifying that the GUI selection was saved. Thus,\ndirect commands efficiently handle setup and state inspection, while the GUI is retained for the\nvisually grounded, stateful selection step.\n\nFigure 11: A representative interleaved GUI–CLI trajectory. CLI actions install the requested\nextension and verify the persisted setting, while GUI actions select, preview, and confirm the exact\ntheme.\nC.2\n\nRLVR TASK C ONSTRUCTION AND CLI A DVANTAGE L ABELING\n\nRLVR task construction. Building on CUA-Gym (Wang et al., 2026), we use application-specific\ninterface guides to synthesize task instructions, initial environment states, required assets, and executable verifiers. We retain tasks with executable verifiers and reachable target states, yielding 3,000\nverified tasks across 11 domains (Table 6).\nTable 6: Domain distribution of the full 3,000-task RLVR pool, before sampling the 1,000 tasks\nused for online RL.\nDomain\n\nShare\n\nlibreoffice calc\nlibreoffice writer\nlibreoffice impress\nmulti apps\nos\nchrome\nvs code\npdf\nvlc\ngimp\nthunderbird\n\n26.8%\n14.4%\n13.3%\n12.9%\n8.9%\n5.4%\n4.4%\n4.3%\n3.6%\n3.1%\n2.9%\n\nTotal\n\n100.0%\n\nLabeling procedure. For each of the 3,000 verified tasks, we sample 16 rollouts with Qwen3.827B under each of GUI only, CLI only, and GUI–CLI action spaces. Success rates use all 16\nrollouts per mode, without filtering by CLI step share. We rank modes by success rate, breaking\nties within 5 percentage points by the median step count of successful rollouts; residual ties favor\n17\n\n\fPreprint\n\na single-interface mode, then GUI only. We set b⋆ = 1 if the top-ranked mode is CLI only, or if it\nis GUI–CLI and more than half of its successful rollouts contain at least one direct CLI command;\notherwise, b⋆ = 0. No task is removed during labeling.\n\nD\n\nT RAINING D ETAILS\n\nD.1\n\nS UPERVISED F INE -T UNING C ONFIGURATION\n\nThe training corpus consists of 5,023 successful computer-use trajectories collected by driving a\ngraphical desktop, each paired with a natural-language task instruction. Expanding each trajectory\nat every decision step yields 52,227 step-level samples. Each sample is a demonstration prefix for a\ntarget action at , with context comprising the task instruction and preceding observations and actions.\nFiltering these samples to at most 12,000 tokens yields 46,876 step-level samples. Each prefix\nretains at most the three most recent screenshots at different resolutions. The current observation,\non which the target action operates, is kept at higher resolution with a pixel budget of at most\n2,088,960 pixels, costing 2,040 visual tokens. The two preceding screenshots are downsampled\nby a factor of two along each dimension, with a configured pixel budget of 548,800 pixels and\na cost of 510 visual tokens each. Visual input therefore contributes at most 2,040 + 2 × 510 =\n3,060 tokens per sample. The higher-resolution current frame preserves the spatial detail needed for\ncoordinate-level actions, while downsampled history supplies semantic context. Older screenshots\nare replaced with the placeholder text This screenshot has been collapsed., and the\naction history is limited to the 30 most recent steps. Across the corpus, 78.4% of samples contain\nthree live screenshots, 10.8% contain two, and 10.7% contain one, corresponding to an average\nof 2,895 visual tokens per sample and 45.1% of all processed tokens. With three screenshots, the\n12,000-token context budget leaves at most 8,940 tokens for the text prompt and target response; the\nlongest text prompt observed across the corpus contains 8,945 tokens. Only the final assistant turn\nof each prefix contributes to the supervised loss; all preceding assistant turns remain in the context\nbut are masked. The supervised target preserves the model’s reasoning block.\nThe model is initialized from Qwen3.5-9B and trained with verl and Megatron-LM for 2 epochs at\na global batch size of 256 step-level samples, yielding ⌊46,876/256⌋ × 2 = 366 optimizer updates.\nSequences are padded to the right, batched dynamically with a 12,000-token budget per GPU, and\ntruncated from the left if they exceed the context limit. Training uses 2 nodes with 8 GPUs each;\nTP, PP, and DP denote tensor, pipeline, and data parallelism, respectively. Validation is not used\nfor model selection, and the checkpoint at the final update is reported. Table 7 lists the full training\nconfiguration.\nD.2\n\nO NLINE R EINFORCEMENT L EARNING C ONFIGURATION\n\nTasks and training setup. We construct tasks with custom definitions, initial states, and success\ncriteria on an OSWorld-compatible desktop framework, rather than reuse public GUI benchmark\ntasks. Starting from the SFT checkpoint, we train with GRPO on 1,000 tasks sampled from 3,000\nverified tasks, using slime with Megatron-LM for optimization and SGLang for rollout. Table 8\nlists the configuration; its sampling settings apply only to training rollouts, not benchmark evaluation.\nReward design and group filtering. The task evaluator provides a binary success reward Racc ,\naugmented by a success-gated modality-preference reward:\nRCLI (τ ) = I[Success(τ )] I[b(τ ) = b⋆ ] .\n\n(8)\n⋆\n\nHere b(τ ) ∈ {0, 1} indicates whether τ issues at least one direct CLI command and b ∈ {0, 1}\nis the task’s calibrated preference from Appendix C.2. Every task in the pool carries a label, so\nthis term is defined for all training tasks. We normalize the combined trajectory reward R(τ ) =\nRacc + λCLI RCLI (τ ) within each GRPO group, with λCLI = 0.1. The execution term rtexec in\nEq. (5) is added after normalization with λexec = 0.3, as in Eq. (7). Before normalization, we\ndiscard groups with maxτ ∈G R(τ ) − minτ ∈G R(τ ) ≤ 10−12 , retaining at least one group to avoid\nempty batches. This criterion uses the combined trajectory reward, not the binary outcome alone,\nand excludes the later step-level execution term. Filtering removes groups without a group-relative\nlearning signal and makes the effective batch size variable.\n18\n\n\fPreprint\n\nTable 7: Supervised fine-tuning hyperparameters.\nCategory\n\nHyperparameter\n\nValue\n\nModel and Training Data\nBase model\nTraining data\n\nInitialization\nSamples / trajectories\n\nQwen3.5-9B\n46,876 / 5,023\n\nContext and Visual Input\nContext length\nScreenshots\nVisual tokens\nAction history\n\nTokens / truncation\nCurrent / history frames\nCurrent / history frame\nSteps\n\n12,000 / left\n1/2\n2,040 / 510\n30\n\nBatch Size and Training Duration\nGlobal batch size\nTraining duration\n\nStep-level samples\nEpochs / updates\n\n256\n2 / 366\n\nInfrastructure and Parallelism\nCluster\nTotal GPUs\nParallelism\nHardware\n\nNodes / GPUs per node\n–\nTP / PP / DP\nGPU\n\n2/8\n16\n2/1/8\nNVIDIA H20\n1 × 10−5 / cosine / 10%\nAdamW / 0.9 / 0.999\n0.01 / 1.0\n\nPrecision\nAttention backend\nActivation recomputation\nOptimizer state\nDynamic batching\n\nInitial / schedule / warm-up\nType / β1 / β2\nWeight decay / gradient\nclip\n–\n–\nMode / layers\nDistribution / offload\nTokens per GPU\n\nEvaluation and Reproducibility\nValidation / checkpoint\nRandom seed\n\n–\n–\n\nNone / final update\n1\n\nOptimization and Systems\nLearning rate\nOptimizer\nRegularization\n\nbfloat16\nFlashAttention\nFull, uniform / 1\nDistributed / CPU\n12,000\n\nContext construction and step-level credit assignment. Dynamic history expands each trajectory into step-level samples, each concatenating the context visible at that step with the policygenerated response. At most three screenshots are retained, including the current frame; historical\nframes are downsampled and older images are replaced by text placeholders. Only the latest three\nsteps are rendered in full, with earlier steps reduced to one-line action summaries. Pixel budgets, output truncation, and step limits are given in Table 8. Only the current response contributes to the loss;\nall context tokens are masked, and samples without trainable tokens are skipped. Group statistics\nand normalized advantages are computed after deduplicating step samples by trajectory, then each\ntrajectory’s group-relative advantage is broadcast back to its steps before adding the local execution\nterm. This prevents long trajectories from being counted repeatedly in group normalization.\n\nTrajectory validity and failure handling. Aborted trajectories receive zero reward and are excluded from gradient computation. Environment lifecycle failures are recorded with their stage and\nerror description in sample metadata. In-VM execution failures returned by the executor rather than\nraised as exceptions do not by themselves trigger sample removal; affected steps remain eligible for\ntraining, with applicable CLI execution penalties reflected in rtexec .\n\nAsynchronous rollout and policy staleness. Optimization and rollout are decoupled to reduce\nidle time during environment resets. Each step records its generating policy version, and a group’s\nbirth version vbirth is the minimum over all its steps. We discard groups when vcur − vbirth &gt; δ,\nwhere vcur is the current policy version and δ = 2 optimizer updates.\n19\n\n\fPreprint\n\nTable 8: Online reinforcement learning hyperparameters.\nCategory\n\nHyperparameter\n\nValue\n1,000 / 3,000\nslime / Megatron-LM / SGLang\n\nCluster\nTotal GPUs\nHardware\n\nSampled / verified\nFramework / optimizer /\nrollout\nNodes / GPUs per node\n–\nGPU\n\n3/8\n24\nNVIDIA H20\n\nParallelism and Batch Size\nTraining\nInference\nRollouts per prompt\nNominal batch\n\nGPUs / TP / DP\nGPUs / engines\n–\nGroups / trajectories\n\n16 / 4 / 4\n8/8\n8\n8 / 64\n\nRewards and GRPO\nOutcome reward\nCLI preference\nExecution term\nClip ratio\nKL\nReference / entropy\n\nRacc\nλCLI / level\nλexec / level\nLower / upper\nPenalty / loss / estimator\n–\n\n{0, 1}\n0.1 / trajectory\n0.3 / step\n0.2 / 0.2\n0.001 / 0.01 / k3\nSFT checkpoint / 0\n\nContext and Sequence Length\nScreenshots\nFull-text history\nImage pixels\nCLI output limit\nResponse limit\nEnvironment limit\n\nMaximum frames\nSteps\nCurrent / historical\nCharacters per step\nTokens per turn\nTraining / evaluation steps\n\n3\n3\n2,088,960 / 548,800\n1,000\n4,096\n30 / 50\n\nOptimization\nLearning rate\nOptimizer\nGradient\nCheckpoint interval\n\nSchedule / warm-up\nβ1 / β2 / weight decay\nClipping / microbatch\nUpdates\n\n1 × 10−6 / constant / 0\nAdam / 0.9 / 0.95 / 0.1\n1.0 / 1\n10\n\nRollout Engine\nTemperature / top-p\nThinking / KV cache\nConcurrency\nChunked prefill\nReset / post-action wait\nMaximum policy lag\n\n–\n–\nRequests per engine\nTokens\nSeconds\nδ (updates)\n\n1.0 / 1.0\nDisabled / 0.7\n64\n4,096\n60 / 0.5\n2\n\nTasks and Infrastructure\nTraining tasks\nTraining stack\n\nE\n\nE VALUATION P ROTOCOLS AND M ETRICS\n\nEvaluated task sets. OSWorld (Xie et al., 2024) is the primary benchmark and we evaluate its\nfull set of N = 361 tasks. For out-of-distribution transfer we evaluate the 361 tasks of OSWorldMCP (Jia et al., 2025), which shares the OSWorld task set but exposes an MCP-enabled environment, and the 154 tasks of WindowsAgentArena (Bonatti et al., 2024), which changes the operating\nsystem. Because the two transfer settings vary different aspects of the environment, and because\nOSWorld-MCP is built on the same task set as OSWorld rather than on unseen tasks, they are reported separately and are not combined into a single aggregate score. Every model is given a budget\nof at most 50 environment steps per task, and each reported number comes from a single evaluation\nrun per model and benchmark.\n20\n\n\fPreprint\n\nReported metrics. Let vi ∈ [0, 1] denote the evaluator score of task i. The reported Acc. is the\nmean evaluator score over the evaluated task set,\nN\n\nAcc. =\n\n100 X\nvi .\nN i=1\n\n(9)\n\nMost OSWorld verifiers are binary, in which case vi ∈ {0, 1} and Eq. (9) reduces to a strict success\nrate; a subset of verifiers, however, returns a fractional score, and we average these scores as returned rather than thresholding them into binary outcomes. The reported values are therefore mean\nevaluator scores, which are an upper bound on the strict all-or-nothing success rate and should be\ncompared only against numbers aggregated the same way. A model-generated terminate declaration never contributes to vi . Let Ti further denote the number of environment interaction steps\nPN\nconsumed by task i. The reported Avg. Steps is the all-task mean T all = N −1 i=1 Ti , computed\nover the same task set as Eq. (9) rather than over successful tasks only. One step is one environment\ninteraction, so wait and the terminating action are counted, and a task that exhausts the budget\ncontributes Ti = 50.\nInterface access. Interface access is part of the evaluation configuration, not solely a property of\nthe model name: a GUI only agent, a GUI–API agent, and a GUI–CLI agent may have different\nexecutable capabilities on the same task. In particular, evaluating in an MCP-enabled environment\ndoes not by itself establish that every model receives identical MCP tools, and cross-operatingsystem evaluation requires an explicit description of the Windows command-execution interface\nrather than an assumption that a Linux shell configuration transfers unchanged.\nLet NCLI and NGUI count executable steps assigned to the two interfaces in a specified rollout set.\nThe pooled CLI step share is 100NCLI /(NCLI + NGUI ); control actions are not executable GUI\nor CLI steps. The CLI execution error rate is 100NCLI,err /NCLI , using the same failure predicate\nas rtexec . A rate with a zero denominator is undefined, not zero. Pooled step shares weight longer\ntrajectories more heavily and are distinct from an unweighted mean of per-task shares.\n\nF\n\nM ORE C ASE S TUDIES\n\nWe present three complete recorded trajectories, with 8, 9, and 8 steps, respectively. All three have a\nsaved evaluator score of 1.0. Each row pairs the pre-action screenshot on the left with the model\naction on the right; the next row shows the resulting observation. Blue, teal, and lavender distinguish GUI, CLI, and control actions. The right column reproduces each bash command in full, or\nthe parameters of a control action, with only typographic line wrapping. Each CLI action is followed\nby its recorded execution status and stdout; all recorded stderr fields contain only whitespace and\nare omitted. Trailing blank lines are trimmed, but diagnostic messages are retained. Reasoning is\nomitted. Waiting and termination steps are retained; execution status and the agent’s termination\ndeclaration are distinct from the saved task-evaluator score.\n\n21\n\n\fPreprint\n\nCase 1\n\nWeb search to persistent Vim configuration\n\nRecorded score: 1.0\n\n8 steps\n\nTask ID: b337d106-053f-4d37-8da0-7f9c4043a66b\n\nTask. Search the Internet for a tutorial on absolute line numbers in Vim and make them the default for\nthe local editor.\nHybrid pattern: Context handoff. GUI information gathering → CLI configuration.\nGUI for information acquisition. Steps 1–4 search the web and inspect the displayed instructions,\nwhich identify set number and the .vimrc configuration file.\nCLI for persistence and verification. Steps 6–7 append the setting to ˜/.vimrc and read back its\ncontents.\nAnalysis. The handoff connects an instruction observed in the browser to a concrete local configuration\nchange. The two interfaces address different parts of the task: GUI browsing supplies the requested\nonline guidance, while direct file editing makes the setting persistent rather than enabling it only for one\nVim session. The recorded read-back confirms set number, and the evaluator score is 1.0; no\nsubsequent Vim launch is shown.\nSTEP 01 / 8\n\nCase 1 | Vim line numbers\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\n# Click on the Chrome browser window to bring it to\nfocus\npyautogui.click(700, 275)\nPY\n\nSTEP 02 / 8\n\nCase 1 | Vim line numbers\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\n# Click on the Google search bar\npyautogui.click(517, 367)\n# Type the search query\npyautogui.typewrite('tutorial adding absolute line\nnumbers Vim set number as default', interval=0.02)\nPY\n\nSTEP 03 / 8\n\nCase 1 | Vim line numbers\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\npyautogui.press('enter')\nPY\n\n22\n\n\fPreprint\n\nSTEP 04 / 8\n\nCase 1 | Vim line numbers\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\n# Scroll down to see more of the tutorial\npyautogui.scroll(-5)\nPY\n\nSTEP 05 / 8\n\nCase 1 | Vim line numbers\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\n# Click on the terminal window to bring it to focus\npyautogui.click(250, 275)\nPY\n\nSTEP 06 / 8\n\nCase 1 | Vim line numbers\n\nCLI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\necho \"set number\" &gt;&gt; ~/.vimrc &amp;&amp; echo \"Added to .vimrc\n. Contents:\" &amp;&amp; cat ~/.vimrc\nEXECUTION RESULT\n\nsuccess\n\nAdded to .vimrc. Contents:\nset number\n\nSTEP 07 / 8\n\nCase 1 | Vim line numbers\n\nCLI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\necho \"=== .vimrc location and content ===\" &amp;&amp; ls -la\n~/.vimrc &amp;&amp; echo \"\" &amp;&amp; echo \"=== Content ===\" &amp;&amp; cat\n-A ~/.vimrc | head\nEXECUTION RESULT\n\nsuccess\n\n=== .vimrc location and content ===\n-rw-r--r-- 1 user user 11 Sep 7 15:45 /home/user/.\nvimrc\n=== Content ===\nset number$\n\n23\n\n\fPreprint\n\nSTEP 08 / 8\n\nCase 1 | Vim line numbers\n\nControl\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nterminate\n\nterminate(status=\"success\")\n\nCase 2\n\nGUI preferences to a direct VLC configuration edit\n\nRecorded score: 1.0\n\n9 steps\n\nTask ID: 9195653c-f4aa-453d-aa95-787f6ccfaae9\n\nTask. Raise VLC’s maximum volume from 125% to 200%.\nHybrid pattern: Adaptive interface fallback. GUI exploration → CLI configuration repair.\nGUI for preference exploration. Steps 1–6 navigate VLC’s preferences and audio settings, including a\nwait; this sequence does not establish the requested maximum.\nCLI for targeted configuration and read-back. Step 7 locates vlcrc and finds\n#qt-max-volume=125. Step 8 replaces it with qt-max-volume=200 and checks the saved\nvalue.\nAnalysis. Instead of continuing the same GUI search, the agent changes the level of interaction from a\npreferences dialog to its backing configuration file. This is a fallback from an unproductive interaction\nroute, not evidence that VLC’s GUI cannot support the setting. The CLI completes the change and\nexposes an explicit value for verification. The evaluator relaunches VLC and checks the configuration,\nreturning 1.0; the rollout itself does not show the updated volume control.\nSTEP 01 / 9\n\nCase 2 | VLC volume limit\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\npyautogui.click(493, 344)\nPY\n\nSTEP 02 / 9\n\nCase 2 | VLC volume limit\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\npyautogui.click(566, 557)\nPY\n\n24\n\n\fPreprint\n\nSTEP 03 / 9\n\nCase 2 | VLC volume limit\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\npyautogui.click(355, 248)\nPY\n\nSTEP 04 / 9\n\nCase 2 | VLC volume limit\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\npyautogui.click(331, 831)\nPY\n\nSTEP 05 / 9\n\nCase 2 | VLC volume limit\n\nControl\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nwait\n\nwait(time=1)\n\nSTEP 06 / 9\n\nCase 2 | VLC volume limit\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\npyautogui.click(355, 248)\nPY\n\n25\n\n\fPreprint\n\nSTEP 07 / 9\n\nCase 2 | VLC volume limit\n\nCLI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\nfind / -name \"vlcrc\" 2&gt;/dev/null; echo \"---\"; grep -n\n\"max-volume\" ~/.config/vlc/vlcrc 2&gt;/dev/null || echo\n\"not in home\"\nEXECUTION RESULT\n\nsuccess\n\n/home/user/.config/vlc/vlcrc\n--2650:#qt-max-volume=125\n\nSTEP 08 / 9\n\nCase 2 | VLC volume limit\n\nCLI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\nsed -i 's/^#qt-max-volume=125/qt-max-volume=200/' /\nhome/user/.config/vlc/vlcrc &amp;&amp; grep -n \"qt-maxvolume\" /home/user/.config/vlc/vlcrc\nEXECUTION RESULT\n\nsuccess\n\n2650:qt-max-volume=200\n\nSTEP 09 / 9\n\nCase 2 | VLC volume limit\n\nControl\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nterminate\n\nterminate(status=\"success\")\n\nCase 3\n\nCLI setup, GUI interaction, and screenshot verification\n\nRecorded score: 1.0\n\n8 steps\n\nTask ID: 02ce9a50-7af2-47ed-8596-af0c230501f8\n\nTask. Run ls in /home/user for a Linux tutorial and save a screenshot of the terminal as ls.png\non the Desktop.\nHybrid pattern: Execution–verification loop. CLI setup → GUI execution → CLI capture and\nchecks.\nGUI for visible terminal execution. Step 3 focuses the opened terminal, types ls /home/user, and\npresses Enter so the output appears in the window to be captured.\nCLI for setup, capture, and artifact inspection. Steps 1–2 inspect the environment and open the\nterminal; steps 4–7 save its screenshot, inspect the PNG, and open it in an image viewer.\nAnalysis. A command result in the execution channel alone would not provide the requested terminal\nimage. Here, CLI setup creates the window, GUI input produces the visible content, and CLI capture\nturns that state into a saved artifact. The final observation displays the image opened by step 7, closing\nthe loop from file checks back to visual inspection. Capture itself is a CLI action, not a GUI action. The\nrecorded PNG is 876 × 533 and the score is 1.0; the evaluator checks for ls (or an OCR variant), not\nevery directory entry.\n\n26\n\n\fPreprint\n\nSTEP 01 / 8\n\nCase 3 | Terminal screenshot\n\nCLI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\nwhich gnome-terminal xdg-open; ls ~/Desktop/ 2&gt;/dev/\nnull; echo \"---\"; ls /home/user | head -30\nEXECUTION RESULT\n\nsuccess\n\n/usr/bin/gnome-terminal\n/usr/bin/xdg-open\ntop-10-linux-commands-for-newbies.docx\n--Desktop\nDocuments\nDownloads\nMusic\nPictures\nPublic\nrequirement.txt\nserver\nsnap\nTemplates\nVideos\n\nSTEP 02 / 8\n\nCase 3 | Terminal screenshot\n\nCLI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\n(DISPLAY=:0 gnome-terminal --geometry=90x24 &amp; sleep 3;\necho \"opened\")\nEXECUTION RESULT\n\nsuccess\n\nopened\n\nSTEP 03 / 8\n\nCase 3 | Terminal screenshot\n\nGUI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\npython3 &lt;&lt;'PY'\nimport pyautogui\npyautogui.click(265, 275)\nimport time\ntime.sleep(0.5)\npyautogui.typewrite('ls /home/user', interval=0.03)\ntime.sleep(0.3)\npyautogui.press('enter')\nPY\n\nSTEP 04 / 8\n\nCase 3 | Terminal screenshot\n\nCLI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\necho \"=== windows ===\"; wmctrl -lG 2&gt;/dev/null | grep\n-iE \"terminal|gnome\" || echo \"no wmctrl\"; echo \"===\ntools ===\"; which import gnome-screenshot scrot 2&gt;/\ndev/null; echo \"=== try gnome-screenshot -w ===\";\nDISPLAY=:0 gnome-screenshot -w -f ~/Desktop/ls.png\n2&gt;&amp;1; echo \"exit=$?\"; ls -la ~/Desktop/ls.png 2&gt;&amp;1\nEXECUTION RESULT\n\n=== windows ===\nno wmctrl\n=== tools ===\n/usr/bin/gnome-screenshot\n=== try gnome-screenshot -w ===\nexit=0\n-rw-r--r-- 1 user user 27955 Sep\nDesktop/ls.png\n\n27\n\nsuccess\n\n7 15:47 /home/user/\n\n\fPreprint\n\nSTEP 05 / 8\n\nCase 3 | Terminal screenshot\n\nCLI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\nfile ~/Desktop/ls.png; echo \"=== dimensions ===\";\npython3 -c \"from PIL import Image; im=Image.open('/\nhome/user/Desktop/ls.png'); print('size:', im.size,\n'mode:', im.mode)\" 2&gt;/dev/null || echo \"PIL not\navailable\"; echo \"=== check for terminal text in\nimage ===\"; python3 -c \"\nfrom PIL import Image\nim=Image.open('/home/user/Desktop/ls.png')\n# sample a region where terminal text should be\nw,h=im.size\nprint('image size', w, h)\n\"\nEXECUTION RESULT\n\nsuccess\n\n/home/user/Desktop/ls.png: PNG image data, 876 x 533,\n8-bit/color RGBA, non-interlaced\n=== dimensions ===\nsize: (876, 533) mode: RGBA\n=== check for terminal text in image ===\nimage size 876 533\n\nSTEP 06 / 8\n\nCase 3 | Terminal screenshot\n\nCLI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\necho \"=== terminal window geometry ===\"; DISPLAY=:0\nxdotool search --name \"user@user-virtual-machine\"\ngetwindowgeometry %\nfrom PIL import Image\nim = Image.open('/home/user/Desktop/ls.png').convert('\nRGB')\nw,h = im.size\npx = im.load()\n# count dark pixels (background) vs light pixels (text\n)\ndark, light, mid = 0,0,0\nfor y in range(0,h,2):\nfor x in range(0,w,2):\nr,g,b = px[x,y]\nv = (r+g+b)/3\nif v &lt; 60: dark+=1\nelif v &gt; 200: light+=1\nelse: mid+=1\nprint(f\"image {w}x{h}\")\nprint(f\"dark px: {dark}, light px: {light}, mid: {mid\n}\")\n# sample a horizontal strip in the middle to see text\nlines\nfor y in [h//2, h//2+20, h//2+40]:\nvals=[]\nfor x in range(0,w,4):\nv=(px[x,y][0]+px[x,y][1]+px[x,y][2])/3\nvals.append(v)\nprint(f\"y={y}: min={min(vals):.0f} max={max(vals)\n:.0f} mean={sum(vals)/len(vals):.0f}\")\nPY\nEXECUTION RESULT\n\n=== terminal window geometry ===\n=== analyze ls.png: dark bg + text ===\nimage 876x533\ndark px: 114584, light px: 324, mid: 2038\ny=266: min=0 max=166 mean=30\ny=286: min=0 max=166 mean=30\ny=306: min=0 max=166 mean=30\n\n28\n\nsuccess\n\n\fPreprint\n\nSTEP 07 / 8\n\nCase 3 | Terminal screenshot\n\nCLI\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nbash\n\n(DISPLAY=:0 eog ~/Desktop/ls.png &gt;/dev/null 2&gt;&amp;1 &amp;\nsleep 2; echo \"opened eog\")\nEXECUTION RESULT\n\nsuccess\n\nopened eog\n\nSTEP 08 / 8\n\nCase 3 | Terminal screenshot\n\nControl\n\nGUI OBSERVATION\n\nMODEL ACTION\n\nterminate\n\nterminate(status=\"success\")\n\n29\n\n\fPreprint\n\nG\n\nP ROMPT U SED IN E VALUATION A ND T RAINING DATA C ONSTRUCTION\n\nG.1\n\nOSW ORLD E VALUATION : U NIFIED ACTION S CHEMA\n\nThis is the system prompt used for our OSWorld evaluation. A single computer use tool exposes\naction=bash for both direct shell commands and GUI operations via PyAutoGUI heredocs. It\ndiffers from the separate-tool hybrid configuration in the action-schema analysis (Table 4), whose\nprompt is given in Appendix G.2.\n\nSystem Prompt: OSWorld Evaluation (Unified Bash)\n# Role\nYou are a multi-purpose intelligent assistant operating a computer through a bash terminal. The\npassword of the computer is password.\n# Environment\nYou face a machine with a graphical desktop AND a bash terminal. You act ONLY by running\none shell command per step (action=bash): write shell for CLI/file operations, or drive the\nGUI with pyautogui inside a quoted heredoc python3 &lt;&lt;’PY’ ... PY (coordinates are\n0–999). Each step you are shown the latest screenshot plus the previous command’s output.\n# Tools\nYou have access to the following functions:\nTool type:\nFunction name:\nParameters type:\nRequired parameters:\n\nfunction\ncomputer_use\nobject\n[\"action\"]\n\nControl the machine through a bash terminal. One action per call. The screen is a GUI desktop:\ndrive it with pyautogui via a quoted heredoc, or run shell commands / file operations directly.\n# Tool Parameters\n• action (string; required). One of bash, wait, terminate, answer. The action\ndescriptions are given below.\n• command (string). Required by action=bash. A single shell command. For GUI, run\npyautogui via a quoted heredoc: python3 &lt;&lt;’PY’ ... PY (coordinates 0–999).\n• timeout (number). Optional for action=bash: seconds to allow the command (default\n60). The sandbox cuts commands short after approximately 30 s regardless.\n• time (number). Optional for action=wait: seconds.\n• status (string). One of success, failure. Required by action=terminate.\n• text (string). Required by action=answer.\n# Action: bash\nRun ONE shell command (requires command).\n• CLI / file ops: write shell directly (ls, cat, sed, grep, python3 - &lt;&lt;’PY’ ... PY, . . . ).\n• GUI: drive the screen with pyautogui inside a QUOTED heredoc, e.g.\npython3 &lt;&lt;’PY’\nimport pyautogui\npyautogui.click(500, 300)\n\n# coordinates are 0-999\n# screen treated as 1000x1000\npyautogui.typewrite(’hello’, interval=0.02)\nPY\n\n30\n\n\fPreprint\n\n# PyAutoGUI Functions\npyautogui.click(x, y)\npyautogui.doubleClick(x, y)\npyautogui.tripleClick(x, y)\npyautogui.rightClick(x, y)\npyautogui.middleClick(x, y)\npyautogui.moveTo(x, y)\npyautogui.dragTo(x, y, duration=0.5)\npyautogui.mouseDown()\npyautogui.mouseUp()\npyautogui.scroll(-5)\npyautogui.press(’enter’)\npyautogui.hotkey(’ctrl’, ’s’)\npyautogui.typewrite(’text’, interval=0.02)\npyautogui.keyDown(’shift’)\npyautogui.keyUp(’shift’)\n\n# left click\n# double click\n# triple click\n# right click\n# middle click\n# move mouse\n# drag to position\n# press mouse button\n# release mouse button\n# scroll down (negative=down)\n# press a key\n# keyboard shortcut\n# type text\n# hold key down\n# release key\n\n• Effects are seen via the NEXT screenshot; use print() for any text you need back (stdout\nis returned).\n• One command may bundle multiple steps (several pyautogui lines in the heredoc; &amp;&amp; /\npipes in shell).\n• Optional timeout (seconds) for a slow command; the sandbox cuts commands short after\napproximately 30 s, so split anything longer or run it in the background.\n# Control Actions\n• wait: wait for the screen to settle. Optional time (seconds).\n• terminate: finish the task. Requires status = success | failure.\n• answer: answer a question-type task. Requires text.\n# Function Call Format\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n&lt;tool_call&gt;\n&lt;function=example_function_name&gt;\n&lt;parameter=example_parameter_1&gt;\nvalue_1\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\n# Important\n&lt;IMPORTANT&gt;\n• Function calls MUST follow the specified format.\n• The action parameter MUST be one of: bash, wait, terminate, answer.\n• ALL GUI interactions MUST use action=bash with a pyautogui heredoc.\n• Coordinates are 0–999 (the screen is a 1000x1000 grid).\n• Heredoc delimiter MUST be quoted: &lt;&lt;’PY’ (not &lt;&lt;PY).\n• Observe effects via the NEXT screenshot; use print() for text output.\n• When finished, use action=terminate (not bash exit commands).\n• The current date is Thursday, September 24, 2026.\n• Collapsed screenshots appear as: This screenshot has been collapsed.\n&lt;/IMPORTANT&gt;\n# Response Format\nEvery step:\n\n31\n\n\fPreprint\n\n1) Action: one sentence describing your next move.\n2) A single &lt;tool call&gt;...&lt;/tool call&gt; block.\n# Output Format Examples\nGUI action (action=bash with pyautogui heredoc)\nAction: Click the “File” menu in the top menu bar.\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nbash\n&lt;/parameter&gt;\n&lt;parameter=command&gt;\npython3 &lt;&lt;’PY’\nimport pyautogui\npyautogui.click(50, 15)\nPY\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\nShell command (action=bash with shell)\nAction: List files in the Documents folder.\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nbash\n&lt;/parameter&gt;\n&lt;parameter=command&gt;\nls -la ~/Documents/\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\nWait (action=wait)\nAction: Wait for the application to finish loading.\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nwait\n&lt;/parameter&gt;\n&lt;parameter=time&gt;\n3\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\nFinish (action=terminate)\nAction: The task is complete.\n&lt;tool_call&gt;\n&lt;function=computer_use&gt;\n&lt;parameter=action&gt;\nterminate\n&lt;/parameter&gt;\n&lt;parameter=status&gt;\nsuccess\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\n32\n\n\fPreprint\n\nG.2\n\nACTION -S CHEMA A NALYSIS : S EPARATE GUI AND CLI T OOLS\n\nThe following system prompt belongs to the Separate GUI/CLI tools variant in Table 4 (Section 4.5). Unlike the unified OSWorld prompt above, it keeps the two interfaces in two distinct\ntools: computer use for GUI interaction and cli for terminal and file operations. HybridCUA\ninstead exposes both through the single bash action of Appendix G.1.\n\nSystem Prompt: Separate GUI/CLI Tools\n# Role\nYou are a multi-purpose intelligent assistant. Based on my requests, you can use tools to help\nme complete various tasks. The password of the computer is password.\n# Tools\nYou have access to the following functions:\n# GUI Tool: computer_use\nTool type:\nFunction name:\nParameters type:\nRequired parameters:\n\nfunction\ncomputer_use\nobject\n[\"action\"]\n\nUse a mouse and keyboard to interact with a computer, and take screenshots.\n• This is an interface to a desktop GUI. For terminal commands and file operations, use the\nseparate cli tool (it runs on the same machine); use this GUI for anything that must be seen\nor clicked on screen. You can also launch applications from the terminal via cli or by\nclicking desktop icons.\n• Some applications may take time to start or process actions, so you may need to wait and\ntake successive screenshots to see the results of your actions.\n• The screen’s resolution is 1000x1000.\n• Whenever you intend to move the cursor to click on an element like an icon, you should\nconsult a screenshot to determine the coordinates of the element before moving the cursor.\n• If you tried clicking on a program or link but it failed to load, even after waiting, try\nadjusting your cursor position so that the tip of the cursor visually falls on the element that\nyou want to click.\n• Make sure to click any buttons, links, icons, etc with the cursor tip in the center of the\nelement. Don’t click boxes on their edges unless asked.\n# GUI Actions\nThe action parameter is a required string with the following values:\n• key: Performs key down presses on the arguments passed in order, then performs key\nreleases in reverse order.\n• type: Type a string of text on the keyboard.\n• mouse move: Move the cursor to a specified (x, y) pixel coordinate on the screen.\n• left click: Click the left mouse button at a specified (x, y) pixel coordinate on the\nscreen. Optional text parameter can specify modifier keys (e.g., \"ctrl\", \"shift\",\n\"ctrl+shift\") that will be held during the click.\n• left click drag: Click and drag the cursor to a specified (x, y) coordinate.\n• right click: Click the right mouse button at a specified (x, y) pixel coordinate on the\nscreen. Optional text parameter can specify modifier keys that will be held during the click.\n• middle click: Click the middle mouse button at a specified (x, y) pixel coordinate on the\nscreen. Optional text parameter can specify modifier keys that will be held during the click.\n\n33\n\n\fPreprint\n\n• double click: Double-click the left mouse button at a specified (x, y) pixel coordinate on\nthe screen. Optional text parameter can specify modifier keys that will be held during the\nclick.\n• triple click: Triple-click the left mouse button at a specified (x, y) pixel coordinate on\nthe screen (simulated as double-click since it’s the closest action). Optional text parameter\ncan specify modifier keys that will be held during the click.\n• scroll: Performs a scroll of the mouse scroll wheel. Optional text parameter can specify\na modifier key (e.g., \"shift\", \"ctrl\") that will be held during scrolling.\n• hscroll: Performs a horizontal scroll (mapped to regular scroll). Optional text parameter\ncan specify a modifier key that will be held during scrolling.\n• wait: Wait specified seconds for the change to happen.\n• terminate: Terminate the current task and report its completion status.\n• answer: Answer a question.\n# GUI Tool Parameters\n• keys (array). Required only by action=key.\n• text (string). Required by action=type and action=answer. Optional for click actions\n(left click, right click, middle click, double click, triple click) to specify\nmodifier keys (e.g., ’ctrl’, ’shift’, ’ctrl+shift’). Optional for scroll actions\n(scroll, hscroll) to specify a modifier key (e.g., ’shift’, ’ctrl’) to hold during\nscrolling.\n• coordinate (array). (x, y) coordinates.\n• pixels (number). Scroll amount.\n• time (number). Seconds to wait.\n• status (string). Task status for terminate. One of success, failure.\n# Terminal Tool: cli\nTool type:\nFunction name:\nParameters type:\nRequired parameters:\nAction type:\nAction values:\n\nfunction\ncli\nobject\n[\"action\"]\nstring\n[\"bash\"]\n\nRun a shell command inside the machine (the same VM the GUI acts on). The only supported\naction is bash:\n• bash: run a shell command. Requires command; optional timeout (seconds).\nOutput (stdout/stderr) is returned and also reflected in the next screenshot.\n# CLI Tool Parameters\n• command (string). Required by action=bash: the shell command.\n• timeout (number). Optional for action=bash: timeout in seconds.\n# Function Call Format\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n&lt;tool_call&gt;\n&lt;function=example_function_name&gt;\n&lt;parameter=example_parameter_1&gt;\nvalue_1\n&lt;/parameter&gt;\n&lt;parameter=example_parameter_2&gt;\nThis is the value for the second parameter\nthat can span\n\n34\n\n\fPreprint\n\nmultiple lines\n&lt;/parameter&gt;\n&lt;/function&gt;\n&lt;/tool_call&gt;\n\n# Important\n&lt;IMPORTANT&gt;\nReminder:\n• Function calls MUST follow the specified format: an inner &lt;function=...&gt;&lt;/function&gt;\nblock must be nested within &lt;tool call&gt;&lt;/tool call&gt; XML tags.\n• Required parameters MUST be specified.\n• You may provide optional reasoning for your function call in natural language BEFORE the\nfunction call, but NOT after.\n• If there is no function call available, answer the question like normal with your current\nknowledge and do not tell the user about function calls.\n• The current date is Thursday, September 24, 2026.\n• Collapsed screenshots appear as text: This screenshot has been collapsed.\n&lt;/IMPORTANT&gt;\n# Response Format\nResponse format for every step:\n1) Action: a short imperative describing the next step — a GUI interaction (computer use)\nor a terminal/file operation (cli).\n2) A single &lt;tool call&gt;...&lt;/tool call&gt; block.\nRules:\n• Output exactly in the order: Action, &lt;tool call&gt;.\n• Be brief: one sentence for Action.\n• Do not output anything else outside those parts.\n• If finishing, use action=terminate in the tool call.\n\nG.3\n\nT RAJECTORY C ONSTRUCTION : D OMAIN CLI S KILLS\n\nThe following eight domain-specific CLI skills provide practical guidance for Qwen3.8-27B during\ntrajectory collection in CUA-Gym, and are reproduced here exactly as used. Their scope is limited to\nteacher sampling. They are not included in the student model’s supervised context, are not available\nduring RL rollouts, and appear in no evaluation prompt; the student therefore never observes a skill\nat training or test time.\n\nCLI Skill: GIMP\n# GIMP — CLI toolkit\nTwo paths: Pillow for plain raster edits (resize, crop, rotate, format convert, color tweaks) —\nsimplest and most reliable; GIMP batch Script-Fu when the task needs a GIMP-specific\nfeature (layers, .xcf, filters/plugins, GIMP-exact output).\n# Pillow — prefer this for ordinary image ops\npython3 &lt;&lt;’PY’\nfrom PIL import Image, ImageEnhance, ImageFilter, ImageOps\nim = Image.open(\"/home/user/photo.jpg\")\nprint(im.size, im.mode)\nim = im.resize((800, 600))\n# or im.thumbnail((800,600)) to keep ratio\n\n35\n\n\fPreprint\n\nim = im.rotate(90, expand=True)\nim = im.crop((left, top, right, bottom))\nim = ImageOps.grayscale(im)\nim = ImageEnhance.Brightness(im).enhance(1.2)\nim = im.filter(ImageFilter.GaussianBlur(2))\nim.convert(\"RGB\").save(\"/home/user/out.png\")\n# convert(\"RGB\") before saving jpg\nPY\n\n# GIMP batch (Script-Fu) — for .xcf / layers / GIMP filters\nThe file usually is NOT open (GIMP is heavy); if it is: pkill-fgimp;sleep3. Run GIMP\nheadless and quit at the end:\ngimp -i -b ’\n(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE\n\"/home/user/in.xcf\" \"in.xcf\")))\n(drawable (car (gimp-image-flatten image))))\n(gimp-image-scale image 800 600)\n(file-png-save RUN-NONINTERACTIVE image drawable\n\"/home/user/out.png\" \"out\" 0 9 1 1 1 1 1))\n’ -b ’(gimp-quit 0)’\n\nHandy Script-Fu calls: gimp-image-flatten, gimp-image-scale, gimp-image-crop,\ngimp-item-transform-rotate-simple, gimp-image-convert-grayscale,\ngimp-text-fontname (add text), file-jpeg-save / file-png-save / gimp-xcf-save.\n# Gotchas\n• Flatten (gimp-image-flatten) before exporting to a flat format like PNG/JPEG.\n• .xcf output must use gimp-xcf-save, not file-*-save.\n• Preserve the exact output size / format / path the instruction states.\n• gimp -i (no UI) + always end with -b’(gimp-quit0)’ or the process hangs.\n\nCLI Skill: LibreOffice Calc\n# LibreOffice Calc — CLI\nEdit on disk with openpyxl, re-read to verify, stop. Only the saved file carries the document\nstate, not an unsaved GUI buffer; .~lock is advisory (doesn’t block writes). Ensure lib:\npython3 -c \"import openpyxl\" 2&gt;/dev/null || pip install -q openpyxl\n\nDo NOT pkill/reopen soffice, Ctrl+S in the GUI, or click a “Document Recovery” dialog — it\ncan restore the pre-edit version and clobber your file.\nWrite LITERAL values, not formula strings (ws.cell(r,4).value=sales-cogs) —\nopenpyxl does not evaluate formulas, so \"=B2-C2\" is stored as a string with no cached value.\npython3 &lt;&lt;’PY’\nimport openpyxl\np=\"/home/user/data.xlsx\"; wb=openpyxl.load_workbook(p); ws=wb.active\nprint([ws.cell(1,c).value for c in range(1,ws.max_column+1)])\nfor r in range(2,ws.max_row+1):\nws.cell(r,4).value = ws.cell(r,2).value - ws.cell(r,3).value # literal\nwb.save(p)\nv=[openpyxl.load_workbook(p).active.cell(r,4).value\nfor r in range(2,ws.max_row+1)]\nassert all(isinstance(x,(int,float)) for x in v), v; print(\"OK\",v)\nPY\n\n• Charts: Reference(ws,min_col,min_row,max_col,max_row) +\nadd_data(titles_from_data=True) + set_categories(cats); not\n\n36\n\n\fPreprint\n\nchart type/Series.values=. openpyxl quotes the sheet name in series references →\nstrip it via series.val.numRef.f/strRef.f for a bare reference.\n• Pivot: when only the aggregated values are required, aggregate in Python to a static sheet\n(same-width header/data rows). A native pivotTable object cannot be built by openpyxl;\nuse UNO DataPilotTables.createDataPilotDescriptor. Lookup/threshold:\nbisect, not an exact dict.\n• Space in sheet name → quote: =’RetailPrice’.B2 (else Err:509). 0.00 not 0,00. Colors\nneed FF alpha (FFFF0000), exact hex. .ods→odfpy, .csv→pandas. Keep exact\nsheet/cell/OUTPUT path.\n# Recalc / Calc-only\nSimplest:\nsoffice --headless --convert-to xlsx --outdir DIR FILE\n\n(recomputes; never --convert-to pdf). Full engine via UNO: start\nsoffice --headless --accept=\"socket,host=localhost,port=2002;urp;\" &amp;\n\nconnect (UnoUrlResolver→ Desktop.loadComponentFromURL(...Hidden=True)),\ndoc.calculateAll();doc.store().\n\nCLI Skill: LibreOffice Impress\n# LibreOffice Impress — CLI\nEdit the .pptx on disk with python-pptx, re-read to verify, stop. Only the saved file carries the\ndocument state, not an unsaved GUI buffer; .~lock is advisory. Ensure lib:\npython3 -c \"import pptx\" 2&gt;/dev/null || pip install -q python-pptx\n\nDo NOT pkill/reopen soffice, Ctrl+S in the GUI, or click a “Document Recovery” dialog — it\ncan clobber your file. Prefer python-pptx over clicking objects. Set formatting at the run level\nand read it back (an object-level change may not reach run attributes).\npython3 &lt;&lt;’PY’\nfrom pptx import Presentation\nfrom pptx.dml.color import RGBColor\np=\"/home/user/deck.pptx\"; prs=Presentation(p); s=prs.slides[1]\ndef paint(tf):\nfor para in tf.paragraphs:\nfor r in para.runs:\nr.font.bold=True\nr.font.color.rgb=RGBColor(0xC9,0x21,0x1E)\nfor sh in s.shapes:\nif sh.has_text_frame: paint(sh.text_frame)\nif sh.has_table:\nfor row in sh.table.rows:\nfor c in row.cells: paint(c.text_frame)\n# don’t skip table cells\nprs.save(p)\ncols={r.font.color.rgb for sh in Presentation(p).slides[1].shapes\nif sh.has_text_frame for para in sh.text_frame.paragraphs\nfor r in para.runs}\nassert RGBColor(0xC9,0x21,0x1E) in cols, cols; print(\"OK\")\nPY\n\n• Notes: s.notes_slide.notes_text_frame.text=.... New slide:\nprs.slides.add_slide(layout). Picture:\ns.shapes.add_picture(img,left,top,width=Cm(8)); move via shape.top/left.\n• Exact hex named (Dark Red 2 = C9211E, not FF0000); watch autocorrect curly ’. .odp\n→convert. Keep OUTPUT path.\n\n37\n\n\fPreprint\n\n• font.name/size stay None unless set explicitly on the run; text=/add paragraph drops\nthe placeholder’s inherited pPr (bullet buChar, size). Background, strikethrough, and bullet\nchanges can fail without raising, so write them through the underlying &lt;a:p&gt; XML via lxml\nand read the result back.\n# Export / Impress-only\nsoffice --headless --convert-to pdf --outdir DIR FILE\n\nor UNO: start\nsoffice --headless --accept=\"socket,host=localhost,port=2002;urp;\" &amp;\n\nconnect, then\ndoc.storeToURL(\"file:///.../deck.pdf\", (\nPropertyValue(Name=\"FilterName\",Value=\"impress_pdf_Export\"),))\n\nCLI Skill: LibreOffice Writer\n# LibreOffice Writer — CLI\nEdit the .docx on disk with python-docx, re-read to verify, stop. Only the saved file carries the\ndocument state, not an unsaved GUI buffer; .~lock is advisory. Ensure lib:\npython3 -c \"import docx\" 2&gt;/dev/null || pip install -q python-docx\n\nDo NOT pkill/reopen soffice, Ctrl+S in the GUI, or click a “Document Recovery” dialog — it\ncan clobber your file with the pre-edit version.\nEdit at the run level (run.text/run.font), never par.text= (drops run formatting).\npython3 &lt;&lt;’PY’\nimport docx\np=\"/home/user/report.docx\"; d=docx.Document(p)\nfor par in d.paragraphs:\nfor r in par.runs:\nif \"OLD\" in r.text: r.text=r.text.replace(\"OLD\",\"NEW\")\nd.save(p)\nd2=docx.Document(p)\nassert not any(\"OLD\" in r.text for par in d2.paragraphs for r in par.runs)\nprint(\"OK\")\nPY\n\n• Run format: run.bold=True; run.font.size=Pt(14);\nrun.font.color.rgb=RGBColor(0xFF,0,0).\n• Tables: doc.tables→table.rows →cell.paragraphs→runs. .odt→odfpy. Keep\nexact OUTPUT path.\n• Export: soffice--headless--convert-topdf--outdirDIRFILE. If the exported text\ndrops soft-wrap trailing spaces, re-export via UNO with\nFilterData=[UseTaggedPDF=True].\n# Writer-only (update TOC/fields, mail merge)\nStart\nsoffice --headless --accept=\"socket,host=localhost,port=2002;urp;\" &amp;\n\nconnect (UnoUrlResolver→ Desktop.loadComponentFromURL(...Hidden=True)), e.g.\ndoc.getTextFields().refresh();doc.store().\n\n38\n\n\fPreprint\n\nCLI Skill: OS / Desktop\n# OS / desktop — CLI toolkit\nFilesystem, process, permission, package, and system-setting tasks are almost entirely shell\nwork — the GUI file manager and settings dialogs are slower and error-prone. Drive these\nfrom bash and verify by reading back state.\n# Files &amp; directories\nls -la /home/user\n# inspect permissions, sizes, hidden files\nfind /home/user -name ’*.log’ -mtime -1 # search by name/time\nmkdir -p /home/user/a/b/c\ncp -r src dst; mv old new; rm -rf junk\ndu -sh /home/user/*\n# sizes; df -h for disk\n\n# Content edits &amp; search\ngrep -rn \"TODO\" /home/user/proj\nsed -i ’s/old/new/g’ /home/user/file.txt # in-place edit\npython3 - &lt;&lt;’PY’\n# structured/json edits\nimport json, pathlib\np = pathlib.Path(\"/home/user/config.json\")\nd = json.loads(p.read_text()); d[\"key\"] = \"value\"\np.write_text(json.dumps(d, indent=2))\nPY\n\n# Permissions &amp; ownership\nchmod 644 file; chmod +x script.sh; chmod -R 755 dir\nsudo chown user:user file # password is the sudo password in the prompt\n\n# Processes, archives, packages\nps aux | grep -i firefox; pkill -f soffice.bin\ntar -czf out.tar.gz dir/; tar -xzf in.tar.gz -C dest/; unzip a.zip -d dest/\nsudo apt-get install -y &lt;pkg&gt; # proxy is exported for the bash channel\n\n# GNOME desktop settings (wallpaper, theme, etc.)\ngsettings set org.gnome.desktop.background picture-uri \\\n’file:///home/user/bg.png’\ngsettings get org.gnome.desktop.interface gtk-theme\n\n# Gotchas\n• sudo needs -S with the password piped, or an interactive tty; the prompt states the\npassword. Example: echo\"$PW\"|sudo-S&lt;cmd&gt;.\n• rm -rf is irreversible — double-check the path before running it.\n• Verify every change (ls -la, cat, stat, gsettings get) before terminating.\n\nCLI Skill: PDF\n# PDF — CLI toolkit\nPDF tasks (stamp text, merge/split, rotate, extract text/images, count pages, fill forms, redact)\nare almost always faster and more accurate via CLI than GUI. PDFs have no persistent editing\napp holding a lock, so no pkill dance is needed — just read the input path and write the exact\nOUTPUT path the instruction names.\n# Edit / annotate with PyMuPDF (fitz)\npython3 &lt;&lt;’PY’\nimport fitz\n\n39\n\n\fPreprint\n\ndoc = fitz.open(\"/home/user/in.pdf\")\nprint(\"pages:\", doc.page_count)\nfor page in doc:\nprint(page.get_text()[:200]) # extract text\n# (x,y) in points, origin top-left\npage.insert_text((72, 40), \"Filed: April 1, 2026\",\nfontsize=10, fontname=\"times\", color=(0, 0, 0))\ntw = fitz.get_text_length(\"Case No. 2026-CV-04521\",\nfontname=\"times\", fontsize=10)\npage.insert_text((page.rect.width - 72 - tw, 40),\n\"Case No. 2026-CV-04521\", fontsize=10,\nfontname=\"times\")\ndoc.save(\"/home/user/out.pdf\") # or doc.saveIncr() to edit in place\nPY\n\n# Common recipes with pypdf\npython3 &lt;&lt;’PY’\nfrom pypdf import PdfReader, PdfWriter\n# merge\nw = PdfWriter()\nfor f in [\"/home/user/a.pdf\", \"/home/user/b.pdf\"]:\nfor pg in PdfReader(f).pages: w.add_page(pg)\nwith open(\"/home/user/merged.pdf\", \"wb\") as fh: w.write(fh)\n# split / rotate / extract a page range\nr = PdfReader(\"/home/user/in.pdf\")\nw2 = PdfWriter()\nfor pg in r.pages[0:3]:\npg.rotate(90)\nw2.add_page(pg)\nwith open(\"/home/user/first3_rotated.pdf\", \"wb\") as fh: w2.write(fh)\nPY\n\n# Other tools\n• page.insert_image(rect,filename=...) (fitz) to stamp a logo/image.\n• pdfplumber for table extraction; pikepdf for encryption/metadata/repair.\n• Make a PDF from a doc:\nlibreoffice--headless--convert-topdf--outdir/home/userX.docx.\n• Rasterize a page to check visually:\npage.get_pixmap(dpi=150).save(\"/tmp/p0.png\").\n# Gotchas\n• fitz coordinates are POINTS from the TOP-LEFT; y grows downward.\n• Use exactly the font name/size the instruction specifies; insert text needs the y baseline,\nnot the top of the glyph.\n• Write to the precise OUTPUT path the instruction names, not back to the input path.\n\nCLI Skill: VLC / Media\n# VLC / media — CLI toolkit\nMedia tasks split cleanly: inspect/convert/trim/extract → ffmpeg/ffprobe; edit\ntags/metadata → mutagen; playback / playlist / snapshot actions that must happen inside\nVLC → the cvlc command line or GUI. Only touch the VLC GUI when the task is about\nVLC’s own state (now-playing, playlist order, a setting).\n# Inspect with ffprobe\nffprobe -v error -show_format -show_streams /home/user/clip.mp4\nffprobe -v error -show_entries format=duration -of csv=p=0 \\\n/home/user/clip.mp4\n\n40\n\n# full info\n\n\fPreprint\n\n# Convert / trim / extract with ffmpeg\nffmpeg -y -i in.mp4 -c:v libx264 -c:a aac out.mkv\n# transcode\nffmpeg -y -ss 00:00:10 -to 00:00:25 -i in.mp4 \\\n-c copy clip.mp4\n# trim (fast copy)\nffmpeg -y -i in.mp4 -vn -acodec libmp3lame audio.mp3\n# extract audio\nffmpeg -y -i in.mp4 -ss 5 -vframes 1 frame.png\n# snapshot a frame\nffmpeg -y -i in.mp4 -vf scale=1280:720 out720.mp4\n# resize\n\n# Read / write tags with mutagen\npython3 &lt;&lt;’PY’\nfrom mutagen.easyid3 import EasyID3\nfrom mutagen import File\nprint(File(\"/home/user/song.mp3\").info.length) # duration in seconds\na = EasyID3(\"/home/user/song.mp3\")\na[\"title\"] = \"New Title\"; a[\"artist\"] = \"Artist\"; a.save()\nPY\n\n# VLC command line (only when VLC itself must act)\ncvlc --play-and-exit /home/user/clip.mp4 # headless play\ncvlc video.mp4 --video-filter=scene --scene-path=/tmp \\\n--vout=dummy vlc://quit\n# snapshots\n\nVLC config/state lives at ~/.config/vlc/vlcrc; recent-media in the same dir.\n# Gotchas\n• -c copy only works when not re-encoding; drop it if you change codec/resolution.\n• Always pass -y in batch so ffmpeg overwrites without prompting.\n• Match the requested container/codec/bitrate and the exact output path.\n\nCLI Skill: VS Code\n# VS Code — CLI toolkit\nMost VS Code tasks are really file/code tasks: create or edit source files, run them, change\nsettings, or manage extensions. Do the file work directly in the shell/python — it is exact and\nfast — and use the code CLI for editor-level state.\n# Edit files directly (don’t hunt through the editor UI)\ncat &gt; /home/user/proj/app.py &lt;&lt;’PY’\ndef add(a, b):\nreturn a + b\nprint(add(2, 3))\nPY\npython3 /home/user/proj/app.py # run and check output\n\nFor surgical edits use python (read, replace, write) rather than retyping in the editor.\n# Settings, keybindings, snippets (JSON on disk)\n~/.config/Code/User/settings.json # e.g. {\"editor.tabSize\": 2}\n~/.config/Code/User/keybindings.json\n~/.config/Code/User/snippets/*.code-snippets\n# workspace settings:\n&lt;project&gt;/.vscode/settings.json\n\nEdit these JSON files with python (json.load → mutate → json.dump) to guarantee valid\nJSON.\n\n41\n\n\fPreprint\n\n# The code CLI\ncode --list-extensions\n# what’s installed\ncode --install-extension ms-python.python\ncode --uninstall-extension &lt;id&gt;\ncode -r /home/user/proj/app.py # open a file in the running window\n\nThe on-disk file is the persistent state — edit on disk and stop; don’t reopen/reload the editor\njust to make it visible (no GUI save needed).\n# Gotchas\n• Extension installs need network; the VM egress proxy is already exported for bash.\n• Keep JSON valid — a trailing comma breaks settings.json silently.\n• Confirm the exact file path/name the task expects (case-sensitive).\n\n42\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"