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
{{ message }}
Repository navigation
opencode auth login crashes on Linux without xdg-open #52548
On a Linux box without xdg-utils (SSH, containers), opencode auth login prints the authorization URL and then exits with Error: Executable not found in $PATH: "xdg-open" and a stack trace, so the login can't be finished.
openUrl in packages/cli/src/ui/prompt.ts wraps the launch in Effect.promise(...).pipe(Effect.ignore). Effect.promise turns the rejection into a defect, and Effect.ignore doesn't catch defects. The compiled binary has no bundled xdg-open, so open falls back to the system one. Someone posted the same trace in #49446 (that issue is about opencode web on v1).
◇ Authorization started
● Enter code: XXXX-XXXX
● https://opencode.ai/console/device?user_code=XXXX-XXXX&client_id=opencode-cli
Error: Executable not found in $PATH: "xdg-open"
at spawn (unknown)
at spawn (node:child_process:721:35)
at cli.prompt.open-url (/$bunfs/root/chunk-v0je57yf.js:6:7614)
at cli.auth.login.oauth (/$bunfs/root/chunk-v0je57yf.js:6:6699)
at cli.auth.login.authenticate (/$bunfs/root/chunk-v0je57yf.js:6:5199)
at cli.auth.login.run (/$bunfs/root/chunk-v0je57yf.js:6:4663)
Activity
rkoten commentedon Oct 11, 2026
Reproducing the same issue on 2.0.26 on a VPS via SSH.
A combination of these two solutions worked for me to authenticate with my OpenAI account via browser:
guneet-xyz commentedon Oct 12, 2026
While #52678 gets merged, temporary workaround is to create a dummy 'xdg-open'.
heymaaz commentedon Oct 14, 2026
Really need this to be fixed for my plugin.