Skip to content

[Bug]: 后台每次执行命令都会弹出 Windows Terminal 窗口(conhost + powershell) #1749

Description

@Raing5Days

Summary

问题描述

每次向 BitFun 发送输入后,后台反复弹出 Windows Terminal 窗口。每条消息触发的工具调用链中,每次 shell 执行都会 spawn 一个新的可见终端,严重影响使用。

复现环境

  • Windows + Windows Terminal
  • 每次发送任意消息均稳定复现

实际行为 vs 期望行为

  • 实际:每次 ExecCommand/powershell 调用创建一对新的 conhost.exe + powershell.exe,窗口可见
  • 期望:后台命令静默执行,不弹窗(应使用 CREATE_NO_WINDOW 或等效标志)

验证数据

用进程监控脚本在 60s 窗口内抓到的数据——6 秒内 4 对全新进程:

时间 conhost PID powershell PID
01:04:23 8652 12040
01:04:26 12180 21636
01:04:27 14944 5968
01:04:28 5612 11180

可能原因

进程启动时缺少 CREATE_NO_WINDOW / SW_HIDE 标志,导致每次创建控制台宿主进程时弹出可见窗口。

Area

Desktop app

Reproduction or evidence

复现步骤

  1. 打开 BitFun,进入任意对话
  2. 发送任意一条消息(例如"你好")
  3. 观察任务栏 / 桌面——每次 BitFun 调用后台工具时,都会弹出新的 Windows Terminal 窗口

稳定复现,每条消息都触发,无需特殊环境配置。

Environment, if relevant

Windows 10/11 + Windows Terminal(系统默认终端)
BitFun 桌面端,当前最新版本

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions