CLI hangs upon running auth login #1112

Closed
opened 2026-02-16 17:29:29 -05:00 by yindo · 7 comments
Owner

Originally created by @cedws on GitHub (Aug 4, 2025).

Originally assigned to: @thdxr on GitHub.

I've freshly installed OpenCode and now want to configure a provider.
I'm running opencode auth login but nothing happens - it prints out one line then hangs forever.

cedwards@mars ~ [SIGINT]> opencode auth login

┌  Add credential
Originally created by @cedws on GitHub (Aug 4, 2025). Originally assigned to: @thdxr on GitHub. I've freshly installed OpenCode and now want to configure a provider. I'm running `opencode auth login` but nothing happens - it prints out one line then hangs forever. ``` cedwards@mars ~ [SIGINT]> opencode auth login ┌ Add credential ```
yindo closed this issue 2026-02-16 17:29:30 -05:00
Author
Owner

@cedws commented on GitHub (Aug 4, 2025):

Ran with --print-logs but nothing useful is printed. Ran with --log-level debug before realising it has to be DEBUG but that doesn't print anything either.

@cedws commented on GitHub (Aug 4, 2025): Ran with `--print-logs` but nothing useful is printed. Ran with `--log-level debug` before realising it has to be `DEBUG` but that doesn't print anything either.
Author
Owner

@thdxr commented on GitHub (Aug 4, 2025):

print logs prints nothing? can i see it

@thdxr commented on GitHub (Aug 4, 2025): print logs prints nothing? can i see it
Author
Owner

@cedws commented on GitHub (Aug 4, 2025):

cedwards@mars ~ [1]> opencode auth login --print-logs --log-level DEBUG
INFO  2025-08-05T02:57:12 +49ms service=default version=0.3.128 args=["auth","login","--print-logs","--log-level","DEBUG"] opencode

┌  Add credential
INFO  2025-08-05T02:57:12 +0ms service=models.dev file={} refreshing
@cedws commented on GitHub (Aug 4, 2025): ``` cedwards@mars ~ [1]> opencode auth login --print-logs --log-level DEBUG INFO 2025-08-05T02:57:12 +49ms service=default version=0.3.128 args=["auth","login","--print-logs","--log-level","DEBUG"] opencode ┌ Add credential INFO 2025-08-05T02:57:12 +0ms service=models.dev file={} refreshing ```
Author
Owner

@Aditya-PS-05 commented on GitHub (Aug 5, 2025):

@thdxr , can you assign me this issue?

@Aditya-PS-05 commented on GitHub (Aug 5, 2025): @thdxr , can you assign me this issue?
Author
Owner

@geophpherie commented on GitHub (Aug 7, 2025):

Just installed for the first time today and thought I was seeing the same thing but if I waited long enough (75 seconds) something eventually appeared. Something slow with models.dev?

~ () ✘ opencode auth login --print-logs --log-level DEBUG
INFO  2025-08-07T20:08:51 +58ms service=default version=0.3.133 args=["auth","login","--print-logs","--log-level","DEBUG"] opencode

┌  Add credential
INFO  2025-08-07T20:08:51 +1ms service=models.dev file={} refreshing
ERROR 2025-08-07T20:10:06 +75034ms service=models.dev error={"code":"ConnectionRefused","path":"https://models.dev/api.json","errno":0} Failed to fetch models.dev
INFO  2025-08-07T20:10:06 +4ms service=models.dev file={} refreshing
│
◆  Select provider

│  Search: _
│  ● Anthropic (recommended)
│  ○ GitHub Copilot
│  ○ OpenAI
│  ○ Google
│  ○ OpenRouter
│  ○ Vercel AI Gateway
│  ○ Alibaba
│  ...
│  ↑/↓ to select • Enter: confirm • Type: to search
└
@geophpherie commented on GitHub (Aug 7, 2025): Just installed for the first time today and thought I was seeing the same thing but if I waited long enough (75 seconds) something eventually appeared. Something slow with `models.dev`? ```bash ~ () ✘ opencode auth login --print-logs --log-level DEBUG INFO 2025-08-07T20:08:51 +58ms service=default version=0.3.133 args=["auth","login","--print-logs","--log-level","DEBUG"] opencode ┌ Add credential INFO 2025-08-07T20:08:51 +1ms service=models.dev file={} refreshing ERROR 2025-08-07T20:10:06 +75034ms service=models.dev error={"code":"ConnectionRefused","path":"https://models.dev/api.json","errno":0} Failed to fetch models.dev INFO 2025-08-07T20:10:06 +4ms service=models.dev file={} refreshing │ ◆ Select provider │ Search: _ │ ● Anthropic (recommended) │ ○ GitHub Copilot │ ○ OpenAI │ ○ Google │ ○ OpenRouter │ ○ Vercel AI Gateway │ ○ Alibaba │ ... │ ↑/↓ to select • Enter: confirm • Type: to search └ ```
Author
Owner

@zsmatrix62 commented on GitHub (Aug 14, 2025):

same problem here:

~/.cache> opencode auth login --print-logs
INFO 2025-08-15T02:28:43 +46ms service=default version=0.5.1 args=["auth","login","--print-logs"] opencode
INFO 2025-08-15T02:28:43 +1ms service=app cwd=/Users/kylehuang/.cache creating
INFO 2025-08-15T02:28:43 +0ms service=app git

