跳到主要內容

OpenCode 被迫移除 Claude:Anthropic 畫下開源 AI 工具的訂閱紅線 | OpenCode Forced to Drop Claude: Anthropic Draws the Line on OAuth Token Abuse

By Kit 小克 | AI Tool Observer | 2026-03-29

🇹🇼 OpenCode 被迫移除 Claude:Anthropic 畫下開源 AI 工具的訂閱紅線

三月底,一個在 GitHub 上累積超過 12.5 萬顆星的開源專案悄悄推送了一個讓社群嘩然的 commit:OpenCode,這個被開發者廣泛使用的終端 AI 編程助手,宣布移除所有 Claude 模型的整合支援。原因只有一行:「anthropic legal requests」。

OpenCode 是什麼?

OpenCode 是一個以 Go 語言撰寫的開源命令列 AI 編程助手,功能類似 Claude Code 或 GitHub Copilot,但完全開源、可自行架設,並支援多個 AI 模型。Claude 因為智能表現較強,成為許多用戶的首選。

問題在於:許多用戶並非透過付費 API 金鑰存取 Claude,而是利用 Claude Pro/Max 訂閱帳戶的 OAuth Token,讓 OpenCode 偽裝成 Claude Code 官方客戶端對 Anthropic 伺服器發送請求。簡單說,就是用每月 20 美元的訂閱方案,當成無限制的 API 使用。

Anthropic 為何出手?

這並非突然的決定。完整時間軸如下:

  • 2026 年 1 月 9 日:Anthropic 啟動伺服器端封鎖,第三方工具使用 OAuth Token 開始收到錯誤訊息:「This credential is only authorized for use with Claude Code」。
  • 2026 年 2 月 19 日:Anthropic 正式更新服務條款,明確禁止 Free/Pro/Max 訂閱計畫的 OAuth Token 用於第三方工具或 Agent SDK。
  • 2026 年 3 月:Anthropic 發出法律要求,OpenCode 隨即提交 commit 移除所有 Claude 整合。

從商業角度看,這合乎邏輯:用 $20/月 訂閱「薅」API 流量,嚴重侵蝕了 Anthropic 的 API 收入,也對伺服器基礎設施造成壓力。

開發者的憤怒與背後問題

這個移除 commit 在 GitHub 上收到 40 個踩,只有 4 個讚。HackerNews 討論超過 398 則留言,兩派意見分明:

  • 支持 Anthropic:訂閱條款本來就不允許這類用法,使用者「鑽漏洞」本就應該被封鎖,這是正常的商業保護。
  • 批評 Anthropic:Claude Code 官方本身也是命令列工具,Anthropic 卻只授權自家工具使用 OAuth 認證,明顯有反競爭之嫌,不利於開源生態發展。

更深層的問題是:開源 AI 工具生態,本質上仍然依賴商業模型供應商的善意與容忍度。當同一家公司既是模型提供者、又是競爭性工具供應商時,生態系統的獨立性就極為脆弱。

對開發者的實際建議

  • 若你的工具鏈依賴 Claude,務必使用正式 API Key,而非 OAuth Token。
  • 評估多模型策略(OpenAI、Google Gemini、本地 Ollama),降低對單一供應商的依賴風險。
  • 密切關注 Anthropic 服務條款異動,尤其是 Agent SDK 的使用限制部分。

值得一提的背景:Anthropic 的付費訂閱用戶今年確實翻倍成長,每日新增用戶從一月的約 25 萬成長到三月初的逾百萬。商業成功愈大,生態系統的規則就會愈嚴格。好不好用,試了才知道——但先確認你的使用方式符合 ToS。


🇺🇸 OpenCode Forced to Drop Claude: Anthropic Draws the Line on OAuth Token Abuse

In late March, a popular open-source project with over 125,000 GitHub stars quietly pushed a commit that sent shockwaves through the developer community. OpenCode — a widely-used terminal AI coding assistant — removed all Claude model integrations. The commit message was blunt: anthropic legal requests.

What Is OpenCode?

OpenCode is an open-source command-line AI coding assistant written in Go, comparable to Claude Code or GitHub Copilot but fully self-hostable and community-maintained. It supports multiple AI models, with Claude being particularly favored for its reasoning quality.

The problem: many users were not accessing Claude through paid API keys. Instead, they were using OAuth tokens from their Claude Pro/Max subscriptions — essentially spoofing Claude Code's official client headers to make requests to Anthropic's servers. In practical terms: using a $20/month subscription plan as an unlimited API.

Why Did Anthropic Act?

This was not sudden. The timeline:

  • January 9, 2026: Anthropic activated server-side blocks. Third-party tools using OAuth tokens began receiving: "This credential is only authorized for use with Claude Code."
  • February 19, 2026: Anthropic formally updated its Terms of Service, explicitly prohibiting OAuth token use from Free/Pro/Max plans with third-party tools or the Agent SDK.
  • March 2026: Anthropic issued legal demands. OpenCode pushed a commit removing all Claude integration.

From a business perspective, the logic is clear: users tunneling API traffic through a $20/month subscription were significantly eroding Anthropic's API revenue and adding infrastructure pressure.

Developer Reaction — and the Deeper Problem

The removal commit received 40 thumbs-down and only 4 thumbs-up on GitHub. The HackerNews thread surpassed 398 comments, with opinions sharply divided:

  • Anthropic defenders: Subscription terms never permitted this usage. Users were exploiting a loophole — Anthropic is within its rights to enforce its ToS.
  • Critics: Claude Code itself is just a CLI tool. By allowing only its own product to use OAuth authentication while blocking open-source alternatives, Anthropic is effectively engaging in anti-competitive behavior within its own ecosystem.

The deeper issue: open-source AI tooling ecosystems remain fundamentally dependent on the goodwill — or tolerance — of commercial model providers. When the same company is both a model provider and a competing tool vendor, ecosystem independence is fragile by design.

Practical Takeaways for Developers

  • If your toolchain depends on Claude, use official API keys — not OAuth tokens from subscriptions.
  • Adopt a multi-model strategy (OpenAI, Google Gemini, local Ollama) to reduce single-vendor dependency risk.
  • Monitor Anthropic's ToS changes closely, especially around Agent SDK usage restrictions.

For context: Anthropic's paid subscriber base has more than doubled this year — daily new signups grew from ~250,000 in January to over 1 million by early March. The bigger a commercial AI ecosystem grows, the stricter its rules become. You won't know until you try it — just make sure your usage is ToS-compliant first.

Sources / 資料來源


AI 工具觀察站 — 每日精選 AI Agent 與工具趨勢
AI Tool Observer — Daily curated AI Agent & tool trends

留言

這個網誌中的熱門文章

MCP 突破 9700 萬次下載:AI Agent 的「USB-C」為何成為 2026 年最重要的標準? | MCP Hits 97 Million Downloads: Why Model Context Protocol Became the Most Important AI Standard of 2026

歡迎來到 AI 工具觀察站 | Welcome to AI Tool Observer

GitHub Copilot 預設用你的程式碼訓練 AI:4 月 24 日前必須手動退出 | GitHub Copilot Will Train AI on Your Code by Default — Opt Out Before April 24