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
When Provider.resolveSDK throws InitError({providerID}, {cause: e}) (packages/opencode/src/provider/provider.ts:1522), the session pipeline catches it and re-emits via new NamedError.Unknown({message: err.message}).toObject(). err.cause and stack are discarded.
This makes CI failures undebuggable. The real failure (NPM install error, missing peer dep, network failure, etc.) lives on err.cause and is silently dropped.
Expected: preserve the original named error (name: "ProviderInitError") and pass cause chain through to the consumer, e.g.
Observe CI log shows only UnknownError: ProviderInitError — the underlying InstallFailedError and its cause are gone.
Operating System
Linux (GitHub Actions ubuntu-latest), macOS 25.4
Impact
Every cf-ai-gateway repo that hit the 1.14.x install regression saw an unactionable error. Multiple Cloudflare repos (workers-sdk, workerd, kumo, containers, vinext) pinned older opencode versions without an upstream issue because the symptom was not diagnosable.
Description
When
Provider.resolveSDKthrowsInitError({providerID}, {cause: e})(packages/opencode/src/provider/provider.ts:1522), the session pipeline catches it and re-emits vianew NamedError.Unknown({message: err.message}).toObject().err.causeand stack are discarded.Consumers (e.g.
cli/cmd/github.ts:986) only see:This makes CI failures undebuggable. The real failure (NPM install error, missing peer dep, network failure, etc.) lives on
err.causeand is silently dropped.Expected: preserve the original named error (
name: "ProviderInitError") and passcausechain through to the consumer, e.g.and serialize cause chain in
toObject(). Or stop re-wrappingProviderInitErrorasUnknownErrorat the session boundary.OpenCode version
1.14.25 (also reproduces on 1.14.22)
Steps to reproduce
resolveSDK— easiest path:cloudflare-ai-gateway/openai/gpt-5.4on a fresh CI runner (seeloadOptions(dir)inNpm.addreify path fails on CI runners → silent ProviderInitError for dynamic providers #24431)UnknownError: ProviderInitError— the underlyingInstallFailedErrorand itscauseare gone.Operating System
Linux (GitHub Actions ubuntu-latest), macOS 25.4
Impact
Every cf-ai-gateway repo that hit the 1.14.x install regression saw an unactionable error. Multiple Cloudflare repos (workers-sdk, workerd, kumo, containers, vinext) pinned older opencode versions without an upstream issue because the symptom was not diagnosable.