Windows 11 is collecting data on which coding agents and developer tools you use
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
I recently asked AI to help me look through the latest Windows binaries for undocumented features and functionality. Among the leads it turned up, one list immediately caught my attention: coding agents such as codex.exe, claude.exe, copilot.exe, and cursor.exe, alongside familiar developer tools such as python.exe, dotnet.exe, gcc.exe, and code.exe.
最近我请求人工智能协助我检查最新的 Windows 二进制文件,以寻找未记录的功能和特性。在它发现的线索中,有一份列表立刻引起了我的注意:其中包括 codex.exe、claude.exe、copilot.exe 和 cursor.exe 等编码代理,以及 python.exe、dotnet.exe、gcc.exe 和 code.exe 等常见的开发工具。
Why would a Windows system DLL need a list of coding agents and developer tools?
为什么一个 Windows 系统 DLL 文件需要一份编码代理和开发工具的列表?
The names were in MissionControlAggregator.dll. I asked the agent to follow the references and dig into what the DLL actually does. That led from a handful of string comparisons to a running Windows component that records which coding agents and developer tools have been used, saves that information locally, and reports it to Windows Diagnostics. And unless you have opted out of the “optional” diagnostic data (which is enabled by default), the data is uploaded to Microsoft.
这些名称位于 MissionControlAggregator.dll 中。我让该代理追踪这些引用,并深入挖掘该 DLL 的实际功能。这从少数几个字符串比较引向了一个正在运行的 Windows 组件,该组件会记录哪些编码代理和开发工具被使用过,将这些信息保存在本地,并将其报告给 Windows 诊断程序。除非你选择退出“可选”诊断数据(该选项默认开启),否则这些数据会被上传给微软。
I shared the initial finding on X. This post includes more details about the investigation behind it.
我在 X 上分享了初步发现。这篇文章包含了其背后调查的更多细节。
Opening the DLL in Binary Ninja made the first lead easy to see. These were explicit executable names embedded in a Windows component:
在 Binary Ninja 中打开该 DLL,第一个线索便一目了然。这些是嵌入在 Windows 组件中的明确可执行文件名:
Following the references showed that the names were used in comparisons. There are four CLI-agent slots checking copilot.exe, claude.exe, codex.exe, and agy.exe, with extensionless equivalents on the WSL route. Five desktop-agent slots check github.exe, claude.exe, codex.exe, cursor.exe, and antigravity.exe.
追踪这些引用显示,这些名称被用于比较操作。其中有四个 CLI 代理槽位用于检查 copilot.exe、claude.exe、codex.exe 和 agy.exe,在 WSL 路径下还有对应的无后缀版本。五个桌面代理槽位则检查 github.exe、claude.exe、codex.exe、cursor.exe 和 antigravity.exe。
Here is one of the comparisons against codex.exe:
以下是针对 codex.exe 的其中一项比较:
The compiler-generated C++ names are unwieldy, so I will call these functions executable-name matchers. For reference, one related matcher is std::_Func_impl_no_alloc<<lambda_340dfe7e962ab225b6ac33bc664bd54f>, bool, std::basic_string_view<wchar_t, std::char_traits<wchar_t>> const&, Microsoft::Diagnostics::MissionControlAggregator::Utils::AppType>::_Do_call. The screenshot shows another lambda instantiation performing the same kind of name comparison.
编译器生成的 C++ 名称非常冗长,所以我将这些函数称为“可执行文件名匹配器”。作为参考,其中一个相关的匹配器是 std::_Func_impl_no_alloc<<lambda_340dfe7e962ab225b6ac33bc664bd54f>, bool, std::basic_string_view<wchar_t, std::char_traits<wchar_t>> const&, Microsoft::Diagnostics::MissionControlAggregator::Utils::AppType>::_Do_call。截图显示了另一个执行相同名称比较的 lambda 实例化。
The feature guarding the new agent checks has a particularly direct name: CLICodingAgentUsage, feature ID 62580080.
保护这些新代理检查的功能名称非常直观:CLICodingAgentUsage,功能 ID 为 62580080。
And the list extends beyond AI agents. The same component checks for node.exe, python.exe, dotnet.exe, gcc.exe, clang.exe, gdb.exe, javac.exe, devenv.exe, and code.exe, among others. Those checks feed broader developer-tool categories. Some of these checks also verify the publisher: the Node.js slot expects Node.js Foundation, Python expects Python Software Foundation, and the .NET and Visual Studio slots expect Microsoft Corporation. The compiler/debugger group containing GCC and Clang has no additional publisher check in this path.
该列表不仅限于人工智能代理。同一个组件还会检查 node.exe、python.exe、dotnet.exe、gcc.exe、clang.exe、gdb.exe、javac.exe、devenv.exe 和 code.exe 等程序。这些检查涵盖了更广泛的开发工具类别。其中一些检查还会验证发布者:Node.js 槽位期望是 Node.js Foundation,Python 期望是 Python Software Foundation,而 .NET 和 Visual Studio 槽位则期望是 Microsoft Corporation。包含 GCC 和 Clang 的编译器/调试器组在此路径中没有额外的发布者检查。
The next question was whether the component scans running processes itself. Following Aggregator::OnLoad revealed that it subscribes to existing Windows events instead.
接下来的问题是该组件是否会自行扫描正在运行的进程。追踪 Aggregator::OnLoad 后发现,它实际上是订阅了现有的 Windows 事件。
For Windows programs, it consumes KernelProcess.AppStateChangeSummary and Win32kTraceLogging.AppInteractivitySummary. These provide application identities that its handlers parse and pass to the matchers. For WSL, it consumes Microsoft.Windows.Lxss.Manager.Exec and ExecCritical, using the imageName field. A regular Windows codex.exe can therefore reach the CLI-agent checks through the app-state summary route; this is not limited to Linux programs running inside WSL.
对于 Windows 程序,它消耗 KernelProcess.AppStateChangeSummary 和 Win32kTraceLogging.AppInteractivitySummary。这些事件提供了应用程序标识,其处理程序会解析这些标识并将其传递给匹配器。对于 WSL,它消耗 Microsoft.Windows.Lxss.Manager.Exec 和 ExecCritical,并使用 imageName 字段。因此,常规的 Windows 版 codex.exe 可以通过应用程序状态摘要路径触发 CLI 代理检查;这并不局限于在 WSL 内运行的 Linux 程序。
The relevant flow looks like this:
相关的流程如下所示:
A successful match sets a slot in the aggregator’s state. Later, ReportCohorts<12,4,5> turns those slots into bitsets and emits a report named Segments.SubCohorts. The numbers correspond to twelve broader tool categories, four CLI agents, and five desktop agents.
匹配成功后,会在聚合器的状态中设置一个槽位。随后,ReportCohorts<12,4,5> 会将这些槽位转换为位集,并发出一个名为 Segments.SubCohorts 的报告。这些数字分别对应十二个更广泛的工具类别、四个 CLI 代理和五个桌面代理。
ETW (Event Tracing for Windows) is the mechanism carrying that report. In this case, it is a self-describing TraceLogging event. Rather than writing the executable names into every report, the component assigns each category a bit. A set Codex bit means the matching tool was observed during the reporting window.
ETW(Windows 事件追踪)是承载该报告的机制。在这种情况下,它是一个自描述的 TraceLogging 事件。组件没有将可执行文件名写入每份报告,而是为每个类别分配了一个位。如果 Codex 位被置位,则意味着在报告窗口期间观察到了匹配的工具。
The source events also include runtime, time in focus, interaction counters, and resource usage. This component appears to discard those details and record only a bitmap of which agents were observed. The report’s timestamps describe the collection window, not how long each agent was used.
源事件还包括运行时间、焦点时间、交互计数器和资源使用情况。该组件似乎丢弃了这些细节,仅记录了观察到哪些代理的位图。报告的时间戳描述的是收集窗口,而不是每个代理被使用了多长时间。
Although I found no prompt text or source code in this report, collecting which agents and developer tools someone uses already has significant privacy implications.
尽管我在这份报告中没有发现任何提示词文本或源代码,但收集用户使用了哪些代理和开发工具本身就已经具有重大的隐私影响。
Strings and code are a useful lead, but I wanted to see the component running. I checked my Parallels Windows 11 ARM64 VM, build 26200.9974. Its MissionControlAggregator.dll was version 10.0.26100.9818, and CLICodingAgentUsage was already enabled as a service experiment. I had not manually enabled the feature.
字符串和代码是有用的线索,但我希望看到该组件实际运行。我检查了我的 Parallels Windows 11 ARM64 虚拟机(版本 26200.9974)。其 MissionControlAggregator.dll 的版本为 10.0.26100.9818,且 CLICodingAgentUsage 已作为服务实验启用。我并没有手动开启该功能。
DiagTrack, the Connected User Experiences and Telemetry service, was also already running with its startup type set to Automatic. It starts a separate AggregatorHost.exe process, and that process loads the DLL. The following administrative PowerShell commands show the service, its child process, and the loaded module:
DiagTrack(连接的用户体验和遥测服务)也已经在运行,其启动类型设置为自动。它会启动一个独立的 AggregatorHost.exe 进程,该进程会加载上述 DLL。以下管理 PowerShell 命令显示了该服务、其子进程以及加载的模块:
The process IDs connect the pieces: DiagTrack runs in process 10148, which is the parent of AggregatorHost.exe, process 1500; the module listing places MissionControlAggregator.dll inside that child.
进程 ID 将这些部分连接了起来:DiagTrack 在进程 10148 中运行,它是 AggregatorHost.exe(进程 1500)的父进程;模块列表显示 MissionControlAggregator.dll 位于该子进程中。
To test the finding in practice, I copied cmd.exe to a file named codex.exe and ran it in the interactive Windows session. The name alone was enough for the component to recognize it as Codex.
为了在实践中测试这一发现,我将 cmd.exe 复制并重命名为 codex.exe,并在交互式 Windows 会话中运行它。仅凭这个名称,该组件就足以将其识别为 Codex。
I captured an AppStateChangeSummary for the running process from the KernelProcess provider ({2839ff94-8f12-4e1b-82e3-af7af77a450f}), with LaunchCount=1 and TerminateCount=0. The aggregator’s saved state contained the value 2 in CLI slot 2, the Codex slot. A separate run without an additional ETW trace also set that slot, confirming that detection worked through Windows’ existing diagnostic collection.
我从 KernelProcess 提供程序 ({2839ff94-8f12-4e1b-82e3-af7af77a450f}) 中捕获了该运行进程的 AppStateChangeSummary,其中 LaunchCount=1 且 TerminateCount=0。聚合器保存的状态在 CLI 槽位 2(即 Codex 槽位)中包含了值 2。在没有额外 ETW 追踪的情况下进行的另一次运行也设置了该槽位,证实了检测是通过 Windows 现有的诊断收集机制完成的。
That state is persisted in:
该状态持久化存储在:
The report normally follows a roughly daily boundary. To capture it immediately, I temporarily moved the saved reporting-window start 25 hours into the past and restarted DiagTrack with a
报告通常遵循大约每日一次的周期。为了立即捕获它,我暂时将保存的报告窗口开始时间向前移动了 25 小时,并重启了 DiagTrack,同时使用了…