Skip to main content
Claude Code is a command-line tool that lets you delegate coding tasks directly to Claude from your terminal. It understands your project’s codebase and can help you analyze, plan, write, and edit code.

Prerequisites

Before getting started, ensure you have:
  • Python ≥ 3.11 on PATH — on 3.10, the install hook fails silently
  • cn (npm i -g @continuedev/cli) or opencode (curl -fsSL https://opencode.ai/install | bash)
  • SambaNova API key exported as SAMBANOVA_API_KEY before launching Claude Code
  • Access to Claude Code CLI and their models
Sanity check:
python3 --version && { cn --version || opencode --version; } && [ -n "$SAMBANOVA_API_KEY" ] && echo OK

Setup

  1. Install the plugin in Claude Code:
     /plugin marketplace add https://github.com/sambanova/sambanova-plugin-cc
     /plugin install samba-plugin@sambanova-cc-marketplace
    
  2. Restart Claude Code. On startup, a SessionStart hook builds a venv and installs the plugin’s helpers.
  3. Verify the install:
    /list-models
    
    No models in database. is the expected empty state.
  4. Register your first model:
    /model-info                  # browse the SambaNova platform catalogue
    /update-model MiniMax-M2.7   # add it to your local registry
    /list-models                 # confirm
    
    For MiniMax-M2.7, accept the suggested sampling params (temperature=1.0, top_p=0.95).
Always pass the bare model id to /code (MiniMax-M2.7), never sambanova/MiniMax-M2.7.

Running sub-agents with Claude and SambaNova

The SambaNova plugin maintains its own local SQLite database that stores all model configurations. When you use it, the plugin generates isolated, runtime-only configurations for the sub-agent, ensuring a clean separation from your existing IDE setups.

What it does

Lets Claude Code delegate coding tasks to cn (Continue) or opencode running against a SambaNova-hosted model (e.g. MiniMax-M2.7). Useful for cheap bulk work, or for splitting planning (Claude) from execution (SambaNova). Five slash commands: /code is the one you’ll use most; /list-models, /model-info, /update-model, /reset-model-db manage the local model registry. The following shows three real demos — including one that uses an MCP server for live library docs.

Demo 1 — SambaNova end-to-end

A pet-friendly “hello world” landing page, built and verified entirely by MiniMax-M2.7/code delegates the whole task to the cheap, fast executor.
mkdir -p ~/sambanova-demo && cd ~/sambanova-demo
Delegate the build:
/code continue MiniMax-M2.7 ~/sambanova-demo "Create a minimalist, pet-friendly 'hello world' landing page in this directory. One index.html, one style.css, no JS frameworks. Soft pastel palette, a friendly paw-print emoji, a short tagline ('Hello, friend'), and a single call-to-action button. Keep it under 80 lines of HTML+CSS combined. Open index.html when done so I can preview it."
Verify in the browser:
open ~/sambanova-demo/index.html
That’s the SambaNova-only baseline. One fast executor, no frontier model in the loop.

Demo 2 — Claude plans, SambaNova executes

The architect/builder split: Claude (current session) writes a precise plan; SambaNova executes it. PLAN.md is the artifact that crosses the boundary — reproducible, swappable, reviewable. Step 1 — Ask Claude to write PLAN.md (in this Claude Code session, not via /code):
Read index.html and style.css in ~/sambanova-demo. Write PLAN.md describing how to extend this landing page into a “pet adoption finder” demo:
  • A gallery of 6 placeholder pet cards (name, species, one-line bio) in CSS grid
  • A search input that filters cards by name (vanilla JS, no frameworks)
  • A dark-mode toggle that persists in localStorage
Include exact file layout, the JS event handlers needed, and a verification checklist a human can run in the browser. Don’t modify any code yet.
Review the plan Claude produces before handing off — edit it freely; that’s the point of materializing the plan.
Want SambaNova to plan too? Register the planner once — /update-model gemma-4-31B-it — then, instead of writing the plan in this session, delegate the write-up: /code continue gemma-4-31B-it ~/sambanova-demo "<sample_plan_as_above>" Step 2 (execution on MiniMax-M2.7) is unchanged — now both sides run on SambaNova.
Step 2 — Hand PLAN.md to SambaNova:
/code continue MiniMax-M2.7 ~/sambanova-demo "Read PLAN.md and execute every step. After each step, list which acceptance criteria from the plan are now satisfied. Open index.html at the end so I can verify in the browser."
Step 3 — Verify:
open ~/sambanova-demo/index.html
You should see the gallery, working search, and a working dark-mode toggle. The executor never sees your Claude conversation — PLAN.md is its entire spec. Tweak PLAN.md and re-run the same /code call, or swap the executor model without rewriting the plan.

Demo 3 — MCP-fed planning with live library docs

Demo 2, plus an MCP server. Claude uses Context7 to fetch current docs for a library, bakes them into PLAN.md, and SambaNova executes. Solves the stale-docs problem without writing any custom retrieval.

Install Context7 (one command)

npx ctx7 setup --claude
Walks you through OAuth, generates a free API key, and registers the MCP server for Claude Code. Restart Claude Code so it picks up the new tools. Verify in Claude Code:
/mcp
You should see context7 listed with resolve-library-id and query-docs.
Prefer no OAuth? Add it manually: claude mcp add context7 -- npx -y @upstash/context7-mcp. Free tier works without a key; you’ll just hit lower rate limits.

The task

Stamp each pet card from Demo 2 with a human-readable “Added X days ago” label, computed at page load with date-fns (formatDistanceToNow). date-fns is a good Context7 target: its v2→v3 rewrite changed how it’s imported, and v4 added time-zone support — so models routinely emit stale import patterns that don’t run.

Step 1 — Claude uses Context7 to plan

In this Claude Code session, ask:
Use the Context7 MCP server to look up current docs for the date-fns library — specifically formatDistanceToNow with the addSuffix option, and how to load date-fns in a plain browser page via its UMD CDN build (the dateFns global). Then update ~/sambanova-demo/PLAN.md with a “Phase 2: relative date labels” section describing how to give each pet card in the existing finder a fixed data-added ISO date and render an “Added X days ago” label computed from it on load. Use the up-to-date API from Context7 — not what you remember. Quote the exact <script> CDN tag, the global function call, and addSuffix usage verbatim from the docs, and include a verification step a human can run in the browser.
Claude will call resolve-library-idquery-docs, get today’s API, and write a plan grounded in current docs.
Want SambaNova to plan too? The catch here: the /code sub-agent has no MCP access, so gemma-4-31B-it can’t call Context7 itself. Let Claude do the resolve-library-idquery-docs fetch above, then delegate only the write-up — pasting the resolved API into the prompt: /code continue gemma-4-31B-it ~/sambanova-demo "<same_plan_as_above>" (Register it first with /update-model gemma-4-31B-it.) Claude stays the MCP gateway; gemma-4-31B-it writes the plan.

Step 2 — Hand to SambaNova

/code continue MiniMax-M2.7 ~/sambanova-demo "Read PLAN.md 'Phase 2' and execute it. After loading, open index.html so I can confirm each card shows an 'Added X days ago' label."
The executor doesn’t need MCP access — PLAN.md already contains the resolved API.

Step 3 — Verify

open ~/sambanova-demo/index.html
Each of the 6 cards should show an “Added X days ago” label (e.g. “Added 3 days ago”).

Composing with MCP servers

The plugin and MCP servers sit on opposite sides of the delegation boundary, making them complementary:
SurfaceTools available
Claude (current session)MCP tools (GitHub, Atlassian, Linear, Slack, Confluence, …) + shell + Claude Code built-ins
/code sub-agent (cn / opencode)Filesystem + shell. No MCP.
Three patterns fall out: 1. MCP-fed planning. Pull external context, bake it into PLAN.md, hand off.
Example: Claude reads Jira ticket PROJ-1234 via the Atlassian MCP server, grabs the linked Confluence design doc, and writes a self-contained PLAN.md. Then /code continue MiniMax-M2.7 … executes it. The SambaNova executor never touches Jira credentials.
2. MCP-driven handoff. After /code finishes, Claude publishes results via MCP.
Example: /code writes /tmp/exec-summary.md. Claude reads it, opens a PR through the GitHub MCP server, comments on the Jira ticket, and posts to a Slack channel — all from the current session.
3. Shell-CLI tools inside the sub-agent. The sub-agent has no MCP, but it does have --auto shell access. Any CLI on PATH (gh, git, linear, aws, …) is fair game.
Example: /code continue MiniMax-M2.7 ~/project "Implement PLAN.md, run tests, then run 'gh pr create --fill' to open a draft PR."

Tips

  • Absolute paths for cwd~ expansion is unreliable across the shell boundary.
  • Tell the sub-agent to verify (“open index.html and confirm…”) or it will edit files and stop.
  • Don’t pre-resolve git diff / grep in your prompt — let the sub-agent run them.
  • Bare model id, not sambanova/<id>.
  • open is macOS — on Linux use xdg-open, on Windows use start.

Common gotchas

Python < 3.11. The plugin’s SessionStart hook builds its venv with whatever python3 is first on PATH. On 3.10, the install fails silently. Fix with pyenv install 3.11.9 && pyenv global 3.11.9, then rm -rf ~/.claude/plugins/cache/*/sambanova-plugin-cc/.env and restart Claude Code. API key not visible to the hook. SAMBANOVA_API_KEY must be in the env of the Claude Code process. Export it in ~/.zshrc, then launch Claude Code from a fresh shell. “Model not found in database.” /model-info shows the platform catalogue; /list-models shows your local registry. /code reads the local one. Add the missing model with /update-model.

References