Custom tool loading crashes on transient dependency install failures #9433

Open
opened 2026-02-16 18:12:26 -05:00 by yindo · 1 comment
Owner

Originally created by @sauerdaniel on GitHub (Feb 15, 2026).

Originally assigned to: @thdxr on GitHub.

Problem

  1. Config.waitForDependencies() runs bun install once and silently swallows failures. On Windows, transient file locks can cause this to fail.
  2. ToolRegistry.getCustom() directly imports each tool module without isolation — one broken custom tool crashes loading for all custom tools.

Expected behavior

  • Transient dependency install failures should be retried before giving up
  • A broken custom tool module should not prevent other tools from loading

Environment

  • Primarily affects Windows (file lock contention during bun install)
  • Also affects any environment where a custom tool module has a syntax/runtime error
Originally created by @sauerdaniel on GitHub (Feb 15, 2026). Originally assigned to: @thdxr on GitHub. ## Problem 1. `Config.waitForDependencies()` runs `bun install` once and silently swallows failures. On Windows, transient file locks can cause this to fail. 2. `ToolRegistry.getCustom()` directly imports each tool module without isolation — one broken custom tool crashes loading for all custom tools. ## Expected behavior - Transient dependency install failures should be retried before giving up - A broken custom tool module should not prevent other tools from loading ## Environment - Primarily affects Windows (file lock contention during `bun install`) - Also affects any environment where a custom tool module has a syntax/runtime error
yindo added the windows label 2026-02-16 18:12:26 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 15, 2026):

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

  • #13365: Custom Tools Failing with TypeError (also involves Windows and custom tool failures)
  • #12336: Bug: Zod TypeError when loading custom tools from .opencode directory (also involves custom tool loading failures)

Please verify if these are the same root cause or different issues before proceeding.

@github-actions[bot] commented on GitHub (Feb 15, 2026): This issue might be a duplicate of or related to existing issues. Please check: - #13365: Custom Tools Failing with TypeError (also involves Windows and custom tool failures) - #12336: Bug: Zod TypeError when loading custom tools from .opencode directory (also involves custom tool loading failures) Please verify if these are the same root cause or different issues before proceeding.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9433