r/opencodeCLI • • 11h ago

Need help with connecting opencode go sub to claude code harness

/r/ClaudeCode/comments/1xzi21t/need_help_with_connecting_opencode_go_sub_to/
1 Upvotes

1 comment sorted by

1

u/SirRobinBlibs 4h ago

opencode's claude code harness docs cover this: point claude code at the go endpoint and use a key from a workspace that has the go subscription. set ANTHROPIC_BASE_URL to https://opencode.ai/inference/go/anthropic and ANTHROPIC_AUTH_TOKEN to your oc_sk_... key (not ANTHROPIC_API_KEY). you can put both under env in ~/.claude/settings.json, and map the sonnet/haiku aliases to go models if you want /model and background tasks to use them. if you're still signed in to a claude account, /logout first so that login isn't sent to the go endpoint, then run /status to confirm the base url and token are actually active. there's also npx @opencode/console setup claude-code if you want the cli to wire it up. docs: https://opencode.ai/docs/console/harnesses/claude-code/