Make agent CLI command configurable#317
Merged
Merged
Conversation
Replace the hardcoded exec.CommandContext(ctx, "claude", "--print") with a configurable agent_cli_command config key (default: "claude --print"). The binary is resolved via exec.LookPath so it works with full paths, toolbox commands, and alternative agent CLIs. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #317 +/- ##
==========================================
+ Coverage 67.48% 67.75% +0.27%
==========================================
Files 45 45
Lines 6885 6906 +21
==========================================
+ Hits 4646 4679 +33
+ Misses 1927 1915 -12
Partials 312 312 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Log stderr as WARN and include it in the error message shown to the user when the agent command fails. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Cover agentQuery: command parsing, empty command, command not found, stderr capture, env var passing, stdin piping. Cover handleClaudePrompt: default command fallback, custom command, toolbox-wrapped command. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent_cli_commandconfig key (default:claude --print) so the/agentCLI subprocess is no longer hardcodedexec.LookPath— works with full paths, toolbox commands, and alternative agent CLIshasClaudeCode func() booltolookPath func(string) (string, error)for proper binary detectionCloses #307
Test plan
make test-allpassesclaude --printused whenagent_cli_commandnot setagent_cli_command: /full/path/to/claude --printin configagent CLI "binary" not found on PATHin status🤖 Generated with Claude Code