Skip to content

panic(main thread): exact division produced remainder on Windows when opening project in OpenCode #26855

@AlecoPlan

Description

@AlecoPlan

What version of Bun is running?

v1.3.6

What platform is your computer?

Windows (using OpenCode)

What steps can reproduce the bug?

Open a project directory using OpenCode on Windows.

The editor triggers a Bun process (likely for dependency scanning or background tasks).

The terminal/output console in the editor shows: panic(main thread): exact division produced remainder.

What is the expected behavior?

Bun should initialize or run the background task without a math panic.

What do you see instead?

Bun crashes with panic(main thread): exact division produced remainder

Additional information

This occurred specifically within the OpenCode environment on Windows. It might be related to how the editor's integrated terminal or task runner allocates resources or identifies CPU topology.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions