Skip to content

feat(claudecode): support custom CLI binary via cmd option#373

Open
timandy wants to merge 1 commit intochenhg5:mainfrom
timandy:feat/claudecode-custom-cmd
Open

feat(claudecode): support custom CLI binary via cmd option#373
timandy wants to merge 1 commit intochenhg5:mainfrom
timandy:feat/claudecode-custom-cmd

Conversation

@timandy
Copy link
Copy Markdown

@timandy timandy commented Mar 30, 2026

Summary

  • Allow configuring a custom CLI binary name (e.g. claude-sandbox) via agent.options.cmd in config.toml
  • Defaults to claude when not specified, maintaining backward compatibility
  • Updates CLIBinaryName() to return the configured cmd, enabling correct cc-connect doctor diagnostics

Changes

  • agent/claudecode/claudecode.go: Add cmd field, parse from opts["cmd"], use in LookPath and CLIBinaryName()
  • agent/claudecode/session.go: Accept cmdName parameter instead of hardcoded "claude"

Config Example

[[projects]]
name = "project-name"
[projects.agent]
  type = "claudecode"
  [projects.agent.options]
    cmd = "claude-sandbox"  # custom cmd
    work_dir = "work dir"
    mode = "default"

Copy link
Copy Markdown
Owner

@chenhg5 chenhg5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Flexible configuration for CLI binary.

Review summary:

  • ✅ Supports custom CLI binary via agent.options.cmd
  • ✅ Backward compatible (defaults to claude)
  • ✅ Updates CLIBinaryName() for correct cc-connect doctor diagnostics
  • ✅ CI passes

Useful for users with custom Claude Code builds.

Allow configuring a custom CLI binary name (e.g. "claude-sandbox")
via agent.options.cmd in config.toml. Defaults to "claude".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@timandy timandy force-pushed the feat/claudecode-custom-cmd branch from b5c4c0a to e314352 Compare April 1, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants