agentscope-ai/agentscope-java

[Bug]:AgentScope2.0版本 ShellExecuteTool和LocalFilesystemWithShell win10下无法执行脚本命令

Open

#2,268 opened on Jul 17, 2026

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Java (693 forks)user submission
area/harnessbuggood first issue

Repository metrics

Stars
 (3,253 stars)
PR merge metrics
 (Avg merge 2d 8h) (58 merged PRs in 30d)

Description

ShellExecuteTool :去除文件夹两侧的单引号,否则win10系统下无法执行命令 把 effectiveCommand = "cd '" + wd.replace("'", "'\''") + "' && " + command; 修改为: effectiveCommand = "cd " + wd.replace("'", "'\''") + " && " + command;

LocalFilesystemWithShell:win10运行条件下,指定编码是GBK否则中文乱码,导致llm不知道问题出在哪 把 stdout = new String(proc.getInputStream().readAllBytes()); stderr = new String(proc.getErrorStream().readAllBytes()); 修改为 if(isWin){ stdout = new String(proc.getInputStream().readAllBytes(), Charset.forName("GBK")); stderr = new String(proc.getErrorStream().readAllBytes(), Charset.forName("GBK")); }else{ stdout = new String(proc.getInputStream().readAllBytes(), StandardCharsets.UTF_8); stderr = new String(proc.getErrorStream().readAllBytes(), StandardCharsets.UTF_8); }

Contributor guide