anthropics / anthropics/claude-agent-sdk-python

Large memory spike when spawning helper processes

オープン
#434 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
8.1k
フォーク
1.3k
平均マージ
2日 31分
マージ済み PR(30日)
1

説明

Since upgrading to Claude Agent Python SDK 0.1.18, I am commonly seeing the following while running `client.query(query)` followed by `client.receive_response()`:

```
ERROR:claude_agent_sdk._internal.query:Fatal error in message reader: Command failed with exit code -9 (exit code: -9)
Error output: Check stderr output for details
```

After which the method fails with the error:

```
Command failed with exit code -9 (exit code: -9)
```

After this has occurred once, subsequent calls to `client.query` fail with the error:

```
Cannot write to terminated process (exit code: -9)
```

Exit code 9 is often caused by OOM Killer, meaning the process ran out of memory. These errors don't always happen immediately. Sometimes the SDK works for one or two calls, and then this happens.

This could potentially be caused by a memory leak in Claude Code.

Original issue: https://github.com/daytonaio/daytona/pull/3208

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。