anthropics / anthropics/claude-agent-sdk-python

`cwd` in ClaudeCodeOptions does not seem to be honored at all

オープン
#10 コメント 10 件 リアクション 14 件 担当者 1 名 @ltawfik が担当を希望しています GitHub で見る
bug
主要言語
Python
スター
8.1k
フォーク
1.3k
平均マージ
2日 31分
マージ済み PR(30日)
1

説明

Update

This is now ok when I use opus for some reason.

Using this code from the examples and docs. The cwd is completely ignored and random paths are picked. Even with bypassPermissions enabled

```
async def main():
messages: list[Message] = []

async for message in query(
prompt = prompt,
options = ClaudeCodeOptions(
cwd = Path("/path/to/app"),
system_prompt = "You are a helpful assistant",
allowed_tools = ['Task', 'Agent', 'Bash', 'Glob', 'Grep', 'LS', 'exit_plan_mode', 'Read', 'Edit', 'MultiEdit', 'Write', 'NotebookRead', 'NotebookEdit', 'WebFetch', 'TodoRead', 'TodoWrite'],
permission_mode = "bypassPermissions",
continue_conversation=True,
max_turns = 10,
),
):
messages.append(message)

print(messages)

anyio.run(main)
```

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

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

評価

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

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

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