Skip to content

Support for passing CLI path from ClaudeAgentOptions #214

@nishikantparmariam1

Description

@nishikantparmariam1

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.

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:

chosen_transport = SubprocessCLITransport(
prompt=prompt, options=configured_options
)

and here:

self._transport = SubprocessCLITransport(
prompt=actual_prompt,
options=options,
)

I would be happy to raise a PR if this sounds right. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions