Hacker News 中文摘要

RSS订阅

Anthropic明确阻止OpenCode -- Anthropic Explicitly Blocking OpenCode

文章摘要

这篇文章是GitHub上的一个代码片段分享页面,主要展示了一个名为"anthropic-screws-opencode.ts"的TypeScript文件。页面包含GitHub的导航栏和登录状态提示,核心内容是分享和讨论这个开源代码文件。

文章总结

主要内容概述

该文章介绍了一个名为anthropic-screws-opencode.ts的脚本文件,该文件旨在证明Anthropic公司在其Claude Code OAuth系统提示中专门屏蔽了“OpenCode”这一短语。以下是主要内容:

  1. 脚本目的

    • 该脚本通过测试不同的系统提示,证明Anthropic在Claude的OAuth令牌(Pro/Max订阅)中屏蔽了“You are OpenCode”这一短语,而允许其他身份声明(如“You are Cursor”“You are Pi”等)。
    • OpenCode是一个开源的AI编程助手(opencode.ai)。
  2. 测试方法

    • 脚本通过OAuth使用Claude Pro/Max账户进行身份验证。
    • 测试不同的系统提示,记录哪些被屏蔽或允许。
  3. 关键发现

    • 第一个系统提示块必须为:“You are Claude Code, Anthropic's official CLI for Claude.”
    • 第二个提示块可以包含其他内容,但“You are OpenCode”或“You are opencode”会被屏蔽。
    • 其他身份声明(如Cursor、Pi、Droid等)可以正常使用。
  4. 结论

    • 作者认为Anthropic针对特定竞争对手(OpenCode)进行了屏蔽。
  5. 技术细节

    • 脚本使用Bun运行时,依赖@openauthjs/openauth库。
    • 包含OAuth授权流程和API测试逻辑。
  6. 文件链接

无关内容删减

  • 删除了GitHub页面的导航栏、登录/注册按钮、页脚链接等与主题无关的UI元素。
  • 省略了脚本的完整代码(仅保留关键注释和功能说明)。

评论总结

主要观点总结:

1. 支持Anthropic的立场

  • 认为OpenCode滥用Claude Code订阅,应使用官方API(评论1、2、11)
    "OpenCode reverse‑engineers Claude Code’s OAuth endpoints... This is harmful from Anthropic's perspective"
    "Meh, if you want access to the API then pay for the API. It's as simple as that."
  • 类比:免费续水仅限特定水瓶,违反条款不合理(评论19)
    "If I gave free water refils if you used my brand XYZ water bottle, you should not cry..."

2. 质疑Anthropic的策略

  • 认为封闭订阅模式可能削弱API吸引力(评论13、16)
    "Is the issue that it disincentivizes the use of their API?"
    "I don't understand what's the threat from a CLI..."
  • 技术规避仍可能(评论9、12)
    "You can get around this by making an agent in opencode..."
    "why can't OpenCode just call Claude instead of reusing its auth tokens?"

3. 用户体验与公司优先级争议

  • 批评Anthropic忽视付费用户问题(评论8)
    "Not a fan of them prioritizing combat against opencode instead of fixing issues..."
  • 用户转向竞品(评论14)
    "I’ve cancelled my max subscription and have gone over to ChatGPT pro..."

4. 技术对抗与舆论影响

  • 反向营销效应(评论17)
    "This is definitely Barbara Streisanding... I had never heard of OpenCode. But I sure have now!"
  • 长期技术博弈预测(评论6)
    "Will 'model attestation' become a new mechanism... with secret shibboleths inserted into model weights?"

关键争议点:

  • 性质界定:OpenCode是否滥用私有API(评论1、22) vs. 合理利用订阅资源(评论9)
  • 商业逻辑:补贴订阅是否应限制使用场景(评论1、19) vs. 开放生态更有利(评论13)
  • 技术可行性:规避封锁的持续可能性(评论4、9、12)

引用说明:

保留中英文的关键引用呈现核心论据,如评论1的私有API危害分析和评论19的类比,体现观点对立。用户转向竞品(评论14)和反向营销(评论17)反映实际影响。技术讨论(评论6、12)突出未来可能发展。