Skip to content

Fix Copilot auth detection in macOS release builds#151

Merged
Redth merged 2 commits intomainfrom
redth/fix-copilot-release-auth
Apr 17, 2026
Merged

Fix Copilot auth detection in macOS release builds#151
Redth merged 2 commits intomainfrom
redth/fix-copilot-release-auth

Conversation

@Redth
Copy link
Copy Markdown
Owner

@Redth Redth commented Apr 17, 2026

Signed and notarized macOS builds could incorrectly report that the Copilot CLI was missing or that the user was logged out, even when the CLI and auth were already valid. This happens because GUI-launched apps do not inherit the same shell environment as Terminal, so Copilot startup was sometimes running with the wrong PATH/HOME context and stale availability state.

This change hardens the Copilot integration by:

  • resolving the CLI from bundled and common macOS install locations instead of relying on the inherited PATH alone
  • passing a stable user-scoped environment and writable working directory into the SDK-launched Copilot process
  • serializing connect/availability checks to avoid stale or overlapping state during retries
  • making the UI "Check Again" path perform a real refresh instead of reusing the first cached failure
  • adding focused tests around CLI path resolution and launch environment construction

This is a behavior fix only; no user-facing workflow changes are intended beyond making Connect behave reliably in release builds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Redth Redth merged commit a7e0b3b into main Apr 17, 2026
16 checks passed
@Redth Redth deleted the redth/fix-copilot-release-auth branch April 17, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant