hermes - ✅(Solved) Fix [Bug]: Windows: All tools fail with multiple values for keyword argument 'creationflags' in 0.14.0 [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#28920Fetched 2026-05-20 04:01:06
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
labeled ×5commented ×1cross-referenced ×1

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.

Error Message

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

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.

Fix Action

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,
)

PR fix notes

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

Description (problem / solution / changelog)

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.

Changed files

  • tools/environments/local.py (modified, +0/-1)

Code Example

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

---

# 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)
)

---

_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,
)
RAW_BUFFERClick to expand / collapse

[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:

  1. Start Hermes: hermes
  2. Ask the agent to run any terminal command: echo hello
  3. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: Windows: All tools fail with multiple values for keyword argument 'creationflags' in 0.14.0 [1 pull requests, 1 comments, 2 participants]