Skip to content

fix(browse): set windowsHide on the Node Bun.spawn polyfill - #2645

Closed
johnsonafool wants to merge 1 commit into
garrytan:mainfrom
johnsonafool:fix/windows-console-popup-bun-polyfill
Closed

johnsonafool wants to merge 1 commit into
garrytan:mainfrom
johnsonafool:fix/windows-console-popup-bun-polyfill

Conversation

@johnsonafool

Copy link
Copy Markdown

On Windows the browse server runs under Node (detached, stdio ignore), so it has no console. Bun.spawn is shimmed to child_process.spawn in bun-polyfill.cjs without windowsHide, so spawning 'bun run terminal-agent.ts' makes Windows allocate a fresh console — a Windows Terminal window titled C:\Users\\.bun\bin\bun.exe that stays open for the life of the agent and stacks up on every respawn.

Why (in your own words)

Live evidence

# what you ran + what it produced

Scope

  • Changed:
  • Verified live by:
  • Did NOT test:

Liveness proof (required)

Checklist

  • Liveness screenshot attached: GSTACK PR typed live into a real surface (not edited onto the image)
  • This is not a generated-file-only diff (I edited the source/template and regenerated)
  • No ETHOS.md edits, and no changes to voice / founder perspective / YC references
  • New public command / external service / host adapter has an accepted issue linked (or N/A)
  • Linked issue or reproduction: #

On Windows the browse server runs under Node (detached, stdio ignore),
so it has no console. Bun.spawn is shimmed to child_process.spawn in
bun-polyfill.cjs without windowsHide, so spawning 'bun run
terminal-agent.ts' makes Windows allocate a fresh console — a Windows
Terminal window titled C:\\Users\\<user>\\.bun\\bin\\bun.exe that stays
open for the life of the agent and stacks up on every respawn.
@trunk-io

trunk-io Bot commented Aug 20, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@johnsonafool

Copy link
Copy Markdown
Author

/trunk merge

@trunk-io

trunk-io Bot commented Aug 24, 2026

Copy link
Copy Markdown

An error occurred while submitting your PR to the queue: Only users that are a part of this repo's Trunk organization or have write permissions to the repo can submit a PR to the queue

@capy-ai

capy-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, @johnsonafool. The fix is now on main: the Bun.spawn polyfill sets windowsHide unless a caller explicitly passes false (browse/src/bun-polyfill.cjs) (fixed in v1.64.0.0, #2571). Closing as superseded; if you still see the problem on the latest gstack, please open an issue with ./setup --status output.

@capy-ai capy-ai Bot closed this Oct 3, 2026
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.

1 participant