openclaw - ✅(Solved) Fix [Bug]: Gateway OpenCLAW spawns flashing command prompt windows in background on Windows [1 pull requests, 2 comments, 3 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
openclaw/openclaw#70238Fetched 2026-04-23 07:27:22
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Timeline (top)
commented ×2labeled ×2cross-referenced ×1mentioned ×1

On Windows, launching OpenCLAW causes background gateway processes to briefly open command prompt windows, resulting in visible screen flickering.

Root Cause

On Windows, launching OpenCLAW causes background gateway processes to briefly open command prompt windows, resulting in visible screen flickering.

Fix Action

Fixed

PR fix notes

PR #70308: fix(gateway): hide child process windows to prevent startup flicker on Windows #70238

Description (problem / solution / changelog)

Summary

  • Problem: Gateway processes on Windows spawn visible cmd.exe windows during startup due to missing spawn options, causing screen flickering.
  • Why it matters: Degrades user experience and makes the application appear unstable or misconfigured.
  • What changed: Added windowsHide: true to the child_process.spawn() options in the gateway process launcher.
  • What did NOT change (scope boundary): No changes to process lifecycle, logging, or behavior on non-Windows platforms.

Change Type (select all)

  • Bug fix

Scope (select all touched areas)

  • Gateway / orchestration

Linked Issue/PR

  • Closes #70238
  • This PR fixes a bug or regression

Root Cause

  • Root cause: child_process.spawn() was invoked without windowsHide: true, causing Windows to create a visible console window for each child process.
  • Missing detection / guardrail: No platform-specific handling for background process spawning on Windows.
  • Contributing context: Gateway processes are spawned during startup, amplifying the visual impact due to multiple rapid spawns.

Regression Test Plan

  • Coverage level that should have caught this:

    • Seam / integration test
  • Target test or file:

    • Gateway process spawn behavior on Windows
  • Scenario the test should lock in:

    • Spawning a gateway process does not create a visible console window on Windows
  • Why this is the smallest reliable guardrail:

    • Issue occurs at process orchestration boundary, not within isolated logic
  • Existing test that already covers this (if any):

    • None
  • If no new test is added, why not:

    • Visual OS-level behavior is difficult to assert reliably in CI environments

User-visible / Behavior Changes

  • Gateway startup no longer causes command prompt windows to flash on Windows
  • Startup experience is visually clean and uninterrupted

Diagram

Before:
App start -> spawn gateway -> visible cmd window flashes

After:
App start -> spawn gateway (windowsHide) -> no visible window -> clean startup

## Security Impact (required)

- New permissions/capabilities? No  
- Secrets/tokens handling changed? No  
- New/changed network calls? No  
- Command/tool execution surface changed? No  
- Data access scope changed? No  

---

## Repro + Verification

### Environment

- OS: Arch Linux x86_64 
- Kernel: 6.19.11-arch1-1
- Runtime/container: Node v22 .22.2
- Model/provider: N/A  
- Integration/channel (if any): Gateway process  
- Relevant config (redacted): default setup  

### Steps

1. Launch OpenClaw on Windows  
2. Observe startup behavior  
3. Monitor for visible terminal windows  

### Expected

- No command prompt windows appear  
- Gateway runs fully in background  

### Actual (before fix)

- Command prompt windows flash repeatedly during startup  

---

## Evidence

- [x] Issue reproduced before fix (visible flicker)  
- [x] Verified no window spawn after fix  

---

## Human Verification (required)

- Verified scenarios:
  - Standard startup on Windows  
  - Multiple gateway respawns do not produce flicker  

- Edge cases checked:
  - Rapid restart / respawn scenarios  
  - Background execution stability  

- What you did **not** verify:
  - All Windows versions  
  - Non-standard terminal environments  

---

## Review Conversations

- [x] I replied to or resolved every bot review conversation I addressed in this PR.  
- [x] I left unresolved only the conversations that still need reviewer or maintainer judgment.  

---

## Compatibility / Migration

- Backward compatible? Yes  
- Config/env changes? No  
- Migration needed? No  

---

## Risks and Mitigations

- Risk:
  - Potential unintended suppression of console output visibility on Windows  

- Mitigation:
  - Logging remains unaffected (stdout/stderr still captured)  
  - Behavior aligns with expected background process execution

## Changed files

- `src/infra/process-respawn.ts` (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

On Windows, launching OpenCLAW causes background gateway processes to briefly open command prompt windows, resulting in visible screen flickering.

Steps to reproduce

Launch OpenCLAW on a Windows system using a standard setup. Observe the screen during startup as the gateway initializes.

Expected behavior

The gateway should start fully in the background without opening or displaying any visible command prompt windows.

Actual behavior

Command prompt windows repeatedly appear and disappear very quickly during execution, creating a noticeable flickering effect on screen.

OpenClaw version

OpenClaw 2026.4.21 (f788c88)

Operating system

Windows 11

Install method

No response

Model

lastest openai

Provider / routing chain

openai

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can likely be mitigated by modifying the gateway process launch configuration to prevent command prompt windows from appearing on Windows.

Guidance

  • Investigate the launch configuration of the background gateway processes to determine why command prompt windows are opening during initialization.
  • Consider modifying the process launch to use a hidden or minimized window mode to prevent visible flickering.
  • Review the OpenCLAW documentation and source code for any existing options or configuration settings that control the visibility of subprocess windows.
  • Test the modified launch configuration to verify that the gateway initializes without displaying command prompt windows.

Example

No specific code snippet can be provided without more information about the launch configuration and gateway process implementation.

Notes

The exact solution may depend on the specifics of the gateway process launch configuration and the OpenCLAW implementation, which are not provided in the issue description.

Recommendation

Apply a workaround by modifying the gateway process launch configuration to prevent command prompt windows from appearing, as this is likely to be a more feasible and timely solution than waiting for a potential fix in a future OpenCLAW version.

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…

FAQ

Expected behavior

The gateway should start fully in the background without opening or displaying any visible command prompt windows.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING