Skip to content

fix(tui): report x64 emulation on Windows ARM64 - #54984

Merged
Hona merged 2 commits into
anomalyco:devfrom
Hona:report-arm64-emulation
Oct 13, 2026
Merged

Hona merged 2 commits into
anomalyco:devfrom
Hona:report-arm64-emulation

Conversation

@Hona

@Hona Hona commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Diagnostics on Windows ARM64 could not tell a native build from an x64 build running under Prism emulation. Under emulation, process.arch and PROCESSOR_ARCHITECTURE both report x64. Emulated x64 builds are the most common crash cause in Windows ARM64 reports (#4340, #5556, #10302, #40482, #41099), and those reports read as plain x64.

PROCESSOR_IDENTIFIER is not rewritten for emulated processes, so it still names the host CPU (ARMv8 (64-bit) Family 8 …).

const emulated =
  process.platform === "win32" && process.arch === "x64" && process.env.PROCESSOR_IDENTIFIER?.startsWith("ARM")
return `${name} ${release()} (${process.arch}${emulated ? ", emulated on ARM64" : ""})`
Where Before After (x64 build on Snapdragon)
TUI crash report link and debug dialog (describeOS) Windows 10.0.26200 (x64) Windows 10.0.26200 (x64, emulated on ARM64)
Report skill's runtime snapshot Windows_NT 10.0.26200 (win32 x64) Windows_NT 10.0.26200 (win32 x64, emulated on ARM64)

Native ARM64 and x64 machines are unchanged. The desktop app's sidecar runs under the same emulation as the app, so its report skill now shows emulation too.

Under Prism, process.arch is x64, so crash reports, the debug dialog and the report skill made ARM64 failures look like x64 ones. PROCESSOR_IDENTIFIER still names the ARM host.
Copilot AI balanced review requested due to automatic review settings October 13, 2026 00:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks sound. I couldn't run it on Windows ARM64, so I checked describeArch() by faking the platform, arch and PROCESSOR_IDENTIFIER. An emulated x64 build reports x64, emulated on ARM64. Native arm64, x64 on Intel, a missing PROCESSOR_IDENTIFIER, and non-Windows platforms all return process.arch as before. Type checks pass for util, tui and core, and the core report skill test passes.

Public API is unchanged: the change adds an internal @opencode/util/arch module and only changes diagnostic text.

No concerns.

@Hona
Hona enabled auto-merge (squash) October 13, 2026 00:52
@Hona
Hona merged commit bd23808 into anomalyco:dev Oct 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants