Code tab unresponsive: Electron env vars (OPERON_SANDBOXED_NETWORK) break bundled CLI

Resolved 💬 3 comments Opened Apr 10, 2026 by ryanhvaughn Closed Apr 10, 2026

Summary

The Code tab in Claude Desktop silently fails — user sends a message, gets no response. The Chat and Co-Work tabs work fine. The CLI works fine from Terminal.

Root Cause

When Claude Desktop (Electron) spawns the bundled CLI binary for the Code tab, it inherits Electron environment variables — specifically OPERON_SANDBOXED_NETWORK=1. This blocks the Bun binary's network access, causing it to crash instantly with error: An unknown error occurred (Unexpected) (exit code 1, zero seconds, no output).

Additional Issue After macOS Updates

On recent macOS versions (Darwin 25.4.0 / macOS Tahoe), code signature enforcement is stricter. If users attempt to work around the env var issue by wrapping the binary, macOS will SIGKILL the process (exit code 137) if the binary's filename doesn't match its original code signature.

Environment

  • macOS Tahoe (Darwin 25.4.0)
  • Claude Desktop (latest)
  • Bundled CLI version: 2.1.92
  • Architecture: arm64 (Apple Silicon)

Current Workaround

A shell wrapper that unsets the Electron env vars before exec-ing the original binary, with an ad-hoc re-sign step:

DIR=~/Library/Application\ Support/Claude/claude-code/VERSION/claude.app/Contents/MacOS
mv "$DIR/claude" "$DIR/claude.real"
codesign --force --sign - "$DIR/claude.real"
cat > "$DIR/claude" << 'WRAPPER'
#!/bin/bash
DIR="$(dirname "$0")"
cd "$HOME" 2>/dev/null || cd /tmp
unset OPERON_SANDBOXED_NETWORK
unset ELECTRON_RUN_AS_NODE
unset ELECTRON_NO_ASAR
unset NODE_OPTIONS
exec "$DIR/claude.real" "$@"
WRAPPER
chmod +x "$DIR/claude"

This breaks on every CLI auto-update and every OS update that tightens signature enforcement.

Suggested Fix

Strip OPERON_SANDBOXED_NETWORK (and other Electron-internal env vars) from the child process environment before spawning the Code tab CLI binary. The CLI needs network access to function — inheriting the Electron sandbox restriction is unintentional.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