Fixing "invalid token" in OpenCode: A Working Claude (Anthropic) OAuth Solution

Dev.to AI
Generative AI

If you're using OpenCode with Anthropic’s Claude and suddenly started seeing errors like: invalid token authentication failed unauthorized request You're not alone. But here's the good news - there is a working solution, and you can get everything running again in just a couple of minutes.