Skip to content

[Bug]: exec tool on Windows (v2026.6.10) pops visible cmd/PowerShell window for every command — regression from v2026.6.8 #96835

Closed as not planned

Description

@w13693884427

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

内容:

Environment:

OpenClaw: 2026.6.10 (upgraded from 2026.6.8)
OS: Windows 11, 64-bit (AMD64)
PowerShell: 5.1.26100.8737
Node: v26.2.0
Model: DeepSeek V4 Flash
Description:
After upgrading from v2026.6.8 to v2026.6.10, every exec call creates a visible cmd/PowerShell console window that pops up, runs the command, and immediately closes. In v2026.6.8, these windows were hidden (process ran silently in background).

This is disruptive because:

The flashing window interrupts the user's workflow (steals focus)
Background tasks no longer appear in the taskbar/notification area
Multiple rapid exec calls cause a cascade of flickering windows
What I tried:

Using pty: true — keeps the window open but the flicker on open/close remains
Using background: true — same behavior, window still pops up
Setting CREATE_NO_WINDOW equivalent — no config option found in exec docs
Expected behavior:
exec should run PowerShell subprocesses with hidden console window (as in v2026.6.8), or expose a config option like exec.hideWindow to control this behavior.

Suggested fix:
Add a config option (e.g. exec.createNoWindow: true/false) or default to CREATE_NO_WINDOW flag when spawning PowerShell processes on Windows, matching the pre-v2026.6.10 behavior.

Steps to reproduce

描述:
从v2026.6.8升级到v2026.6.10后,每次调用都会创建一个可见的cmd/PowerShell控制台窗口,弹出后执行命令后立即关闭。在 v2026.6.8 中,这些窗口是隐藏的(进程在后台静默运行)。exec

这造成了干扰,因为:

闪烁窗口会打断用户的工作流程(抢走焦点)
后台任务不再出现在任务栏/通知区
多次快速的执行电话会导致一连串闪烁的窗户
我尝试过的:

使用——保持窗户开着,但开关时闪烁依然存在pty: true
使用同样的行为,窗口依然弹出background: true
设置等效——执行文档中找不到配置选项CREATE_NO_WINDOW
预期行为:
应运行带有隐藏控制台窗口的PowerShell子进程(如v2026.6.8),或暴露配置选项以控制此行为。execexec.hideWindow

建议的解决方案:
在Windows上添加配置选项(例如)或默认在Windows上生成PowerShell进程时标记,与v2026.6.10之前的行为保持一致。exec.createNoWindow: true/falseCREATE_NO_WINDOW

Expected behavior

描述:
从v2026.6.8升级到v2026.6.10后,每次调用都会创建一个可见的cmd/PowerShell控制台窗口,弹出后执行命令后立即关闭。在 v2026.6.8 中,这些窗口是隐藏的(进程在后台静默运行)。exec

这造成了干扰,因为:

闪烁窗口会打断用户的工作流程(抢走焦点)
后台任务不再出现在任务栏/通知区
多次快速的执行电话会导致一连串闪烁的窗户
我尝试过的:

使用——保持窗户开着,但开关时闪烁依然存在pty: true
使用同样的行为,窗口依然弹出background: true
设置等效——执行文档中找不到配置选项CREATE_NO_WINDOW
预期行为:
应运行带有隐藏控制台窗口的PowerShell子进程(如v2026.6.8),或暴露配置选项以控制此行为。execexec.hideWindow

建议的解决方案:
在Windows上添加配置选项(例如)或默认在Windows上生成PowerShell进程时标记,与v2026.6.10之前的行为保持一致。exec.createNoWindow: true/falseCREATE_NO_WINDOW

Actual behavior

内容:

环境:

OpenClaw:2026.6.10(升级自2026.6.8)
操作系统:Windows 11,64位(AMD64)
PowerShell: 5.1.26100.8737
Node: v26.2.0
型号:DeepSeek V4 闪光灯
描述:
从v2026.6.8升级到v2026.6.10后,每次调用都会创建一个可见的cmd/PowerShell控制台窗口,弹出后执行命令后立即关闭。在 v2026.6.8 中,这些窗口是隐藏的(进程在后台静默运行)。exec

这造成了干扰,因为:

闪烁窗口会打断用户的工作流程(抢走焦点)
后台任务不再出现在任务栏/通知区
多次快速的执行电话会导致一连串闪烁的窗户
我尝试过的:

使用——保持窗户开着,但开关时闪烁依然存在pty: true
使用同样的行为,窗口依然弹出background: true
设置等效——执行文档中找不到配置选项CREATE_NO_WINDOW
预期行为:
应运行带有隐藏控制台窗口的PowerShell子进程(如v2026.6.8),或暴露配置选项以控制此行为。execexec.hideWindow

建议的解决方案:
在Windows上添加配置选项(例如)或默认在Windows上生成PowerShell进程时标记,与v2026.6.10之前的行为保持一致。exec.createNoWindow: true/falseCREATE_NO_WINDOW

OpenClaw version

OpenClaw:2026.6.10(升级自2026.6.8)

Operating system

操作系统:Windows 11,64位(AMD64)

Install method

PowerShell: 5.1.26100.8737

Model

型号:DeepSeek V4 闪光灯

Provider / routing chain

