How to debug long startup times? #3508

Closed
opened 2026-02-16 17:40:24 -05:00 by yindo · 3 comments
Owner

Originally created by @JosXa on GitHub (Dec 12, 2025).

Description

As per https://github.com/sst/opencode/issues/5450, I cannot view any opencode logs.

Therefore, I'm running pretty blindly when debugging this:

https://github.com/user-attachments/assets/6adaba0a-4f74-428d-83ef-aa0b7a2976f1

I presume it has something to do with my NPM package configs:

  "autoupdate": true,
  "plugin": [
    // https://github.com/jenslys/opencode-gemini-auth?tab=readme-ov-file
    "opencode-gemini-auth",
    "@tarquinen/opencode-dcp@0.4.17"
  ],

But even my bisecting didn't really help much here or couldn't fix the problem reliably.

Right now, on WSL it's fast with the same configuration - but it has also been reproducibly slow there in the past!

https://github.com/user-attachments/assets/4d80eb3b-6830-4492-ae80-8595edcceb81

Any help would be appreciated, this startup time is unbearable :)

OpenCode version

1.0.50, has been bad since ~1.0.37 or so

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Originally created by @JosXa on GitHub (Dec 12, 2025). ### Description ~As per https://github.com/sst/opencode/issues/5450, I cannot view any opencode logs.~ ~Therefore, I'm running pretty blindly when debugging this:~ https://github.com/user-attachments/assets/6adaba0a-4f74-428d-83ef-aa0b7a2976f1 I presume it has something to do with my NPM package configs: ```json "autoupdate": true, "plugin": [ // https://github.com/jenslys/opencode-gemini-auth?tab=readme-ov-file "opencode-gemini-auth", "@tarquinen/opencode-dcp@0.4.17" ], ``` But even my bisecting didn't really help much here or couldn't fix the problem reliably. Right now, on WSL it's fast with the same configuration - **but it has also been reproducibly slow there in the past!** https://github.com/user-attachments/assets/4d80eb3b-6830-4492-ae80-8595edcceb81 Any help would be appreciated, this startup time is unbearable :) ### OpenCode version 1.0.50, has been bad since ~1.0.37 or so ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System Windows 11 ### Terminal Windows Terminal
yindo added the opentuibug labels 2026-02-16 17:40:24 -05:00
yindo closed this issue 2026-02-16 17:40:25 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 12, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #5450: No OC logs on Windows - Directly mentioned in your issue, preventing debugging
  • #5361: TUI freezes for ~10 seconds periodically on WSL2 (regression in v1.0.129) - If you're on WSL2, this could cause the startup slowness
  • #5338: Opencode becomes stuck on start if internet connection is not stable - Could cause long startup times during initialization
  • #5363: opencode eating 70gb of memory - High memory usage can cause slow startup/performance

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 12, 2025): This issue might be a duplicate of existing issues. Please check: - #5450: No OC logs on Windows - Directly mentioned in your issue, preventing debugging - #5361: TUI freezes for ~10 seconds periodically on WSL2 (regression in v1.0.129) - If you're on WSL2, this could cause the startup slowness - #5338: Opencode becomes stuck on start if internet connection is not stable - Could cause long startup times during initialization - #5363: opencode eating 70gb of memory - High memory usage can cause slow startup/performance Feel free to ignore if none of these address your specific case.
Author
Owner

@JosXa commented on GitHub (Dec 12, 2025):

Solved:

Specifying no version for the opencode-gemini-auth plugin caused this --force add:

INFO  2025-12-12T20:46:56 +4ms service=default directory=D:\projects bootstrapping
INFO  2025-12-12T20:46:56 +5ms service=config path=C:\Users\josch\.config\opencode\config.json loading
INFO  2025-12-12T20:46:56 +12ms service=config path=C:\Users\josch\.config\opencode\opencode.json loading
INFO  2025-12-12T20:46:56 +1ms service=config path=C:\Users\josch\.config\opencode\opencode.jsonc loading
INFO  2025-12-12T20:46:56 +2ms service=bun cmd=["C:\\Users\\josch\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","add","@opencode-ai/plugin@1.0.150","--exact"] cwd=C:\Users\josch\.config\opencode running
INFO  2025-12-12T20:46:56 +39ms service=bun code=0 stdout=bun add v1.3.3 (274e01c7)

installed @opencode-ai/plugin@1.0.150

[13.00ms] done
 stderr=[0.20ms] ".env"
Saved lockfile
 done

Since I found where the logs are, this was easy to solve. Just had to change it to "opencode-gemini-auth@1.2.0",

@JosXa commented on GitHub (Dec 12, 2025): Solved: Specifying no version for the `opencode-gemini-auth` plugin caused this `--force` add: ``` INFO 2025-12-12T20:46:56 +4ms service=default directory=D:\projects bootstrapping INFO 2025-12-12T20:46:56 +5ms service=config path=C:\Users\josch\.config\opencode\config.json loading INFO 2025-12-12T20:46:56 +12ms service=config path=C:\Users\josch\.config\opencode\opencode.json loading INFO 2025-12-12T20:46:56 +1ms service=config path=C:\Users\josch\.config\opencode\opencode.jsonc loading INFO 2025-12-12T20:46:56 +2ms service=bun cmd=["C:\\Users\\josch\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","add","@opencode-ai/plugin@1.0.150","--exact"] cwd=C:\Users\josch\.config\opencode running INFO 2025-12-12T20:46:56 +39ms service=bun code=0 stdout=bun add v1.3.3 (274e01c7) installed @opencode-ai/plugin@1.0.150 [13.00ms] done stderr=[0.20ms] ".env" Saved lockfile done ``` Since I found where the logs are, this was easy to solve. Just had to change it to `"opencode-gemini-auth@1.2.0",`
Author
Owner

@ta3pks commented on GitHub (Jan 28, 2026):

where did you read the logs from im having similar issues no logs anywhere @JosXa

@ta3pks commented on GitHub (Jan 28, 2026): where did you read the logs from im having similar issues no logs anywhere @JosXa
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3508