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
I'm trying to get started with opencode. When I try to login with my Claude Pro account, i get an error "Invalid code" after pasting the auth token into my terminal. The steps I'm performing:
opencode auth login
Select Anthropic
Select Claude Pro/Max (my browser opens for OAuth flow)
I click Authorize on claude.ai consent screen
I'm redirected to console.anthropic.com and presented with a code
Is there some relationship between claude.ai accounts and console.anthropic.com accounts? Mine seem independent even though I'm using the same email for both. I actually used Google auth with both of them.
I originally signed up on claude.ai for a free account with a Google login. I then upgraded to Claude Pro. (I still did not have a console.anthropic.com account at this point).
I created a console.anthropic.com account while troubleshooting this issue, also using Google login. As far as I can tell this has no link to the claude.ai account.
@thdxr Not sure if any of this information helps shed light on what could be going on.
yeah we've seen this - console.anthropic.com accounts seem to be treated totally differently. they can't have pro/max acocunts but i've heard they're fixing this
but i'm not sure why this means your code is invalid
I'm not sure how this works under the hood, but I can tell you there's an aggressive z-scaler setup on the machine I'm using here. I was able to actually go through the oauth flow on the anthropic side and get the token though. Could it be related to z-scaler at all?
I was able to get it working with no issue on my personal laptop (Arch Linux, opencode installed from AUR) with the same Claude account.
My work machine (Macbook Pro) is where it isn't working, and an additional variable here is a company VPN (ZScaler). Zcaler does SSL inspection and often we have to explicitly set custom CA certificates for various tooling in order for things to work. Is that an option here?
@thdxr No I have that exported already in my system for other Node-based tooling and it still doesn't work.
However, I just tried exporting the standard SSL_CERT_FILE environment variable and providing the path to my company's CA cert bundle, and this worked.
This might be a good general recommendation for those users behind corporate proxies/VPNs that do SSL inspection.
Activity
thdxr commentedon Jun 26, 2025
hm it's working for me - can anyone else confirm the issue?
blytheaw commentedon Jun 26, 2025
Is there some relationship between claude.ai accounts and console.anthropic.com accounts? Mine seem independent even though I'm using the same email for both. I actually used Google auth with both of them.
I originally signed up on claude.ai for a free account with a Google login. I then upgraded to Claude Pro. (I still did not have a console.anthropic.com account at this point).
I created a console.anthropic.com account while troubleshooting this issue, also using Google login. As far as I can tell this has no link to the claude.ai account.
@thdxr Not sure if any of this information helps shed light on what could be going on.
thdxr commentedon Jun 26, 2025
yeah we've seen this - console.anthropic.com accounts seem to be treated totally differently. they can't have pro/max acocunts but i've heard they're fixing this
but i'm not sure why this means your code is invalid
citypaul commentedon Jul 2, 2025
I'm seeing this same issue at the moment.
citypaul commentedon Jul 2, 2025
I'm not sure how this works under the hood, but I can tell you there's an aggressive z-scaler setup on the machine I'm using here. I was able to actually go through the oauth flow on the anthropic side and get the token though. Could it be related to z-scaler at all?
blytheaw commentedon Jul 2, 2025
I was able to get it working with no issue on my personal laptop (Arch Linux, opencode installed from AUR) with the same Claude account.
My work machine (Macbook Pro) is where it isn't working, and an additional variable here is a company VPN (ZScaler). Zcaler does SSL inspection and often we have to explicitly set custom CA certificates for various tooling in order for things to work. Is that an option here?
thdxr commentedon Jul 3, 2025
if you add the node env for ca cert does it work? NODE_EXTRA_CA_CERTS=/path/
blytheaw commentedon Jul 3, 2025
@thdxr No I have that exported already in my system for other Node-based tooling and it still doesn't work.
However, I just tried exporting the standard SSL_CERT_FILE environment variable and providing the path to my company's CA cert bundle, and this worked.
This might be a good general recommendation for those users behind corporate proxies/VPNs that do SSL inspection.
bkilshaw commentedon Jul 4, 2025
I'm running into the same issue here and I'm not connected to a VPN.
Merge pull request anomalyco#428 from zdocapp/zh-CN-pr
fix: pause polling when hidden and backoff server checks (anomalyco#428)