anthropics / anthropics/claude-agent-sdk-python

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

Đang mở
#10 10 bình luận 14 reaction 1 người được giao Được @ltawfik nhận Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
8.1k
Fork
1.3k
Merge trung bình
2 ngày 31 phút
Pull request đã merge (30 ngày)
1

Mô tả

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)
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.