{"slug": "out-of-claude-code-quota-finish-the-feature-in-opencode", "title": "Out of Claude Code quota? Finish the feature in OpenCode", "summary": "A developer documented a workflow for continuing work in OpenCode when Claude Code's usage limits are hit, using the ivar tool's relay feature to start a fresh session on the same feature branch under a different provider. Because Claude Code conversations cannot be transferred, the agent writes a handoff — summary, pending tasks, open decisions and modified files — into the hall's memory, which the relayed OpenCode session reads to resume. The author notes that Anthropic's terms restrict subscription sign-in to Claude Code and Claude.ai, so OpenCode requires its own model provider.", "body_md": "When you hit the Claude Code usage limit halfway through a feature, switching model with `/model` does not get you further. Paid plans have a five-hour session limit and weekly limits, the weekly limits apply across all models, and Claude Code draws from the same pool as Claude chat ([Anthropic: usage and length limits](https://support.claude.com/en/articles/11647753-how-do-usage-and-length-limits-work)). `/usage` shows what counts against them ([Anthropic: models, usage and limits in Claude Code](https://support.claude.com/en/articles/14552983-models-usage-limits-in-claude-code)). You can wait, enable usage credits, or keep working in another harness.\n\nA [Claude Code feature request](https://github.com/anthropics/claude-code/issues/64376) from June 2026 describes the cost of switching by hand: copying conversation summaries into a new session and re-explaining the codebase. [OpenRouter's tutorial](https://openrouter.ai/blog/tutorials/claude-code-usage-limit/) keeps you in Claude Code and moves the bill to an API key. [Hora de Codar](https://horadecodar.com.br/limite-claude-code/) asks the question this post answers: can the task be finished in OpenCode?\n\nIt can, with one condition stated up front. The code is on disk; the conversation is not. A harness switch in `ivar` is a **relay**: a fresh session on the same feature, on the same branch and worktrees, under a different provider. Nothing from the Claude Code conversation carries over. What carries over is what the agent writes down in a handoff.\n\nThe example feature is `checkout-tax`, promoted in an `api` and a `web` repo of an `ivar` hall at `~/acme`. Commands, flags and messages below are from `ivar` 0.21.0. Setting up the hall is a one-time step covered in the [quickstart](https://ivar.run/docs/quickstart?utm_source=devto&utm_medium=syndication&utm_campaign=claude-code-usage-limit-opencode); the hall has to list OpenCode as a provider, which the quickstart's `ivar provider add` covers.\n\nOpenCode needs a model provider of its own: your Claude subscription does not work there. Anthropic's terms limit subscription sign-in to Claude Code and Claude.ai ([The Register, February 2026](https://www.theregister.com/2026/02/20/anthropic_clarifies_ban_third_party_claude_access)).\n\nA handoff is a summary, pending tasks, open decisions and changed files, stored in the hall's memory for the next session. The agent's instructions tell it to open one when you wrap up, and also state that nothing opens a handoff for you. So ask for it while Claude Code still answers, for example once `/usage` shows the window nearly spent:\n\n  I'm close to my usage limit. Leave a handoff so OpenCode can finish checkout-tax.\n\n  The handoff is open for OpenCode sessions on `checkout-tax`: the tax line in the web cart and the api rate fixture are pending, and per-line versus per-order rounding is still open. To continue, run the relay below in a terminal at `~/acme`.\n\nThe handoff the agent wrote carries:\n\n```\nsummary:         Tax rates load from the api; the web cart does not show them yet\npending_tasks:   Render the tax line in the web cart\n                 Add the rate fixture to the api tests\nopen_decisions:  Round per line or per order\nmodified_files:  api/src/tax/rates.ts\n                 web/src/cart/summary.tsx\nto.provider:     opencode\n```\n\n`feature` puts it in the feature's queue, and `to.provider` makes it visible only to OpenCode sessions. Handoffs expire after 7 days by default (`memory.handoff_ttl_days` in `ivar.json`).\n\nThis is the one step you run yourself, because it starts a new harness process: OpenCode opens in your terminal, in place of the Claude Code session that is out of quota. Quit Claude Code first, then paste the command the agent gave you:\n\n```\nivar session start checkout-tax --relay --provider opencode \\\n  --prompt \"Read the open handoffs for this feature, then continue from the first pending task.\"\n```\n\n`--relay` checks three things before it touches anything:\n\n`--provider`, always. A relay exists to switch harnesses.` ivar session stop` removes it.`checkout-tax` to Claude Code again is refused with `` relay must switch provider; the most recent session on `checkout-tax` already ran `claude-code` ``.\nThe new session gets a new view dir over the same promoted worktrees, OpenCode's native files, and `AGENTS.md` built from the hall's `HALL.md`, the same rules Claude Code read as `CLAUDE.md`. `--prompt` is OpenCode's first message, so the session opens already working. Because `ivar` launches OpenCode itself, on Linux the OpenCode process runs under the same Landlock write sandbox a Claude Code session started this way gets.\n\nIf Claude Code stopped before it could write a handoff, the relay works the same way. Put what is left in `--prompt` in your own words; the OpenCode agent then reads the changes already in the worktrees.\n\nOn Claude Code, a session-start hook runs `ivar memory brief` and prints the open handoffs before the first prompt. OpenCode has no such hook: its plugins cannot inject context at session start. The `ivar` MCP server's instructions tell the agent to call `memory_handoff_list` at session start instead, and the `--prompt` above makes that explicit:\n\n  Read the open handoffs for this feature, then continue from the first pending task.\n\n  I claimed the handoff from Claude Code. api and web are promoted on `checkout-tax` as it left them. Starting with the tax line in the web cart; rounding is still open, so I'll ask before I pick per line or per order.\n\nCheck the first answer: the agent should name the pending tasks the handoff lists. Accepting the handoff claims it, so a later session does not pick it up again.\n\nQuitting Claude Code left its session record and view dir in place, which the relay needed. Once OpenCode is working, ask it to remove them:\n\n  Stop the old Claude Code session on checkout-tax.\n\n  \n  \n  Result\n\nThe feature keeps going on the same branch, in the same worktrees, under OpenCode. The new agent starts from the handoff and the files on disk, with the same hall rules and skills. When the Claude Code window resets, the same relay with `--provider claude-code` moves it back.\n\n`memory_handoff_list`, which is why the relay passes `--prompt`.` ivar session start` launches, on Linux 5.13 or later. Opening OpenCode by hand and attaching it with `ivar session connect` leaves only the tool guard hook, which checks the agent's tool calls but cannot see every write a shell command makes. On macOS there is no kernel sandbox either way.\nFor a single repo and a short task, writing the handoff into a Markdown file and opening OpenCode in the same directory gets you most of the way. The relay helps when the feature spans several repos and worktrees, which a new harness otherwise has to find again on its own.", "url": "https://wpnews.pro/news/out-of-claude-code-quota-finish-the-feature-in-opencode", "canonical_source": "https://dev.to/mnzs/out-of-claude-code-quota-finish-the-feature-in-opencode-25f3", "published_at": "2026-12-02 00:09:29+00:00", "updated_at": "2026-12-02 00:14:41.153888+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "large-language-models"], "entities": ["Claude Code", "OpenCode", "Anthropic", "ivar", "OpenRouter", "Hora de Codar", "The Register"], "also_reported_by": [], "takeaway": "When a coding agent hits a usage limit, have it write a handoff (summary, pending tasks, open decisions, modified files) into shared memory and start a relayed session on the same branch under a different provider, since the conversation itself does not carry over.", "recommendation": {"advice": "Ask the agent to write a handoff with pending tasks, open decisions and modified files before the quota runs out, then relay the session to another provider on the same branch.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/out-of-claude-code-quota-finish-the-feature-in-opencode", "markdown": "https://wpnews.pro/news/out-of-claude-code-quota-finish-the-feature-in-opencode.md", "text": "https://wpnews.pro/news/out-of-claude-code-quota-finish-the-feature-in-opencode.txt", "jsonld": "https://wpnews.pro/news/out-of-claude-code-quota-finish-the-feature-in-opencode.jsonld"}}