[PR #5039] fix(tui): pass init bootstrap to checkUpgrade #11216

Closed
opened 2026-02-16 18:16:01 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5039

State: closed
Merged: No


Problem

Race condition in TUI mode: checkUpgrade triggers Instance.provide() without init, caching an uninitialized instance. This prevents subsequent requests from running the initialization logic, skipping plugin config hooks.

Solution

Pass InstanceBootstrap to checkUpgrade to ensure the instance is correctly initialized upon creation.

Reproduction

  1. Start TUI mode with a plugin configured.
  2. Observe that plugin config hooks are not triggered during startup.

Related: #4846

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5039 **State:** closed **Merged:** No --- ### Problem Race condition in TUI mode: `checkUpgrade` triggers `Instance.provide()` without `init`, caching an uninitialized instance. This prevents subsequent requests from running the initialization logic, skipping plugin config hooks. ### Solution Pass `InstanceBootstrap` to `checkUpgrade` to ensure the instance is correctly initialized upon creation. ### Reproduction 1. Start TUI mode with a plugin configured. 2. Observe that plugin config hooks are not triggered during startup. Related: #4846
yindo added the pull-request label 2026-02-16 18:16:01 -05:00
yindo closed this issue 2026-02-16 18:16:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11216