Running out of coding-agent capacity interrupts work. One way to make that capacity last longer is to delegate implementation to a lower-cost model, while keeping planning and final review with the primary assistant.
OpenCode provides a practical way to do this. Codex or Claude Code can invoke it locally to assign a coding task to Muse Spark. A reusable skill defines the handoff: what Muse should change, which tests it should run, and how the primary assistant should assess the result.
The workflow has four steps:
Codex or Claude Code scopes the task
↓
OpenCode runs Muse Spark on the implementation
↓
Tests run and the coordinating agent reviews the patch
↓
Muse repairs specific findings, within a fixed limit
This guide sets up that workflow using paid Muse Spark 1.3 through OpenCode Zen. The primary assistant retains responsibility for accepting the change. Muse handles implementation and bounded repairs.
The examples target local terminal workflows on macOS, Linux or WSL. You need Git, a working Codex or Claude Code installation, and permission to send the selected project material to the chosen provider. A local login does not automatically carry over to a cloud coding environment.
Choose between paid and Contributor access
OpenCode Zen lists separate model IDs for paid and Contributor access:
| OpenCode model ID | Route |
|---|---|
opencode/muse-spark-1.3 |
Paid Muse Spark 1.3 |
opencode/muse-spark-1.3-contributor-free |
Contributor Free, currently a limited-time offer |
OpenCode explicitly says the Contributor offer permits prompts and completions to be used to train future Meta models. In a coding session, that can include code and tool output supplied as model context. OpenCode Zen documentation
The paid route is the focus of this guide. Meta describes its Standard tier as excluding prompts and completions from model training. Review the terms of the selected provider route before submitting private code. Meta pricing and data-use distinction
Access outside Meta’s direct offering
Access is another reason to consider a gateway. Meta’s direct API has geographic eligibility rules, and OpenCode explicitly flags regional restrictions for its Go Contributor offering. Meta availability, OpenCode Go
Paid Muse Spark was tested through OpenCode Zen from Sweden, within the EU, without requiring a direct Meta API account. This provides a practical access route for developers who cannot use Meta’s direct offering.
The Zen overview, documentation and general terms reviewed for this guide did not list a general country allowlist or blanket EU exclusion. Access from Sweden was confirmed; availability in other countries remains subject to provider restrictions and applicable law. Zen overview, OpenCode terms
1. Install OpenCode and connect paid Zen
Install OpenCode with npm, then start the authentication flow:
npm install -g opencode-ai
opencode --version
opencode auth login
Choose OpenCode Zen in the login flow. Create and fund a Zen account, then provide
its key locally if prompted. Keep the key out of your repository, skill file and
chat history. OpenCode also supports connecting through /connect in its terminal
interface. Installation, CLI authentication
Set a monthly usage limit and review the auto-reload settings before the first job. The usage limit controls spending; auto-reload controls balance top-ups. Zen billing controls
Check the model catalogue and CLI options:
opencode models opencode --verbose
opencode run --help
Locate opencode/muse-spark-1.3 and confirm that xhigh appears among its variants.
The inspected installation, OpenCode 1.18.30, maps this variant to
reasoningEffort: xhigh. The skill below selects it explicitly.
OpenCode model variants
The local configuration supports this setting. A separate paid end-to-end trial
with xhigh remains outstanding; the earlier experiments did not explicitly select
that variant.
2. Add a skill to Codex or Claude Code
A skill packages reusable instructions for the coding assistant. This one defines the task handoff, execution limits and acceptance checks.
Create the directory for the tool you use:
Codex:
mkdir -p .agents/skills/muse-coding
Save the skill below as .agents/skills/muse-coding/SKILL.md. Codex discovers
repository skills in .agents/skills; invoke this one as $muse-coding.
Codex skill documentation
Claude Code:
mkdir -p .claude/skills/muse-coding
Save the same content as .claude/skills/muse-coding/SKILL.md. Invoke it with
/muse-coding. If you created the top-level skills directory during an existing
session and the skill is missing, restart Claude Code.
Claude Code skill documentation
For both tools, maintain an identical copy in each location. The assistant keeps its existing default model and API endpoint.
The skill
Copy the following into SKILL.md:
---
name: muse-coding
description: Delegate bounded coding and repair tasks to paid Muse Spark through OpenCode. Use when implementation should be offloaded while this agent retains scoping, testing and final review.
---
Use paid `opencode/muse-spark-1.3` with variant `xhigh`.
Confirm the installed CLI supports that model and variant. Do not silently
switch model, effort, provider or free/Contributor route.
Before a job:
- Confirm the project's provider/data authorization and spending allowance.
- Write a task contract with objective, base revision, allowed files,
public interfaces, non-goals and concrete acceptance commands.
- Use a dedicated worktree or candidate copy; preserve existing user edits.
- Keep credentials, unrelated projects and private grader material out of
the worker context. Use the project's approved execution permissions.
Run OpenCode with an argv list equivalent to:
```text
opencode run --pure --dir <candidate-directory>
--model opencode/muse-spark-1.3 --variant xhigh --format json
"Read MUSE_TASK.md, implement the task, run its checks and review your patch. Report changed files, test results and remaining issues. Do not commit, merge or publish."
```
Save MUSE_TASK.md in the candidate before invocation. Treat it as read-only.
Use a supervising runner with a timeout, saved JSONL/stderr and visible
running/failed/completed status. Start with 30 minutes per call and at most
two repair rounds unless the project specifies other limits. Stop on a
permission or provider failure; preserve work and report the cause.
After the call, inspect the diff and run acceptance commands independently.
Review correctness and edge cases; do not accept based only on Muse's report
or a zero-test success. Return concrete defects to Muse within the repair
limit, then repeat checks and review. No automatic merge or model fallback.
A worktree and this skill are not OS sandboxes. Respect the project's actual
isolation policy. --pure disables external plugins, not all inherited config.
Report acceptance or remaining blockers, changed files, actual checks,
time, repairs and known cost. Include failed-call costs. Keep provider
estimates separate from invoices and subscription usage.
The skill supplies instructions. A supervising process must implement timeouts, status reporting and execution limits. Start with foreground jobs if the assistant cannot reliably supervise a background command; add a runner before unattended use.
3. Delegate a defined task
For a project with a reproduced pagination bug, a Codex request could be:
Use $muse-coding to fix the pagination boundary bug in this project.
First inspect the relevant code and define the expected behavior.
Delegate the implementation and regression tests to Muse Spark xhigh.
Use paid OpenCode Zen, with a $2 pilot allowance and at most two repair rounds.
Run our normal checks yourself and review the final diff before accepting it.
Show me where I can see whether the job is running, failed or complete.
In Claude Code, use the same request with /muse-coding in place of $muse-coding.
Replace the example task and allowance with your own. A spending instruction is
not a provider-enforced hard stop; configure the account and runner accordingly.
Start with work that has a clear acceptance criterion: a reproduced bug, an endpoint with an agreed interface, or regression tests for known behavior. Expand the scope after the workflow produces reliable results in your codebase.
Require the coordinating assistant to return the task contract, patch, test evidence and review outcome. Muse’s completion report alone is insufficient for acceptance.
4. Inspect execution and retain evidence
From a dedicated candidate worktree containing MUSE_TASK.md, the core command is:
opencode run --pure \
--dir "$PWD" \
--model opencode/muse-spark-1.3 \
--variant xhigh \
--format json \
"Read MUSE_TASK.md. Implement only its allowed changes, run its checks, and report results. Do not commit, merge or publish."
This command runs a billable coding job with an explicit model, effort setting and output format. Use the project’s approved execution permissions and investigate permission failures before changing them. OpenCode CLI
For repeated use, preserve a separate run directory for the contract, JSONL events, stderr, exit code, diff and test results. Keep it out of version control. Show a last-activity timestamp and a terminal outcome. A saved “running” label is not sufficient if the process has already died.
A provider overload interrupted a review during the experiment. Retrying that stage preserved the completed implementation, while adding time and token costs. Retain completed work and limit retries so that a temporary failure does not restart the entire task.
Estimate the savings
The published Zen rates show a substantial difference in token prices:
| Model | Input per million tokens | Output per million tokens | Cached input per million tokens |
|---|---|---|---|
| Muse Spark 1.3 | $1.25 | $4.25 | $0.15 |
| GPT-6 Astra, standard context tier | $10.00 | $50.00 | $1.00 |
Rates checked on 19 September 2026. OpenCode Zen pricing
For an illustrative workload of one million uncached input tokens and 100,000 billable output tokens, spread across requests within the standard context tier:
- Muse: $1.675.
- Astra: $15.00.
Muse costs approximately 89% less in this equal-token example. Actual task savings depend on token consumption, review effort and repair rounds. The example excludes payment fees, retries and additional model calls; it does not establish an equivalent reduction in the cost of an accepted solution.
For subscription users, the immediate benefit is potentially more work within the existing premium allowance. Offloading adds a metered charge while leaving the subscription fee unchanged. Assess the full workflow: planning, implementation, reviews and repairs, through to an accepted patch.
What the initial results show
In one demanding trial, Muse’s original implementation and self-review reported about $0.71 in model costs. A later repair phase added approximately $1.34, including a failed review and retry. Muse corrected major defects and passed the controller’s tests, but Astra still requested changes after the two permitted repair rounds.
These results support further testing of Muse as a supervised coding worker. They do not establish quality parity with Astra. Paid OpenCode calls were exercised through the local evaluation harness; the Claude Code skill setup follows official documentation but still requires its own end-to-end trial.
Begin with a defined task, a small spending allowance and independent final review. Measure the total cost and time required to reach an accepted result. That is the useful comparison when deciding which work to delegate.