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
Slow startup caused by large unconditional static import tree #24868
OpenCode cold starts are noticeably slow, even when running e.g. --version, --help, or other simple CLI-only subcommands.
My benchmarking revealed a large delay coming from import resolution. The CLI entrypoint index.ts file has 41 imports. More than half of those are subcommand handlers, of which only one would ever be called at a time.
Plugins
None
OpenCode version
1.14.29
Steps to reproduce
Run time opencode --version on a relatively modern computer
...wait for more than half a second for the command to finish
Activity
antonok-edm commentedon Apr 29, 2026
My proposal is to convert all
Commandimports from theindex.tsentrypoint into dynamicimport()s that are only pulled in when invoked by the CLI.github-actions commentedon Jul 5, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.