[Bug]: Windows: All tools fail with "multiple values for keyword argument 'creationflags'" in 0.14.0
Summary
On Windows, Hermes Agent 0.14.0 is completely non-functional. Every tool that invokes subprocess execution (terminal, read_file, write_file, patch, search_files, etc.) crashes with:
TypeError: subprocess.Popen() got multiple values for keyword argument 'creationflags'
This is a P1 critical regression — the agent cannot execute any commands on Windows.
Environment
- OS: Windows 10/11
- Hermes version: 0.14.0
- Python: 3.11.13 (also affects other versions)
- Shell: Git Bash (MSYS)
Root Cause
In tools/environments/local.py, lines 523-537, creationflags is passed to subprocess.Popen() twice on Windows:
# Line 523
_popen_kwargs = {"creationflags": windows_hide_flags()} if _IS_WINDOWS else {}
# Lines 525-538
proc = subprocess.Popen(
args,
...
creationflags=subprocess.CREATE_NO_WINDOW if _IS_WINDOWS else 0, # <-- FIRST time
cwd=_popen_cwd,
**_popen_kwargs, # <-- SECOND time (contains creationflags on Windows)
)
Python's subprocess.Popen does not allow duplicate keyword arguments, causing an immediate TypeError.
Affected Tools
All tools that rely on LocalEnvironment.execute() or subprocess execution:
terminal — completely broken
read_file — completely broken
write_file — completely broken
patch — completely broken
search_files — completely broken
- Any skill or workflow that shells out
Minimal Reproduction
On Windows with Hermes 0.14.0:
- Start Hermes:
hermes
- Ask the agent to run any terminal command:
echo hello
- Observe
TypeError: subprocess.Popen() got multiple values for keyword argument 'creationflags'
Fix
Remove the duplicate explicit creationflags argument. The _popen_kwargs dict already handles it correctly:
_popen_kwargs = {"creationflags": windows_hide_flags()} if _IS_WINDOWS else {}
proc = subprocess.Popen(
args,
text=True,
env=run_env,
encoding="utf-8",
errors="replace",
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
stdin=subprocess.PIPE if stdin_data is not None else subprocess.DEVNULL,
preexec_fn=None if _IS_WINDOWS else os.setsid,
# REMOVED: creationflags=subprocess.CREATE_NO_WINDOW if _IS_WINDOWS else 0,
cwd=_popen_cwd,
**_popen_kwargs,
)
File Location
tools/environments/local.py, lines 523-537
Suggested Labels
type/bug
P1 High
comp/tools
platform/windows
Additional Context
This appears to have been introduced in 0.14.0, likely as part of Windows subprocess compatibility improvements. The _popen_kwargs pattern was added but the original explicit creationflags line was not removed, creating the collision.
The _subprocess_compat.py module correctly provides windows_hide_flags() and windows_detach_popen_kwargs() — the bug is purely in how local.py consumes them.
[Bug]: Windows: All tools fail with "multiple values for keyword argument 'creationflags'" in 0.14.0
Summary
On Windows, Hermes Agent 0.14.0 is completely non-functional. Every tool that invokes subprocess execution (
terminal,read_file,write_file,patch,search_files, etc.) crashes with:This is a P1 critical regression — the agent cannot execute any commands on Windows.
Environment
Root Cause
In
tools/environments/local.py, lines 523-537,creationflagsis passed tosubprocess.Popen()twice on Windows:Python's
subprocess.Popendoes not allow duplicate keyword arguments, causing an immediateTypeError.Affected Tools
All tools that rely on
LocalEnvironment.execute()or subprocess execution:terminal— completely brokenread_file— completely brokenwrite_file— completely brokenpatch— completely brokensearch_files— completely brokenMinimal Reproduction
On Windows with Hermes 0.14.0:
hermesecho helloTypeError: subprocess.Popen() got multiple values for keyword argument 'creationflags'Fix
Remove the duplicate explicit
creationflagsargument. The_popen_kwargsdict already handles it correctly:File Location
tools/environments/local.py, lines 523-537Suggested Labels
type/bugP1 Highcomp/toolsplatform/windowsAdditional Context
This appears to have been introduced in 0.14.0, likely as part of Windows subprocess compatibility improvements. The
_popen_kwargspattern was added but the original explicitcreationflagsline was not removed, creating the collision.The
_subprocess_compat.pymodule correctly provideswindows_hide_flags()andwindows_detach_popen_kwargs()— the bug is purely in howlocal.pyconsumes them.