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 摘要。