You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like to use the VSCode Claude Code extension's native mode. This seems to kind of work with happy if you put it in for the "Claude Process Wrapper" configuration, but it's a bit janky, especially when it prompts for permissions, and around trying to switch back to local mode. Has anyone done this fully successfully?
Reacted by walaqi, LinkSpider, Marcos Loureiro, Tianyu Zhang and cola
Extension spawns happy.mjs via SDK query. happy exits immediately with:
From claude: <ext-dir>\resources\native-binary\claude.exe:1
MZx
SyntaxError: Invalid or unexpected token
at wrapSafe (node:internal/modules/cjs/loader:1692:18)
at Module._compile (node:internal/modules/cjs/loader:1735:20)
at Object..js (node:internal/modules/cjs/loader:1893:10)
at Module.load (node:internal/modules/cjs/loader:1481:32)
at Module._load (node:internal/modules/cjs/loader:1300:12)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
at node:internal/main/run_main_module:33:47
Node.js v24.12.0
The MZ is the PE header of claude.exe being parsed as JavaScript — i.e. node <path-to-claude.exe> was invoked somewhere.
What's notable
cli-1.1.7 changelog says "detect Claude Code native binary (2.1.113+)", and scripts/claude_version_utils.cjs → runClaudeCli() indeed has an .exe branch that spawns the binary directly (no Node involvement):
So happy's own launcher handles native binary correctly. The node <exe> invocation must be happening on a different code path.
Hypothesis
When the extension's wrapper invocation hits happy, happy dispatches to runClaude() (happy CLI default branch, index-q9G4ktSK.mjs:10682) — the full session orchestration, not a transparent pass-through. runClaude ultimately invokes @anthropic-ai/claude-agent-sdk's query() (imported at index-q9G4ktSK.mjs:14, called at :1239). The SDK has its own spawn logic for claude, and I suspect that path still does spawn('node', [claudePath, ...]) unconditionally — which explodes when claudePath is a native .exe.
This would match what @glasser originally described as "a bit janky" — it's not just permission prompts; core invocation breaks on any Windows / macOS arm64 / Linux box with @anthropic-ai/claude-code >= 2.1.113.
Secondary concern
Even setting the MZ error aside: dispatching extension-invoked happy to the full runClaude() orchestration seems wrong — it assumes TTY, interactive auth, daemon ensure, session create, etc. A VS Code extension wrapper invocation is non-interactive and expects claude stream-json protocol on stdio. Maybe wrapper mode warrants a dedicated code path that stays transparent and defers mobile sync to a side-channel?
Activity
jonnycook commentedon Jan 29, 2026
Curious about this as well
walaqi commentedon Feb 2, 2026
looking forward to the release.
ruushu commentedon Feb 10, 2026
+1 for VSCode extension support!
I'm also very interested in using Happy with the VSCode Claude Code extension.
My use case:
The current workaround (VS Code Tunnel) requires my Mac to stay awake, which isn't ideal.
Would love to see native VSCode extension integration!
cxhttt233 commentedon Feb 12, 2026
+1
Llugaes commentedon Apr 30, 2026
Hit this with
2.1.122Windows extension +happy-coder@1.1.8today.Wanted to share a concrete failure mode and trace in case it helps.
Setup
claude-codeextension 2.1.122 (bundles nativeclaude.exe, nocli.js)happy-coder@1.1.8installed globallysettings.json:"claudeCode.claudeProcessWrapper": "<path-to-happy.mjs>"Symptom
Extension spawns
happy.mjsvia SDK query. happy exits immediately with:The
MZis the PE header ofclaude.exebeing parsed as JavaScript — i.e.node <path-to-claude.exe>was invoked somewhere.What's notable
cli-1.1.7changelog says "detect Claude Code native binary (2.1.113+)", andscripts/claude_version_utils.cjs → runClaudeCli()indeed has an.exebranch thatspawns the binary directly (no Node involvement):So happy's own launcher handles native binary correctly. The
node <exe>invocation must be happening on a different code path.Hypothesis
When the extension's wrapper invocation hits happy, happy dispatches to
runClaude()(happy CLI default branch,index-q9G4ktSK.mjs:10682) — the full session orchestration, not a transparent pass-through.runClaudeultimately invokes@anthropic-ai/claude-agent-sdk'squery()(imported atindex-q9G4ktSK.mjs:14, called at:1239). The SDK has its own spawn logic for claude, and I suspect that path still doesspawn('node', [claudePath, ...])unconditionally — which explodes whenclaudePathis a native.exe.This would match what @glasser originally described as "a bit janky" — it's not just permission prompts; core invocation breaks on any Windows / macOS arm64 / Linux box with
@anthropic-ai/claude-code >= 2.1.113.Secondary concern
Even setting the MZ error aside: dispatching extension-invoked happy to the full
runClaude()orchestration seems wrong — it assumes TTY, interactive auth, daemon ensure, session create, etc. A VS Code extension wrapper invocation is non-interactive and expects claude stream-json protocol on stdio. Maybe wrapper mode warrants a dedicated code path that stays transparent and defers mobile sync to a side-channel?Environment
happy-coder@1.1.8@anthropic-ai/claude-code@2.1.123(native installer, binary distribution)2.1.122(bundles its own native binary)Happy to test patches / gather more traces if useful.