Skip to content

bug(acpx): Windows console windows flash on every ACP spawn — missing windowsHide: true #40340

@Alannjaf

Description

@Alannjaf

Description

On Windows, every ACP message (agent spawn, queue owner spawn, tool execution) opens a visible cmd.exe console window that flashes briefly before closing. This makes ACP unusable on Windows desktop environments.

Root Cause

Three child_process.spawn() calls in �cpx/dist/cli.js are missing windowsHide: true:

  1. Tool execution spawn (~line 673): spawn(params.command, params.args, { stdio: ["ignore", "pipe", "pipe"] })
  2. Agent spawn (~line 1165): spawn2(command, args, { stdio: ["pipe", "pipe", "pipe"] })
  3. Queue owner spawn (~line 5030): spawn3(process.execPath, ..., { detached: true, stdio: "ignore" })

Note: The OpenClaw gateway-to-acpx spawn in �cp-cli-*.js already correctly passes windowsHide: resolved.windowsHide — the issue is only inside acpx itself.

Environment

  • OS: Windows 11 (10.0.26200)
  • OpenClaw: 2026.3.7 (npm global install)
  • acpx: 0.1.15 (plugin-local)
  • Node: v24.14.0
  • Gateway: Running as Scheduled Task with InteractiveToken logon

Fix

Add windowsHide: true to all three spawn option objects in acpx source:

\\js
// Tool execution
spawn(params.command, params.args ?? [], {
cwd: params.cwd ?? this.cwd,
env: toEnvObject(params.env),
stdio: ["ignore", "pipe", "pipe"],
windowsHide: true // <-- add this
});

// Agent spawn
spawn2(command, args, {
cwd: this.options.cwd,
env: buildAgentEnvironment(this.options.authCredentials),
stdio: ["pipe", "pipe", "pipe"],
windowsHide: true // <-- add this
});

// Queue owner spawn
spawn3(process.execPath, resolveQueueOwnerSpawnArgs(), {
detached: true,
stdio: "ignore",
windowsHide: true // <-- add this
});
\\

This is a no-op on macOS/Linux and fixes the visible window issue on Windows.

Workaround

Manually patch <npm-global>/openclaw/extensions/acpx/node_modules/acpx/dist/cli.js\ with the above changes. Must be re-applied after every acpx update.

Related Issues

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