Skip to content

[Bug] Illegal instruction crash on Windows due to missing AVX2 CPU support (baseline binary also fails) #31155

Closed as not planned

Description

@CodeByPartho

Description

Describe the bug:
When running opencode on a Windows machine with an older CPU that does not support AVX2 instructions, the application crashes immediately with an "Illegal instruction" error. This happens even when the installer or binary detection attempts to use the "baseline" build intended for older CPUs. The baseline Windows binary appears to still contain AVX2 instructions or fails to initialize properly, causing the same crash.

Expected behavior:
OpenCode should run correctly on Windows using a truly compatible baseline binary that does not require AVX2 instructions. Alternatively, it should provide a clear error message explaining the CPU requirement upfront, or gracefully fall back to a pure software mode.

Error logs:
Bun v1.3.6 Windows x64 (baseline)
Features: no_avx2 no_avx
CPU lacks AVX support. Please consider upgrading to a newer CPU.
panic(main thread): Illegal instruction at address 0x7FF7752F90E9
H.loadWebAssemblyModule error: ... (additional errors follow)

Environment:

  • OS: Windows 10
  • CPU: Intel Core i5-5xxx (Broadwell) / any CPU without AVX2
  • OpenCode version: latest (tried with @latest, also attempted downgrading to 1.10.0, 1.14.0, 1.14.51 – none worked)
  • Installation method: npm install -g opencode-ai

Additional context:
This issue appears related to the binary selection logic on Windows documented in GitHub issues #8744 and #8611. The community workaround using OPENCODE_BIN_PATH environment variable is mentioned but not reliable for all systems and versions. The "baseline" Windows build does not currently provide a fully functional binary without AVX2 dependencies. Many users with older CPUs are blocked from using opencode as a result.

Steps already tried:

  • Uninstalling and reinstalling via npm
  • Downgrading to multiple older versions (1.10.0, 1.14.0, 1.14.51)
  • Cleaning configuration folders (%USERPROFILE%.config\opencode, %LOCALAPPDATA%\opencode)
  • Running as Administrator
  • Using WSL (works as a workaround, but native Windows support is requested)

Request:
Please provide a properly compiled Windows baseline binary that does not require AVX2 instructions, or update the detection logic to ensure a truly compatible binary is selected for older CPUs.


OpenCode version:
latest (also tried 1.14.51, 1.10.0, 1.14.0 – none worked)

Operating System:
Windows 10 (64bit)

Terminal:
PowerShell 7 / Windows Terminal (also happens in Command Prompt)

Steps to reproduce:

  1. Use a Windows PC with an older CPU that lacks AVX2 (e.g., Intel 5th Gen Broadwell, or any pre-Haswell CPU).
  2. Install globally: npm install -g opencode-ai@latest
  3. Run any command, e.g., opencode --version
  4. Observe immediate crash with Illegal instruction and CPU lacks AVX support errors.

Regarding duplicates:
I see #12553 and #13282 – they describe the same root cause (AVX2 missing on older CPUs). However, this issue adds evidence that the baseline Windows binary still doesn't work even when the installer attempts to select it. The existing issues focus on the installer detection; this one confirms the baseline binary itself is incompatible. Please consider re-opening or merging with those, but the underlying fix (a truly working baseline build) is not yet delivered.

Plugins

