From afea4ea6f501101ad6eaad39716f5c92239c9ab4 Mon Sep 17 00:00:00 2001 From: jio Date: Sun, 18 Jan 2026 23:53:02 -0700 Subject: [PATCH] fix: move claudeArgs to end of args array for slash command support Slash commands like /help weren't working because the prompt wasn't at the end of the CLI args where Claude expects it. --- src/claude/claudeLocal.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/claude/claudeLocal.ts b/src/claude/claudeLocal.ts index d4f7ac0b..ba3bfdf4 100644 --- a/src/claude/claudeLocal.ts +++ b/src/claude/claudeLocal.ts @@ -199,17 +199,17 @@ export async function claudeLocal(opts: { args.push('--allowedTools', opts.allowedTools.join(',')); } - // Add custom Claude arguments - if (opts.claudeArgs) { - args.push(...opts.claudeArgs) - } - // Add hook settings for session tracking (when available) if (opts.hookSettingsPath) { args.push('--settings', opts.hookSettingsPath); logger.debug(`[ClaudeLocal] Using hook settings: ${opts.hookSettingsPath}`); } + // Add custom Claude arguments LAST (so prompt/slash commands are at the end) + if (opts.claudeArgs) { + args.push(...opts.claudeArgs) + } + if (!claudeCliPath || !existsSync(claudeCliPath)) { throw new Error('Claude local launcher not found. Please ensure HAPPY_PROJECT_ROOT is set correctly for development.'); }