fix(config): make custom tool dependency install and loading resilient#13708
fix(config): make custom tool dependency install and loading resilient#13708sauerdaniel wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: I found a potential duplicate PR:
This PR may be a related or overlapping fix. You should check if #12270 was already merged or if it's still open and addresses the same problem. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Re: potential duplicate with #12270 — there's partial overlap on If #12270 merges first, I'll rebase to keep only the |
8c4ed40 to
886e49c
Compare
886e49c to
3425b6c
Compare
Summary
Improve robustness of custom tool loading by handling transient dependency install failures and broken tool modules gracefully.
Problem
Config.waitForDependencies()runsbun installonce and silently swallows failures, which can fail transiently on Windows due to file locks.ToolRegistry.getCustom()directly imports each tool module; one broken custom tool can crash loading for all custom tools.Solution
Changes
packages/opencode/src/config/config.tsbun installon Windows before giving uppackages/opencode/src/tool/registry.tsTesting
AI-Assisted
Yes
Fixes #13784