agentscope-ai/agentscope-java

[Bug]:window系统下执行任何命令工具 execute 总是出错

开放

#2,271 创建于 2026年7月17日

 (1 条评论) (0 个反应) (0 位负责人)Java (693 个派生)user submission
area/harnessbuggood first issue

仓库指标

星标
 (3,253 个星标)
PR 合并指标
 (平均合并 2天 8小时) (30 天内合并 58 个 PR)

描述

AgentScope-Java is an open-source project. To involve a broader community, we recommend asking your questions in English.

Describe the bug window系统下执行命令工具 execute 总是出错,任何命令都是。经过AI分析发现原来是 ShellExecuteTool 代码中没有判断当前环境是Windows还是Linux导致。就是这一行用了 Unix 单引号语法,在 Windows cmd.exe 下会报错。

需要改成如下:

To Reproduce window系统下执行命令工具 execute 总是出错,任何命令都是,如下图

Expected behavior Windows环境下可以正常执行cmd命令

Error messages

  • stderr:文件名、目录名或卷标语法不正确

Environment (please complete the following information):

  • AgentScope-Java Version:2.0.0-RC5
  • Java Version: [e.g. 17]
  • OS: [windows]

Additional context Add any other context about the problem here.

贡献者指南