From bd23808adfdbd7f0fe693b8f0d3afd59ee214e81 Mon Sep 17 00:00:00 2001 From: Luke Parker <10430890+Hona@users.noreply.github.com> Date: Tue, 13 Oct 2026 11:01:49 +1000 Subject: [PATCH] fix(tui): report x64 emulation on Windows ARM64 (#54984) --- packages/core/src/plugin/skill.ts | 5 ++++- packages/tui/src/util/system.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/core/src/plugin/skill.ts b/packages/core/src/plugin/skill.ts index 19422427227..dc2f72cc05e 100644 --- a/packages/core/src/plugin/skill.ts +++ b/packages/core/src/plugin/skill.ts @@ -51,6 +51,9 @@ const reportContentWithDiagnostics = Effect.fn("SkillPlugin.reportContentWithDia app: Context["app"], ) { const plugins = yield* configuredPlugins() + // Under emulation on Windows ARM64, os.arch() reads x64 but PROCESSOR_IDENTIFIER still names the ARM host. + const emulated = + process.platform === "win32" && os.arch() === "x64" && process.env.PROCESSOR_IDENTIFIER?.startsWith("ARM") return [ ReportContent, "", @@ -60,7 +63,7 @@ const reportContentWithDiagnostics = Effect.fn("SkillPlugin.reportContentWithDia "", `- opencode version: ${app.version}`, `- install/channel: ${app.channel}`, - `- OS: ${os.type()} ${os.release()} (${os.platform()} ${os.arch()})`, + `- OS: ${os.type()} ${os.release()} (${os.platform()} ${os.arch()}${emulated ? ", emulated on ARM64" : ""})`, `- Terminal: ${terminal()}`, `- Shell: ${shell()}`, `- Active plugins: ${plugins.length === 0 ? "None found in config" : plugins.join(", ")}`, diff --git a/packages/tui/src/util/system.ts b/packages/tui/src/util/system.ts index f55848bfc12..33e15c2fbbb 100644 --- a/packages/tui/src/util/system.ts +++ b/packages/tui/src/util/system.ts @@ -9,7 +9,10 @@ export function describeOS() { : process.platform === "linux" ? "Linux" : process.platform - return `${name} ${release()} (${process.arch})` + // Under emulation on Windows ARM64, process.arch reads x64 but PROCESSOR_IDENTIFIER still names the ARM host. + const emulated = + process.platform === "win32" && process.arch === "x64" && process.env.PROCESSOR_IDENTIFIER?.startsWith("ARM") + return `${name} ${release()} (${process.arch}${emulated ? ", emulated on ARM64" : ""})` } export function describeTerminal() {