Workflow · 2026-09-16

Migrating the GitHub Copilot runtime to Rust, using Copilot

GitHub rewrote the Copilot agent runtime from TypeScript into more than 800,000 lines of production Rust, mostly written by agents across 128 incremental pull requests.

GitHub Blog AI2026-09-16About 3 min readWorth tracking

Marked important, but published more than 30 days ago, so it moved down to this band.

Product strategyCoding agents
On this page12 sections

The editors' notes below — why it matters, the context, the learning path — are written in Chinese.

Record

The signal

#

The GitHub Copilot CLI , GitHub Copilot app , and GitHub Copilot SDK are all backed by the Copilot agent runtime, an agentic harness that can be embedded into applications and services. It was originally written in TypeScript on Node.js and the V8 JavaScript engine for what is now the GitHub Copilot cloud agent (CCA), and the runtime stayed on that stack as the runtime and its capabilities grew rapidly. That has now changed. Using the GitHub Copilot app and the Copilot CLI, we completely rewrote the runtime into more than 800,000 lines of production Rust. AI agents wrote most of the code, spanning 128 pull requests that landed in main and shipped incrementally rather than waiting for a single cutover at the end. The few inevitable regressions were discovered and fixed quickly along the way, while the performance of the runtime improved by orders of magnitude. A project that would have taken a whole team of developers a year or two before agents was now completed primarily by a single developer, in only a few months, all while the rest of the team continued to greatly expand the runtime’s capabilities and reach. Why we needed to port The Copilot agent runtime isn’t just the engine behind the Copilot CLI. It backs a growing set of Microsoft, GitHub, and ecosystem solutions, for each of which AI support is, architecturally, a shell around the same runtime plus whatever customizations that solution needs. This includes not only the GitHub Copilot CLI and the GitHub Copilot app, but also the latest releases of VS Code, Visual Studio, CCA, Copilot Code Review (…

Why now

Why it matters

#

一次过去负担不起的重写,被一名开发者带着智能体在几个月内做完,而且没有停下正常开发。更可迁移的是它失败时的样子:几乎所有回归都来自端到端测试不够,于是结论是把判卷标准保护起来——实现者不能同时改测试、改快照、放宽基线。这和本轮另外两条信号是同一个问题的工程答案:被检查的一方不能同时掌握检查。

Background

Technical context

#

旧架构里 SDK 叠在命令行之上,每个客户端都要拉起一个带 Node 与 V8 的子进程并通过 JSON-RPC 跨进程调用,每个客户端至少约 100 MB 工作集。迁移采用由叶到根的顺序,每个 PR 用薄垫片把旧实现替换为调用 Rust 并原子删除旧代码,所有既有端到端测试在每一步都针对新代码运行。会话记录中阅读与搜索类工具调用约为编辑类的 10 倍。

At your level

Have AI explain this signal at your level

Pick your level of experience and AI writes an explanation for it on the spot.

Audience

Who should care

#
计划让智能体参与大规模迁移或重写的工程负责人维护测试基础设施、需要决定谁能改测试与快照的团队在做智能体运行时或 SDK、关心启动与内存开销的平台工程师
Areas it may affect
大规模迁移测试与验收智能体工作方式

Next

Learning path

#
  1. 先记住「保护判卷标准」那一条:实现者不能同时改测试、改快照、放宽基线
  2. 读《完成判定与验收信号》:端到端测试在这里就是唯一可信的完成判定
  3. 对照你自己的仓库:谁能在同一个 PR 里既改实现又改测试?
  4. 与 Rootly 废掉小 PR 规则一条并读:两者都在回答智能体产出变大之后审查该看什么

Getting started

Have AI draft a learning path

From the related knowledge and skills on this page, AI drafts a path from the basics to applying it.

Network

Where it sits in the network

#

How this signal connects to neighbouring technologies, skills and background knowledge. Follow any link to keep exploring.

Comparison

Compare with another technology

Pick another published technology and AI writes a comparison of what they share, how they differ and when to use each.

Further thought

Follow-up questions

#
  • 在你的代码库里,改实现的一方能不能在同一个提交里改测试或快照?
  • 如果让智能体做一次大迁移,你现在的端到端测试够不够当判卷标准?
  • Rust 版本上线后的回归率与 TypeScript 时期相比如何,GitHub 会不会公布?

Publication record

Featured in

#

The briefings that carried this signal, newest first; the last row is the weekly review of its week. The tag is the section it ran in.

  1. 技术简报 - 2026-09-19

    Immediate attention

Sources

GitHub Blog AI

GitHubBig tech2026-09-16
Open original sourcehttps://github.blog/ai-and-ml/generative-ai/migrating-the-github-copilot-runtime-to-rust-using-copilot/