型号:DeepSeek V4 闪光灯

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Activity

  1. clawsweeper commented on Jun 25, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 25, 2026, 1:18 PM ET / 17:18 UTC.

    Summary
    Keep open: current main has adjacent hidden-window safeguards, but there is not enough proof that the reported Windows exec console flash is fixed; the PTY/node-pty and native Windows/Node 26 paths still need live reproduction.

    Reproducibility: no. not as a high-confidence live reproduction. Source inspection shows plausible Windows exec paths and an unproven PTY/node-pty branch, but this review did not run native Windows v2026.6.10 or current main.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Next step
    Manual maintainer review is the right next step because native Windows reproduction is needed before safely routing a fix to PTY, PowerShell, node-host, or direct exec code.

    Review details

    Best possible solution:

    Keep this as the canonical Windows exec console-window regression, reproduce it on native Windows against v2026.6.10 and current main, then restore hidden subprocess behavior on the exact affected spawn path.

    Do we have a high-confidence way to reproduce the issue?

    No, not as a high-confidence live reproduction. Source inspection shows plausible Windows exec paths and an unproven PTY/node-pty branch, but this review did not run native Windows v2026.6.10 or current main.

    Is this the best way to solve the issue?

    Unclear. The config-option suggestion is not the best first fix; the best repair is to identify the exact spawn path that lost hidden-window behavior and restore the previous default before considering a new operator setting.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • No native Windows v2026.6.10 or current-main run was performed, so the exact failing spawn path is not confirmed.
    • The report uses Node v26.2.0 while the repo policy recommends Node 24, so live proof should separate OpenClaw behavior from a Node 26 runtime difference.
    • Several current paths already set windowsHide, but PTY/node-pty and PowerShell host behavior remain unproven by source alone.

    Codex review notes: model internal, reasoning high; reviewed against 7fefc5ff58de.

    Label changes

    Label changes:

    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • add clawsweeper:needs-info: Current issue advisory state selects this label.
    • remove clawsweeper:needs-live-repro: Current issue advisory state no longer selects this label.
    • remove issue-rating: 🐚 platinum hermit: Current issue advisory state no longer selects this label.

    Label justifications:

    • P2: The issue reports a disruptive Windows exec regression with a platform-specific blast radius, not a total runtime outage.
    • impact:other: The concrete impact is user-visible focus-stealing console windows during exec calls, which is meaningful but outside the specific owned impact labels.
    Evidence reviewed

    Acceptance criteria:

    • Run native Windows proof on v2026.6.10 and current main using normal exec, background exec, and pty:true exec.
    • Trace the actual spawn path taken by each mode and verify whether the visible window appears before changing code.
    • After a fix, add focused coverage for the affected spawn adapter or helper and run the relevant Windows exec/process tests.

    What I checked:

    • Live issue context: The live issue reports Windows 11, OpenClaw v2026.6.10 upgraded from v2026.6.8, PowerShell 5.1, Node v26.2.0, and visible cmd/PowerShell windows for normal, PTY, and background exec calls.
    • Exec Windows shell contract: The user-facing exec docs say Windows hosts prefer PowerShell 7 and fall back to Windows PowerShell 5.1, matching the reporter's PowerShell surface. Public docs: docs/tools/exec.md. (docs/tools/exec.md:85, 7fefc5ff58de)
    • Background and PTY exec contract: The background-process docs define background exec and pty:true as supported exec modes, so the report covers documented user-facing exec behavior rather than an unsupported path. Public docs: docs/gateway/background-process.md. (docs/gateway/background-process.md:15, 7fefc5ff58de)
    • Windows shell selection: Current main routes Windows host exec through PowerShell with -NoProfile -NonInteractive -Command. (src/agents/shell-utils.ts:103, 7fefc5ff58de)
    • Normal child exec path: The process supervisor child adapter sets windowsHide: true for normal child-mode exec spawns, so the obvious child adapter is not a clear missing-option fix. (src/process/supervisor/adapters/child.ts:83, 7fefc5ff58de)
    • PTY exec path uncertainty: The PTY adapter delegates to @lydell/node-pty and passes cwd/env/name/cols/rows only, so source inspection does not prove hidden-window behavior for pty:true. (src/process/supervisor/adapters/pty.ts:62, 7fefc5ff58de)

    Likely related people:

    • vincentkoc: Recent live commit history for process exec and supervisor files includes Windows command wrapping, taskkill resolution, and timeout clamping work on the central spawn helpers. (role: recent process contributor; confidence: medium; commits: 2248aa431570, a192b2ea52b3, 1425bb3a0318; files: src/process/supervisor/adapters/child.ts, src/process/exec.ts)
    • steipete: Commit history shows repeated work on shell-utils, process helpers, and PTY/process supervisor surfaces, including Windows PowerShell fallback and process helper documentation. (role: adjacent owner; confidence: medium; commits: fa525bf21280, c389839d3018, a628a66e4d1e; files: src/agents/shell-utils.ts, src/process/supervisor/adapters/pty.ts, src/process/exec.ts)
    • jesse-merhi: Recent node-host invoke history includes rebuilding command authorization through the node and gateway execution path, adjacent to node exec behavior. (role: recent exec/node-host contributor; confidence: medium; commits: c9707ab635b9; files: src/node-host/invoke.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    and removed
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    on Jun 25, 2026
  3. openclaw-barnacle commented on Jul 10, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  4. clawsweeper commented on Jul 10, 2026

    @clawsweeper
    Contributor

    ClawSweeper status: review started.

    I am starting a fresh review of this issue: [Bug]: exec tool on Windows (v2026.6.10) pops visible cmd/PowerShell window for every command — regression from v2026.6.8 This is item 1/1 in the current shard. Shard 15/32.

    This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

    Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

  5. openclaw-barnacle commented on Jul 18, 2026

    @openclaw-barnacle

    Closing due to inactivity.
    If this is still an issue, please retry on the latest OpenClaw release and share updated details.
    If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.

  6. locked as resolved and limited conversation to collaborators on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingclawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions