Skip to content

[Windows] execLoginShellEnvZero missing windowsHide:true — console flash on login shell env detection (2026.5.4) #78159

@justmy2satoshis

Description

@justmy2satoshis

Summary

In 2026.5.4, the login shell environment probe (execLoginShellEnvZero) in the new io-*.js bundle spawns a child process without windowsHide: true. On Windows this causes a brief PowerShell console window to flash every time the gateway initialises or re-probes the shell environment.

Affected file (2026.5.4)

dist/io-D-sSCO_A.js   (exact hash varies per build — grep for execLoginShellEnvZero)

Reproduction (from 2026.5.4 source):

function execLoginShellEnvZero(params) {
    return params.exec(params.shell, ["-l", "-c", "env -0"], {
        encoding: "buffer",
        timeout: params.timeoutMs,
        maxBuffer: DEFAULT_MAX_BUFFER_BYTES,
        env: params.env,
        // windowsHide: true   <-- MISSING
        stdio: ["ignore", "pipe", "pipe"]
    });
}

Impact

Fix

Add windowsHide: true to the options object:

function execLoginShellEnvZero(params) {
    return params.exec(params.shell, ["-l", "-c", "env -0"], {
        encoding: "buffer",
        timeout: params.timeoutMs,
        maxBuffer: DEFAULT_MAX_BUFFER_BYTES,
        env: params.env,
        windowsHide: true,
        stdio: ["ignore", "pipe", "pipe"]
    });
}

Environment

  • OS: Windows 11 Pro (Build 26200)
  • OpenClaw: 2026.5.4
  • Shell: PowerShell 7 (pwsh.exe) resolved via resolvePowerShellPath()

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions