HN 표시: OpenCode에서 Claude Pro/Max를 복원하기 위한 AI 에이전트 지침

hackernews | | 📦 오픈소스
#ai #ai 딜 #anthropic #claude #hn #opencode #플러그인
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

오픈소스 코딩 툴인 OpenCode는 앤스로픽(Anthropic)의 법적 요청에 따라 클로드 프로/맥스(Claude Pro/Max) 구독 연동 기능을 공식 삭제했습니다. 이에 따라 한 개발자가 자동 OAuth 인증, CLI 동기화 등의 구현 계획이 담긴 가이드 문서를 공개하여, 사용자나 AI 코딩 어시스턴트가 직접 비공식 플러그인을 만들 수 있도록 지원하고 있습니다. 다만 이러한 방식의 서비스 접근은 앤스로픽의 약관 제3.7조를 위반할 소지가 뚜렷하여 계정 정지 등의 리스크가 크므로 사용자 각자의 책임하에 활용해야 합니다.

본문

This repository contains documentation and implementation notes for restoring Anthropic Claude Pro/Max subscription support in OpenCode via its plugin system. This repository does NOT contain the plugin source code. It contains the plan, instructions, and notes needed for you (or an AI assistant) to build the plugin yourself. On March 19, 2026, OpenCode merged PR #18186 — "Remove anthropic references per legal requests." The PR was submitted by the OpenCode maintainers after receiving a legal request from Anthropic. It removed: - The bundled opencode-anthropic-auth plugin (OAuth flow against claude.ai) - Claude Code beta headers and User-Agent logic - The Claude Code system prompt ( anthropic-20250930.txt ) - Provider hints and documentation for Claude Pro/Max login The PR received 511 thumbs-down reactions and significant community discussion. OpenCode's documentation now includes this note: "Using your Claude Pro/Max subscription in OpenCode is not officially supported by Anthropic." Use at your own risk. Anthropic's Consumer Terms of Service Section 3.7 states: "Except when you are accessing our Services via an Anthropic API Key or where we otherwise explicitly permit it, to access the Services through automated or non-human means, whether through a bot, script, or otherwise." Using OAuth tokens obtained through a Claude Pro/Max subscription in a third-party tool like OpenCode — rather than through claude.ai directly or via an Anthropic API key — may violate this clause. Anthropic has not publicly clarified whether plugin-based access through subscription OAuth tokens constitutes a violation, but the legal request that led to PR #18186 strongly suggests they consider it unauthorized. By using any plugin or tool built from these instructions, you accept: - You may be violating Anthropic's Terms of Service - Your account could be suspended or terminated - This project is not affiliated with, endorsed by, or supported by Anthropic - No warranty is provided; the authors assume no liability | File | Description | |---|---| IMPLEMENTATION_PLAN.md | Full implementation plan with 28 annotated notes covering OAuth flow, header constants, CLI keychain integration, response streaming, and every pitfall discovered during development | INSTRUCTION.md | Step-by-step user-facing guide: install prerequisites, create the plugin, configure OpenCode, authenticate (CLI sync recommended), and troubleshoot common issues | PROMPT.md | Minimal prompt you feed to an AI agent — tells it what to build and points it at the plan | README.md | This file | You don't need to write the plugin by hand. The plan document (IMPLEMENTATION_PLAN.md ) is detailed enough that OpenCode itself — or Claude Code, or any capable AI coding assistant — can generate a working plugin from it. - Clone this repo (or download the files) - Open OpenCode (or Claude Code) in the repo directory - Use PROMPT.md as your prompt — it tells the agent what to build and points it at the plan. You can just paste its contents or reference it directly (e.g. in OpenCode:@PROMPT.md implement the plugin ) - Deploy the generated file to ~/.config/opencode/plugins/opencode-anthropic-auth.ts - Follow INSTRUCTION.md for configuration and authentication The plan covers all the non-obvious details: why curl must be used instead of fetch() for token exchange, why the CLI sync method uses method: "auto" not method: "code" , which headers are required, how billing is injected as a system message, how tool names need mcp_ prefixing/unprefixing, and more. These community projects were analyzed during development: - opencode-anthropic-auth-community — active community fork - opencode-anthropic-auth — archived original - opencode-claude-bridge — most mature alternative (curl-based OAuth, CLI keychain sync, full headers) Sync from Claude CLI is the recommended approach. It avoids all OAuth endpoint fragility (URL changes, User-Agent requirements, 429 rate limits, scope changes). Install the Claude Code CLI, log in once, and the plugin reads your tokens automatically: npm install -g @anthropic-ai/claude-code claude login Then in OpenCode, choose Anthropic (API key) > Sync from Claude CLI. This repository is dedicated to the public domain under the CC0 1.0 Universal license. You can copy, modify, distribute, and use the documentation for any purpose without asking permission.

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →