anthropics / anthropics/claude-agent-sdk-python

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

Aperta
#10 10 commenti 14 reazioni 1 assegnatario Rivendicata da @ltawfik Vedi su GitHub
bug
Lingua principale
Python
Stelle
8.1k
Fork
1.3k
Merge medio
2g 31m
PR unite (30g)
1

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.