anthropics / anthropics/claude-agent-sdk-python

Hide subprocess terminal for Windows system

未关闭
#480 0 条评论 1 个 reaction 已指派 1 人 已被 @dicksontsai 认领 在 GitHub 查看
主要语言
Python
星标
8.1k
派生
1.3k
平均合并
2 天 31 分钟
30 天内合并 PR
1

描述

### Issue

When spawn Claude subprocess via SDK on Windows, a terminal window remains visible. **Need to hide the terminal for a cleaner UX.**

### Workaround

**before**

https://github.com/anthropics/claude-agent-sdk-python/blob/7866e5f6d281ccd2958af52ae4416dfd580e7a20/src/claude_agent_sdk/_internal/transport/subprocess_cli.py#L403-L411

**after**

```python
if sys.platform == "win32":
import subprocess
creationflags = subprocess.CREATE_NO_WINDOW

self._process = await anyio.open_process(
cmd,
stdin=PIPE,
stdout=PIPE,
stderr=stderr_dest,
cwd=self._cwd,
env=process_env,
user=self._options.user,
creationflags=creationflags if creationflags else 0
)
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。