Remove hardcoded Claude executable path and defensive checks

Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-10-25 06:19:30 +00:00
parent 516e136966
commit b88ce840fa
3 changed files with 4 additions and 12 deletions
File diff suppressed because one or more lines are too long
+1 -6
View File
@@ -282,17 +282,12 @@ class SDKWorker {
* Run SDK agent with streaming input mode
*/
private async runSDKAgent(): Promise<void> {
// Find Claude Code executable
const claudePath = process.env.CLAUDE_CODE_PATH || '/Users/alexnewman/.nvm/versions/node/v24.5.0/bin/claude';
console.error(`[SDK Worker DEBUG] About to call query with claudePath: ${claudePath}`);
const queryResult = query({
prompt: this.createMessageGenerator(),
options: {
model: MODEL,
disallowedTools: DISALLOWED_TOOLS,
abortController: this.abortController,
pathToClaudeCodeExecutable: claudePath
abortController: this.abortController
}
});
+1 -4
View File
@@ -345,16 +345,13 @@ class WorkerService {
private async runSDKAgent(session: ActiveSession): Promise<void> {
logger.info('SDK', 'Agent starting', { sessionId: session.sessionDbId });
const claudePath = process.env.CLAUDE_CODE_PATH || '/Users/alexnewman/.nvm/versions/node/v24.5.0/bin/claude';
try {
const queryResult = query({
prompt: this.createMessageGenerator(session),
options: {
model: MODEL,
disallowedTools: DISALLOWED_TOOLS,
abortController: session.abortController,
pathToClaudeCodeExecutable: claudePath
abortController: session.abortController
}
});