Prerequisites
Before getting started, ensure you have:- Python ≥ 3.11 on PATH – on 3.10, the install hook fails silently
opencode(curl -fsSL https://opencode.ai/install | bash)- SambaNova API key exported as
SAMBANOVA_API_KEYbefore launching Claude Code - Access to Claude Code CLI and their models
Setup
- Install the plugin in Claude Code:
- Restart Claude Code (or run
/reload-plugins). - Verify the install:
The plugin may ship with an outdated default model. Run
/update-model MiniMax-M2.7in the next step to use the current recommended model. - Register the current model:
For
MiniMax-M2.7, accept the suggested sampling params (temperature=1.0,top_p=0.95).
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 toopencode 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 byMiniMax-M2.7 – /code delegates the whole task to the cheap, fast executor.
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):
ReadReview the plan Claude produces before handing off – edit it freely; that’s the point of materializing the plan.index.htmlandstyle.cssin~/sambanova-demo. WritePLAN.mddescribing how to extend this landing page into a “pet adoption finder” demo: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.
- 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
Want SambaNova to plan too? Register the planner once –Step 2 – Hand/update-model gemma-4-31B-it– then, instead of writing the plan in this session, delegate the write-up:/code gemma-4-31B-it ~/sambanova-demo "<sample_plan_as_above>"Step 2 (execution onMiniMax-M2.7) is unchanged – now both sides run on SambaNova.
PLAN.md to SambaNova:
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 intoPLAN.md, and SambaNova executes. Solves the stale-docs problem without writing any custom retrieval.
Install Context7 (one command)
context7 listed with resolve-library-id and query-docs.
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 theClaude will calldate-fnslibrary – specificallyformatDistanceToNowwith theaddSuffixoption, and how to load date-fns in a plain browser page via its UMD CDN build (thedateFnsglobal). Then update~/sambanova-demo/PLAN.mdwith a “Phase 2: relative date labels” section describing how to give each pet card in the existing finder a fixeddata-addedISO 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, andaddSuffixusage verbatim from the docs, and include a verification step a human can run in the browser.
resolve-library-id → query-docs, get today’s API, and write a plan grounded in current docs.
Want SambaNova to plan too? The catch here: the/codesub-agent has no MCP access, sogemma-4-31B-itcan’t call Context7 itself. Let Claude do theresolve-library-id→query-docsfetch 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-itwrites the plan.
Step 2 – Hand to SambaNova
PLAN.md already contains the resolved API.
Step 3 – Verify
Composing with MCP servers
The plugin and MCP servers sit on opposite sides of the delegation boundary, making them complementary:
Three patterns fall out:
1. MCP-fed planning. Pull external context, bake it into
PLAN.md, hand off.
Example: Claude reads Jira ticket2. MCP-driven handoff. AfterPROJ-1234via the Atlassian MCP server, grabs the linked Confluence design doc, and writes a self-containedPLAN.md. Then/code MiniMax-M2.7 …executes it. The SambaNova executor never touches Jira credentials.
/code finishes, Claude publishes results via MCP.
Example:3. Shell-CLI tools inside the sub-agent. The sub-agent has no MCP, but it does have/codewrites/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.
--auto shell access. Any CLI on PATH (gh, git, linear, aws, …) is fair game.
Example: /code 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.htmland confirm…”) or it will edit files and stop. - Don’t pre-resolve
git diff/grepin your prompt – let the sub-agent run them. - Bare model id, not
sambanova/<id>. openis macOS – on Linux usexdg-open, on Windows usestart.
Common gotchas
Python < 3.11. The plugin builds its venv automatically on session start, using whateverpython3 is first on PATH. On 3.10, the install fails silently – and the broken venv won’t rebuild on its own, since a 3.10 interpreter still counts as “present.” Fix with pyenv install 3.11.9 && pyenv global 3.11.9, then delete the plugin’s cached .env directory and restart Claude Code to force a rebuild.
API key not found during setup. 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
- Plugin source – sambanova-plugin-cc
- SambaNova Cloud – cloud.sambanova.ai
- OpenCode docs – opencode.ai/docs
- Claude Code plugins – docs.claude.com
- Model Context Protocol – modelcontextprotocol.io