┌ Add credential
INFO 2025-08-15T02:28:43 +3ms service=models.dev file={} refreshing
ERROR 2025-08-15T02:28:49 +6009ms service=models.dev error={"code":"ConnectionRefused","path":"https://models.dev/api.json","errno":0} Failed to fetch models.dev
INFO 2025-08-15T02:28:49 +4ms service=models.dev file={} refreshing

◇ Select provider
│ ModelScope
INFO 2025-08-15T02:28:52 +3384ms service=app name=plugin registering service
INFO 2025-08-15T02:28:52 +0ms service=app name=config registering service
INFO 2025-08-15T02:28:52 +2ms service=config path=/Users/kylehuang/.config/opencode/config.json loading
INFO 2025-08-15T02:28:52 +1ms service=config path=/Users/kylehuang/.config/opencode/opencode.json loading
INFO 2025-08-15T02:28:52 +0ms service=config path=/Users/kylehuang/.config/opencode/opencode.jsonc loading
INFO 2025-08-15T02:28:52 +1ms service=config path=/users/kylehuang/.config/opencode/opencode.jsonc loading
INFO 2025-08-15T02:28:52 +2ms service=config agent={} mode={} plugin=[] username=kylehuang loaded
INFO 2025-08-15T02:28:52 +0ms service=plugin path=opencode-copilot-auth loading plugin
INFO 2025-08-15T02:28:52 +1ms service=bun pkg=opencode-copilot-auth version=latest installing package using Bun's default registry resolution
INFO 2025-08-15T02:28:52 +0ms service=bun cmd=["/Users/kylehuang/.opencode/bin/opencode","add","--force","--exact","--cwd","/Users/kylehuang/.cache/opencode","opencode-copilot-auth@latest"] cwd=/Users/kylehuang/.cache/opencode running
ERROR 2025-08-15T02:28:55 +2620ms service=models.dev error={"code":"ConnectionRefused","path":"https://models.dev/api.json","errno":0} Failed to fetch models.dev
INFO 2025-08-15T02:29:29 +33500ms service=bun code=1 stdout=bun add v1.2.19 (aad3abea)
stderr=Resolving dependencies
Resolved, downloaded and extracted [6]
error: ConnectionRefused downloading package manifest opencode-copilot-auth
done
ERROR 2025-08-15T02:29:29 +13ms service=default pkg=opencode-copilot-auth version=latest name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 fatal
Error: Unexpected error, check log file at for more details

@zsmatrix62 commented on GitHub (Aug 14, 2025): same problem here: ~/.cache> opencode auth login --print-logs INFO 2025-08-15T02:28:43 +46ms service=default version=0.5.1 args=["auth","login","--print-logs"] opencode INFO 2025-08-15T02:28:43 +1ms service=app cwd=/Users/kylehuang/.cache creating INFO 2025-08-15T02:28:43 +0ms service=app git ┌ Add credential INFO 2025-08-15T02:28:43 +3ms service=models.dev file={} refreshing ERROR 2025-08-15T02:28:49 +6009ms service=models.dev error={"code":"ConnectionRefused","path":"https://models.dev/api.json","errno":0} Failed to fetch models.dev INFO 2025-08-15T02:28:49 +4ms service=models.dev file={} refreshing │ ◇ Select provider │ ModelScope INFO 2025-08-15T02:28:52 +3384ms service=app name=plugin registering service INFO 2025-08-15T02:28:52 +0ms service=app name=config registering service INFO 2025-08-15T02:28:52 +2ms service=config path=/Users/kylehuang/.config/opencode/config.json loading INFO 2025-08-15T02:28:52 +1ms service=config path=/Users/kylehuang/.config/opencode/opencode.json loading INFO 2025-08-15T02:28:52 +0ms service=config path=/Users/kylehuang/.config/opencode/opencode.jsonc loading INFO 2025-08-15T02:28:52 +1ms service=config path=/users/kylehuang/.config/opencode/opencode.jsonc loading INFO 2025-08-15T02:28:52 +2ms service=config agent={} mode={} plugin=[] username=kylehuang loaded INFO 2025-08-15T02:28:52 +0ms service=plugin path=opencode-copilot-auth loading plugin INFO 2025-08-15T02:28:52 +1ms service=bun pkg=opencode-copilot-auth version=latest installing package using Bun's default registry resolution INFO 2025-08-15T02:28:52 +0ms service=bun cmd=["/Users/kylehuang/.opencode/bin/opencode","add","--force","--exact","--cwd","/Users/kylehuang/.cache/opencode","opencode-copilot-auth@latest"] cwd=/Users/kylehuang/.cache/opencode running ERROR 2025-08-15T02:28:55 +2620ms service=models.dev error={"code":"ConnectionRefused","path":"https://models.dev/api.json","errno":0} Failed to fetch models.dev INFO 2025-08-15T02:29:29 +33500ms service=bun code=1 stdout=bun add v1.2.19 (aad3abea) stderr=Resolving dependencies Resolved, downloaded and extracted [6] error: ConnectionRefused downloading package manifest opencode-copilot-auth done ERROR 2025-08-15T02:29:29 +13ms service=default pkg=opencode-copilot-auth version=latest name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 fatal Error: Unexpected error, check log file at for more details
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1112