Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
Description
After updating OpenCode on macOS to 1.3.17, both the desktop app and the CLI started failing with:
unknown certificate verification error
The failing request in the desktop log is specifically:
https://chatgpt.com/backend-api/codex/responses
I was able to reproduce this on macOS with Clash enabled (required for connectivity in my environment). Rolling the CLI back to 1.3.16 on the same machine/network restored normal CLI behavior.
Why this looks like a regression
- OpenCode 1.3.17 desktop app fails consistently with:
UNKNOWN_CERTIFICATE_VERIFICATION_ERROR
- The desktop log shows:
providerID=openaipath=https://chatgpt.com/backend-api/codex/responses
- System TLS to
chatgpt.comis fine on the same machine:curl -I https://chatgpt.comsucceeds (HTTP 403 from Cloudflare challenge, but TLS is valid)openssl s_clientshows a normal chain forchatgpt.com
- I tested multiple environment configurations on macOS:
BUN_OPTIONS=--use-system-ca- removing
NODE_EXTRA_CA_CERTS/SSL_CERT_FILE - explicitly exporting a PEM bundle generated from macOS keychains
- Even after fixing the shell/launchd environment so the updated OpenCode sidecar inherited the intended values, 1.3.17 app still failed.
- On the same Mac, I rolled the standalone CLI back from 1.3.17 to 1.3.16, and 1.3.16 CLI works.
This strongly suggests a 1.3.17 regression in the TLS/runtime path used for the OpenAI/Codex request.
OpenCode version
- Broken: 1.3.17
- Working after rollback (CLI): 1.3.16
Steps to reproduce
- On macOS, install/update OpenCode to 1.3.17
- Use OpenAI/Codex from OpenCode in an environment where network access goes through a local proxy/Clash setup
- Send a message / trigger a request to the OpenAI provider
- Observe:
unknown certificate verification error
Relevant log snippet
From ~/Library/Logs/ai.opencode.desktop/opencode-desktop_2026-04-06_22-15-50.log:
ERROR service=llm providerID=openai modelID=gpt-5.4 ... error={"error":{"code":"UNKNOWN_CERTIFICATE_VERIFICATION_ERROR","path":"https://chatgpt.com/backend-api/codex/responses","errno":0}} stream error
ERROR service=session.processor error=unknown certificate verification error process
Additional debugging notes
- Desktop parent process had:
BUN_OPTIONS=--use-system-ca
- Desktop sidecar (
opencode-cli serve) also inherited the expected environment after cleanup, including tests with:NODE_USE_SYSTEM_CA=1- no stale
/etc/ssl/cert.pemoverrides - and later an explicit CA PEM bundle generated from macOS keychains
- Despite that, 1.3.17 app still failed.
- The same machine could still do TLS to
chatgpt.comusing system tools. - After rolling CLI back to 1.3.16, the CLI worked again.
Operating System
macOS 26.4 (Apple Silicon)
Terminal
zsh
Reacted by Mikhail Probochkin
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Apr 6, 2026
This issue might be a duplicate of existing issues. Please check:
unknown certificate verification error(Windows, but same error code)unknown certificate verification erroron v1.1.53service=models.devcontextIf your issue is distinct (specifically a 1.3.17 regression with a proxy/Clash setup on macOS), please confirm that and a maintainer can separate it.
atongrun commentedon Apr 6, 2026
Additional observation after more testing on macOS:
This does not look like a 100% deterministic failure.
With the CLI switched back to 1.3.17, I observed:
unknown certificate verification errorunknown certificate verification errorSo the problem appears to be intermittent rather than a hard permanent failure.
That makes it look more like an unstable TLS / certificate verification path under the current runtime + proxy/network conditions, rather than a simple always-broken configuration.
In other words:
This may be useful if you're trying to narrow it down to a regression in runtime TLS handling, connection reuse, proxy interaction, or certificate chain selection.
atongrun commentedon Apr 6, 2026
Correction / update after further testing:
This now looks less like a 1.3.17-only regression and more like an intermittent macOS TLS/certificate verification problem across multiple versions in this proxy-dependent setup.
Additional observation:
unknown certificate verification error, but retries can eventually succeedSo the more accurate summary is:
That suggests something closer to unstable TLS verification / proxy interaction / connection reuse behavior rather than a single permanently broken release.
[-]macOS 1.3.17 regression: UNKNOWN_CERTIFICATE_VERIFICATION_ERROR for OpenAI/Codex endpoint, 1.3.16 CLI works[/-][+]macOS intermittent UNKNOWN_CERTIFICATE_VERIFICATION_ERROR for OpenAI/Codex endpoint under proxy conditions[/+]yaosongding commentedon Apr 8, 2026
I get the same problem, and I saw this comment, I disconnected my tailscale and it's fixed! Still don't understand the root cause but I decided to move on.
leowio commentedon May 25, 2026
This issue exists on Arch Linux too
github-actions commentedon Jul 25, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.