Agent Upstart

Practical notes on working with AI agents.

Playbooks · Coding tasks

Use Claude Code login inside OpenCode

Written November 5, 2026 · Edited November 12, 2026

Version 2.2.3 adds a Claude Agent provider that runs on your Claude Code login. What loads, what drops, and the approval question nobody has answered.

What 2.2.3 adds

OpenCode 2.2.3, released October 30, adds a built-in Claude Agent provider. Install Claude Code, run claude auth login, then pick Claude Agent in /connect to use your Claude Code login and models. The OPENCODE_CLAUDE_PATH variable can point OpenCode at the Claude executable when it is not on the normal path. Claude Code must be version 2.1.248 or newer. A subscription, an API key, or a cloud account all work; on a subscription the cost display reads zero because the plan covers usage. Version 2.2.4, later the same day, added a guided setup for the same provider.

What loads, and what drops

Switching to Claude Agent changes what OpenCode loads. Claude Code's own setup stays behind: its settings in ~/.claude and the project's .claude folder, CLAUDE.md files, hooks, MCP servers, and skills are not read, and auto compaction and auto memory are off — OpenCode handles compaction with its own tools. Claude Code's built-in tools are off too; Claude uses OpenCode's tools, and every tool call goes through OpenCode's permission prompts. What carries over is Claude Code's own system prompt, plus OpenCode's instructions from AGENTS.md, skills, MCP instructions, and the selected agent's prompt. Tool calls run one at a time: parallel file reads become sequential.

Several Claude Code features are not available through the provider at all: plan usage tracking, cloud sessions and /teleport, /loop, auto mode, and computer use. /usage in OpenCode shows OpenCode Console usage, not plan usage.

Move your rules to AGENTS.md

With Claude Code's CLAUDE.md loading off, project rules have to come through OpenCode. OpenCode reads AGENTS.md first and falls back to CLAUDE.md only when no AGENTS.md exists, so the fix is to move the rules into AGENTS.md and leave a one-line import in CLAUDE.md. The same file then serves OpenCode, Claude Code, and Codex. MCP servers and hooks need the same treatment: re-add them in OpenCode's own config rather than expecting Claude Code's to load.

The approval question nobody has answered

OpenCode's side: the provider runs the user's installed claude program through Anthropic's Agent SDK and never reads or replays the saved login. The design document puts it plainly: "It never sits between Claude Code and Anthropic or changes Claude Code's requests." OpenCode says it has Anthropic's permission.

Anthropic's side: the Agent SDK overview still says, "Unless previously approved, Anthropic does not allow third party developers to offer claude.ai login or rate limits for their products, including agents built on the Claude Agent SDK." In January, Anthropic tightened safeguards after accounts were banned for triggering abuse filters from third-party harnesses using Claude subscriptions, and in March OpenCode removed its Anthropic OAuth plugin after legal requests. Anthropic has published nothing that names OpenCode's new provider.

Both statements stand as written, and the question is unresolved. Do not assume the arrangement is approved, and do not assume it is forbidden. If your work depends on the subscription surviving inside OpenCode, that uncertainty is part of the decision.

Before you switch

  1. Copy project rules into AGENTS.md and check OpenCode reads them; a CLAUDE.md alone will not load.
  2. Re-add the MCP servers and hooks the work needs in OpenCode's config; Claude Code's will not carry over.
  3. Expect serial tool execution and plan for slower parallel reads.
  4. Check /usage expectations: plan usage is not visible through the provider.
  5. Keep Claude Code installed and signed in on the same machine; the provider does not work in remote workspaces.

Limits

Related playbooks

Sources

Back to: Coding playbooks. Also: Run three independent lines of research at the same time in Claude Code, then combine the short summaries · Agent Skills has a neutral home — and still no security story · Run LongCat-2.5 in Claude Code without the 200K cap · Run MiniMax M3.1 Flash inside Claude Code.