-
Notifications
You must be signed in to change notification settings - Fork 518
Description
Use-case
Organizations might install Claude Code CLI (or wrapped versions) at custom locations and may prefer to provide those paths instead of relying on the SDK’s default search logic.
Issue
Custom cli_path is supported in transport layer but is never passed.
claude-agent-sdk-python/src/claude_agent_sdk/_internal/transport/subprocess_cli.py
Line 45 in 333491e
| self._cli_path = str(cli_path) if cli_path else self._find_cli() |
Proposal
We can introduce an option in ClaudeAgentOptions say cli_path, default None. We can extract the cli_path below and pass it down:
claude-agent-sdk-python/src/claude_agent_sdk/_internal/client.py
Lines 73 to 75 in 333491e
| chosen_transport = SubprocessCLITransport( | |
| prompt=prompt, options=configured_options | |
| ) |
and here:
claude-agent-sdk-python/src/claude_agent_sdk/client.py
Lines 128 to 131 in 333491e
| self._transport = SubprocessCLITransport( | |
| prompt=actual_prompt, | |
| options=options, | |
| ) |
I would be happy to raise a PR if this sounds right. Thanks!