Spiral gives your agent every tool with one account. Browse the tools →

opencode · LLMReleased 2026-02-05

How to Use Claude Opus 4.6 in opencode

Claude Opus 4.6 suits complex coding tasks, code review, and research across long documents. Compared with Claude Opus 4.5, it improves planning, debugging, and sustained work in large codebases.

Prompts to try with Claude Opus 4.6 in opencode

Copy an example into opencode, or ask in your own words.

Use Claude Opus 4.6 at high reasoning effort to investigate the failing tests in this project. Trace the cause, make the smallest justified fix, and run the relevant tests without refactoring unrelated code.

Claude Opus 4.6opencode
Try asking
  • Use Claude Opus 4.6 to review the current diff for regressions. Report only actionable findings, with file locations, a failure scenario, and the evidence behind each finding.

  • Use Claude Opus 4.6 to map how an incoming request reaches persistent storage in this repository. Cite the relevant functions and identify where validation and error handling occur.

  • Use Claude Opus 4.6 to compare this project's implementation with its documented requirements. List unmet requirements and quote the requirement behind each finding before proposing changes.

  • Use Claude Opus 4.6 at medium reasoning effort to explain the latest bug fix for a reviewer. Describe the trigger, changed behavior, and test evidence in no more than 250 words.

How to set up Claude Opus 4.6 in opencode

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Claude Opus 4.6

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "anthropic",
        "model": "anthropic/claude-opus-4.6",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

Then paste one of the prompts above: opencode finds Claude Opus 4.6 on Spiral, shows the price and runs it.

Claude Opus 4.6 providers and prices

Spiral runs Claude Opus 4.6 through Anthropic. Open a card for today's price, with every fee included.

AnthropicLLM
Claude Opus 4.6
anthropic/claude-opus-4.6

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Top p0 to 1

Taken only at reasoning effort "none", this model's default.

Max tokens1 to 128000

The most output tokens to generate. On a reasoning model the reasoning tokens count toward it: a cap too low for the effort can end with no answer (finish_reason length).

Temperature0 to 1

Taken only at reasoning effort "none", this model's default.

Reasoning effortnone, minimal, low, medium, high, or maxnone

How much the model reasons.

Parallel tool callson or off

Every API field of Claude Opus 4.6 is on its tool page: open its card above.

What can you do with Claude Opus 4.6 in opencode?

Claude Opus 4.6 can trace bugs and review changes across a large codebase. Give it a concrete failure, the relevant project context, and a clear boundary for the fix.

Debug a failure across several modules

Have Claude Opus 4.6 trace a failing behavior through the relevant code, propose a focused fix, and explain which test would catch a recurrence.

Review a substantial code change

Ask Claude Opus 4.6 to check a patch for behavioral regressions, missed edge cases, and assumptions that conflict with surrounding code.

Explain an unfamiliar codebase

Use Claude Opus 4.6 to map a request path, identify the components involved, and explain where a proposed change belongs.

Compare lengthy proposals

Give Claude Opus 4.6 the proposal text and evaluation criteria. Request an evidence table of commitments, gaps, and conflicting claims.

Prepare a research brief

Ask Claude Opus 4.6 to synthesize supplied sources into findings, disagreements, and unanswered questions, with evidence for each conclusion.

Explain financial performance

Provide Claude Opus 4.6 with reported figures and commentary. Request a variance narrative that separates reported causes from hypotheses and missing evidence.

Questions about Claude Opus 4.6 in opencode

Can opencode use Claude Opus 4.6?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Claude Opus 4.6 like any built-in tool.

How much does Claude Opus 4.6 cost in opencode?

Up to $0.133575 per run at the default inputs. $6.50 per 1M input tokens, $0.65 per 1M cached input tokens, $8.125 per 1M cache write tokens, $13.00 per 1M 1-hour cache write tokens, $32.50 per 1M output tokens; for a prompt above 200,000 tokens, $13.00 per 1M input tokens, $1.30 per 1M cached input tokens, $16.25 per 1M cache write tokens, $26.00 per 1M 1-hour cache write tokens, $48.75 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

Do I need an Anthropic account to use Claude Opus 4.6 in opencode?

No. Spiral runs Claude Opus 4.6 on its own Anthropic account. You sign in to Spiral once and never paste a key.

How long does it take to set up Claude Opus 4.6 in opencode?

About two minutes: add the server, then sign in, then check it.

Does opencode wait while Claude Opus 4.6 runs?

Claude Opus 4.6 runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

What is Claude Opus 4.6 best used for?

Use it for debugging, code review, and research that draws on substantial source material. It also suits document work and financial analysis where several pieces of evidence need to be considered together.

How much text can Claude Opus 4.6 handle?

Anthropic lists a 1 million token context window and a standard maximum output of 128,000 tokens. Those are capacity limits, so specify the answer length you actually need.

What should I watch for when using Claude Opus 4.6?

For coding, it can expand a small task into extra files or unnecessary abstractions. State the change boundary explicitly, such as fixing the failing behavior without restructuring unrelated code.

How should I prompt Claude Opus 4.6 with long documents?

Put the source material first and the question afterward. Define the deliverable, then ask for supporting quotes before conclusions so you can check the evidence.

Which reasoning setting should I test first?

Compare medium and high effort on representative tasks, checking correctness and completeness. Effort changes how much work Claude puts into the response, including tool calls and active thinking.

Get started

Start using Claude Opus 4.6 in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options