Skip to content anomalyco opencode Repository navigation Code Issues 5k+ (5k+) Pull requests 993 (993) Agents Actions Projects Security and quality 2 (2) Insights View CodeByPartho's profile Create new issue Bug report · Choose a different template Add a title * [Bug] Illegal instruction crash on Windows due to missing AVX2 CPU support (baseline binary also fails) Description * Describe the bug you encountered Markdown Editor Markdown input: edit mode selected. Write Preview Describe the bug: When running opencode on a Windows machine with an older CPU that does not support AVX2 instructions, the application crashes immediately with an "Illegal instruction" error. This happens even when the installer or binary detection attempts to use the "baseline" build intended for older CPUs. The baseline Windows binary appears to still contain AVX2 instructions or fails to initialize properly, causing the same crash. Expected behavior: OpenCode should run correctly on Windows using a truly compatible baseline binary that does not require AVX2 instructions. Alternatively, it should provide a clear error message explaining the CPU requirement upfront, or gracefully fall back to a pure software mode. Error logs: Bun v1.3.6 Windows x64 (baseline) Features: no_avx2 no_avx CPU lacks AVX support. Please consider upgrading to a newer CPU. panic(main thread): Illegal instruction at address 0x7FF7752F90E9 H.loadWebAssemblyModule error: ... (additional errors follow) Environment: - OS: Windows 10 / Windows 11 - CPU: Intel Core i5-5xxx (Broadwell) / any CPU without AVX2 - OpenCode version: latest (tried with @latest, also attempted downgrading to 1.10.0, 1.14.0, 1.14.51 – none worked) - Installation method: npm install -g opencode-ai Additional context: This issue appears related to the binary selection logic on Windows documented in GitHub issues #8744 and #8611. The community workaround using OPENCODE_BIN_PATH environment variable is mentioned but not reliable for all systems and versions. The "baseline" Windows build does not currently provide a fully functional binary without AVX2 dependencies. Many users with older CPUs are blocked from using opencode as a result. Steps already tried: - Uninstalling and reinstalling via npm - Downgrading to multiple older versions (1.10.0, 1.14.0, 1.14.51) - Cleaning configuration folders (%USERPROFILE%.config\opencode, %LOCALAPPDATA%\opencode) - Running as Administrator - Using WSL (works as a workaround, but native Windows support is requested) Request: Please provide a properly compiled Windows baseline binary that does not require AVX2 instructions, or update the detection logic to ensure a truly compatible binary is selected for older CPUs. --- OpenCode version: latest (also tried 1.14.51, 1.10.0, 1.14.0 – none worked) Operating System: Windows 10 / Windows 11 (64-bit) Terminal: PowerShell 7 / Windows Terminal (also happens in Command Prompt) Steps to reproduce: 1. Use a Windows PC with an older CPU that lacks AVX2 (e.g., Intel 5th Gen Broadwell, or any pre-Haswell CPU). 2. Install globally: npm install -g opencode-ai@latest 3. Run any command, e.g., opencode --version 4. Observe immediate crash with Illegal instruction and CPU lacks AVX support errors. Regarding duplicates: I see #12553 and #13282 – they describe the same root cause (AVX2 missing on older CPUs). However, this issue adds evidence that the baseline Windows binary still doesn't work even when the installer attempts to select it. The existing issues focus on the installer detection; this one confirms the baseline binary itself is incompatible. Please consider re-opening or merging with those, but the underlying fix (a truly working baseline build) is not yet delivered. Plugins What plugins are you using? OpenCode version What version of OpenCode are you using? 1.16.2 Steps to reproduce How can we reproduce this issue? Markdown Editor Markdown input: edit mode selected. Write Preview 1. Use a Windows PC with an older Intel CPU (e.g., 5th Gen Broadwell, or any CPU without AVX2 support). 2. Install opencode globally: npm install -g opencode-ai@latest 3. Run any opencode command, for example: opencode --version 4. Observe the crash with the error shown below. Screenshot and/or share link Run /share to get a share link, or attach a screenshot Markdown Editor Markdown input: edit mode selected. Write Preview Paste link or drag and drop screenshot here Operating System what OS are you using? Windows 10 Terminal what terminal are you using? Windows Terminal Metadata Assignees No one assigned Labels No labels Type No type Projects No projects Milestone No milestone Remember, contributions to this repository should follow its contributing guidelines and security policy. Create more Footer © 2026 GitHub, Inc. Footer navigation Terms Privacy Security Status Community Docs Contact Manage cookies Do not share my personal information

OpenCode version

1.16.2

Steps to reproduce

  1. Use a Windows PC with an older Intel CPU (e.g., 5th Gen Broadwell, or any CPU without AVX2 support).
  2. Install opencode globally: npm install -g opencode-ai@latest
  3. Run any opencode command, for example: opencode --version
  4. Observe the crash with the error shown below.

Screenshot and/or share link

No response

Operating System

Windows 10

Terminal

Windows Terminal

Activity

  1. github-actions commented on Jun 6, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    It looks like #31155 is a duplicate of #31154 (which was filed first). Please consider closing one of them to consolidate the discussion.

  2. CodeByPartho commented on Jun 6, 2026

    @CodeByPartho
    Author

    Closed duplicate #31155. This is not a duplicate of #12553 or #13282 because those only cover installer detection, while this one confirms the baseline binary itself still crashes.

  3. github-actions commented on Aug 6, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions