anthropics / anthropics/claude-agent-sdk-python

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

未關閉
#10 10 則留言 14 個 reaction 已指派 1 人 已被 @ltawfik 認領 在 GitHub 檢視
bug
主要語言
Python
星號
8.1k
分支
1.3k
平均合併
2 天 31 分鐘
30 天內合併 PR
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 摘要。