fix(desktop): stabilize Windows remote access setup - #4778
Merged
Conversation
M4n5ter
marked this pull request as ready for review
September 4, 2026 11:37
M4n5ter
force-pushed
the
diagnose/windows-local-remote-access-ebusy
branch
from
September 4, 2026 12:46
9aaaef1 to
af1b6ad
Compare
jackwener
approved these changes
Sep 4, 2026
jackwener
left a comment
Member
There was a problem hiding this comment.
Approved at exact head af1b6ad5f15e5292ae8892bf31a704fccf8e69ee at the explicit direction of M4n5ter. No technical review was performed as part of this action; M4n5ter requested the approval and accepts responsibility for subsequent handling.
Review notice: This approval was submitted by an automated review agent operated by jackwener and is published at the direction of M4n5ter, who requested this action and is the human accountable for it.
M4n5ter
force-pushed
the
diagnose/windows-local-remote-access-ebusy
branch
from
September 4, 2026 13:05
af1b6ad to
461cc99
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
English
Summary
Stabilize Windows Local Runtime Host remote-access setup at the failure boundaries reproduced on a real Windows checkout:
<Command>below Task Scheduler's path limit while retaining exact-package verification and automatic convergence for existing deployments;Scheduled tasks still execute the native launcher directly. No visible
cmd.exe/PowerShell trampoline or shell-quoting authority is introduced.Root cause
The reported
EBUSYwas secondary: a detached cleanup helper inherited the setup scratch directory as its current working directory, while the Desktop'sfinallycleanup replaced the setup operator's framed result with the directory-removal error. Once that masking was removed, the lifecycle failure was0x80041318: the versioned launcher path was 301 characters and Task Scheduler rejected it in<Command>. A mutable projected singleton would then fail during a later package change because Windows locks the running executable; content-addressed projection removes that overwrite boundary.Verification
npx biome checkon all changed filessetupPendingstate completed asmanaged; Remote access enabled and connection-code creation succeededEBUSY; the managed Host remained running after Desktop exitedAI use
Tool(s) and scope: OpenAI Codex diagnosed the Windows failure chain, implemented the bounded fix, reviewed it, and performed Linux and native Windows verification.
Checklist
Does this PR entail a change in behavior?
中文
摘要
修复在真实 Windows checkout 中复现的本机 Runtime Host 远程访问安装故障边界:
<Command>路径长度限制,同时保留 exact-package 校验并让既有部署自动收敛;计划任务仍直接执行原生 launcher,不引入可见的
cmd.exe/PowerShell 中转窗口或 shell quoting authority。根因
日志中的
EBUSY是次生错误:延迟清理 helper 继承了 setup 临时目录作为 cwd,Desktop 的finally清理又用目录删除错误覆盖了 operator 的 framed 结果。去掉错误覆盖后,真正的 lifecycle 故障是0x80041318:版本目录内的 launcher 路径长达 301 个字符,Task Scheduler 在<Command>处拒绝该路径。若投影目标仍是可变单例,后续换包又会因 Windows 锁定正在运行的 executable 而失败;内容寻址投影从机制上删除了这个覆写边界。验证
npx biome checksetupPending状态真实恢复为managed;远程访问成功开启并生成连接码EBUSY;Desktop 退出后 managed Host 仍保持运行AI 使用
工具与范围:OpenAI Codex 排查 Windows 故障链、实现并审查修复,并完成 Linux 与原生 Windows 验证。
检查清单
此 PR 是否改变行为?