fix(miniflare): hide workerd console window on Windows - #14864
Merged
petebacondarwin merged 1 commit intoJul 27, 2026
Merged
Conversation
Spawn workerd with windowsHide: true so Windows does not allocate a new console when the parent process has none. Without this, background or detached parents (for example Astro's astro dev --background) cause a visible, focus-stealing Windows Terminal window for workerd.exe. Fixes cloudflare#14863
🦋 Changeset detectedLatest commit: a9dcbec The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
workers-devprod
requested review from
a team and
penalosa
and removed request for
a team
July 26, 2026 13:24
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
petebacondarwin
approved these changes
Jul 27, 2026
@cloudflare/autoconfig
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
workers-devprod
approved these changes
Jul 27, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
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.
Fixes #14863.
Summary
Miniflare spawns
workerdwithoutwindowsHide: true. When the parent Node process has no console (for example a detached or backgrounded process such as Astro'sastro dev --background), Windows allocates a new console forworkerd.exe. On Windows 11 that console is hosted by Windows Terminal, so a visible, focus-stealing window appears for the lifetime of the runtime.windowsHide: trueto the workerdspawnoptions. This is a no-op on macOS/Linux.Related: withastro/astro#17516 (detached parent spawn on the Astro side).
Checklist
windowsHideis a standard Nodespawnoption with no effect outside Windows, and verifying the console window requires a Windows 11 host with Windows Terminal as the default console host plus a console-less parent process.Made with Cursor