From 2f42a8bc285228eadcdedd88d91601581724d5cb Mon Sep 17 00:00:00 2001 From: Charlie Zong Date: Thu, 30 Jul 2026 11:56:26 -0700 Subject: [PATCH] fix(cli): exit after printing the version instead of opening a session --version printed the Happy version and then deliberately fell through to auth, daemon startup and runClaude. On a machine without stored credentials that means a version query drops into the interactive login picker. Exit right after printing, the same way the --help branch above already does. Fixes #1532 --- packages/happy-cli/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/happy-cli/src/index.ts b/packages/happy-cli/src/index.ts index 114a0de18f..2d1e4fbebd 100644 --- a/packages/happy-cli/src/index.ts +++ b/packages/happy-cli/src/index.ts @@ -769,7 +769,9 @@ ${chalk.bold.cyan('Claude Code Options (from `claude --help`):')} // Show version if (showVersion) { console.log(`happy version: ${packageJson.version}`) - // Don't exit - continue to pass --version to Claude Code + // Exit here, the same way the --help branch above does. Falling through runs + // auth, starts the daemon and opens a session just to answer a version query. + process.exit(0) } // Normal flow - auth and machine setup