Remove hardcoded Claude executable path and defensive checks
Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
+1
-6
@@ -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
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user