Skip to content

Fix Tailscale peer discovery in notarized builds#2

Merged
andyhtran merged 1 commit intomainfrom
fix-tailscale
Apr 30, 2026
Merged

Fix Tailscale peer discovery in notarized builds#2
andyhtran merged 1 commit intomainfrom
fix-tailscale

Conversation

@andyhtran
Copy link
Copy Markdown
Owner

Summary

  • Notarized release was silently returning an empty Tailscale peer list (visible in v0.3.0 production install)
  • Root cause: the bundled Tailscale binary detects context — from a notarized app's subprocess (no TTY) it relaunches the GUI instead of running as CLI, so peer JSON never came back. See tailscale/tailscale#16063 and #7140
  • Setting `TAILSCALE_BE_CLI=1` in the subprocess env forces CLI mode
  • Bonus: `runShell` now accepts an optional env dict; added an info log on successful Tailscale status with the peer count, so future regressions are diagnosable

Test plan

  • Local notarized RB build with the fix shows full peer list (reproduced prod conditions exactly: Developer ID + hardened runtime + same entitlements + notarized + stapled)
  • Ship 0.3.1, `brew reinstall --cask copycat`, verify SSH hosts → Tailscale peers shows entries
  • Existing local-only `runShell` callers (just `pbpaste`/etc in Broadcast) unaffected — env stays default when not passed

🤖 Generated with Claude Code

The bundled Tailscale binary detects whether to run as CLI or GUI based
on context. From a notarized app's subprocess (no TTY) it relaunches the
GUI instead of returning JSON, so peer discovery silently returned an
empty list. Setting TAILSCALE_BE_CLI=1 forces CLI mode.

See tailscale/tailscale#16063 and #7140.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@andyhtran andyhtran merged commit 8c6fd5f into main Apr 30, 2026
1 check passed
@andyhtran andyhtran deleted the fix-tailscale branch April 30, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant