Skip to content

fix(windows): remove duplicate creationflags in local subprocess Popen call#29028

Open
momowind wants to merge 1 commit into
NousResearch:mainfrom
momowind:fix/windows-creationflags-duplicate
Open

fix(windows): remove duplicate creationflags in local subprocess Popen call#29028
momowind wants to merge 1 commit into
NousResearch:mainfrom
momowind:fix/windows-creationflags-duplicate

Conversation

@momowind

Copy link
Copy Markdown
Contributor

Problem

On Windows, every terminal tool call fails with:

TypeError: subprocess.Popen() got multiple values for keyword argument 'creationflags'

Root Cause

In tools/environments/local.py, the _run_bash method passes creationflags to subprocess.Popen() twice on Windows:

  1. Via _popen_kwargs dict (windows_hide_flags()CREATE_NO_WINDOW)
  2. Via explicit creationflags=subprocess.CREATE_NO_WINDOW parameter

Python raises TypeError when the same keyword argument appears twice (once directly, once via **dict expansion).

Fix

Remove the redundant explicit creationflags parameter. _popen_kwargs already handles it via the established windows_hide_flags() compat-layer helper.

Commit

2b454a0f1 — single-line deletion, 1 file changed, 1 deletion.

The _popen_kwargs dict already provides creationflags via
windows_hide_flags() (CREATE_NO_WINDOW). The explicit
creationflags=subprocess.CREATE_NO_WINDOW on the Popen call
created a duplicate keyword argument on Windows, causing:
  TypeError: subprocess.Popen() got multiple values for
  keyword argument 'creationflags'

Remove the redundant explicit parameter; _popen_kwargs handles
it via the already-established compat-layer pattern.
@alt-glitch alt-glitch added type/bug Something isn't working P1 High — major feature broken, no workaround backend/local Local shell execution labels May 20, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #28898 — identical fix (remove duplicate creationflags kwarg in _run_bash() on Windows). See also #28920 (the bug report).

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

Labels

backend/local Local shell execution P1 High — major feature broken, no workaround type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants