Skip to content

First launch can stall on project .opencode dependency install #47212

Description

@Seigiard

Description

On the first OpenCode launch in a fresh git worktree containing .opencode/skills, the TUI stayed completely blank and could not accept input. The OpenCode process remained alive.

The last logs for that run were the config paths loaded during bootstrapping; the usual LSP and formatter initialization logs never appeared. During the stall, OpenCode generated .opencode/package.json and node_modules, then wrote .opencode/package-lock.json 61 seconds after bootstrap began.

opencode --pure --print-logs --log-level DEBUG debug config later completed the same bootstrap in 216 ms. After the generated dependency files existed, a normal non-pure run completed in 254 ms.

This appears to be the per-directory Npm.install() for @opencode-ai/plugin blocking Plugin.init() through Config.waitForDependencies() whenever local plugins exist. The first launch provides no progress or timeout while waiting.

Expected behavior: the TUI should render promptly, or show dependency-install progress and fail within a bounded time.

Related issues:

Plugins

Four local file plugins under ~/.config/opencode/plugins: herdr-agent-state.js, herdr-worktree-identity.ts, test-oracle-guard.ts, and zsh-reserved-name-guard.ts.

OpenCode version

1.18.20

Steps to reproduce

  1. Configure at least one local file plugin under ~/.config/opencode/plugins.
  2. Open a fresh checkout or git worktree containing .opencode/skills, with no generated .opencode/package.json, package-lock.json, or node_modules yet.
  3. Run opencode in that worktree.
  4. Observe the blank TUI while the per-directory dependencies are installed.
  5. Start OpenCode again after the dependency files exist; startup is fast.

Screenshot and/or share link

The affected pane was entirely blank, and no share session was created.

Operating System

macOS 14.7.4

Terminal

Herdr 0.8.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions