{"slug": "opencode-muse-use-meta-ai-s-muse-code-subscription-in-opencode", "title": "OpenCode-Muse: Use Meta AI's Muse Code Subscription in OpenCode", "summary": "The opencode-muse plugin, published at version 0.7.0, lets OpenCode and OpenChamber use a Meta Muse Code subscription while keeping authentication and inference inside the official Muse Code CLI via `muse serve` and `@muse-code/sdk`, so no subscription credential is extracted, cached, or injected into OpenCode. Verified Muse CLI versions are 1.4.12 and 1.4.13, and the plugin defaults to the Contributor billing lane unless the `OPENCODE_MUSE_CONTRIBUTOR_MODE=off` environment variable is set to request the Standard lane. The author notes that config-array package loading was not observed on OpenCode 2.1.3, so users on versions that ignore the package entry must install the package locally and add a file under `.opencode/plugins/`.", "body_md": "An [OpenCode](https://opencode.ai) plugin that lets OpenCode (and therefore\n[OpenChamber](https://openchamber.dev/)) use a Muse Code subscription with\nauth and inference staying entirely inside the official Muse Code CLI\n(`muse serve`, via `@muse-code/sdk`).\n\nNo subscription credential is ever extracted, cached, or injected into OpenCode.\n\nAdd the published package to your project-level `opencode.jsonc` (or\n`opencode.json`):\n\n```\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugins\": [\"opencode-muse@0.7.0\"],\n}\n```\n\nOpenCode downloads and manages the public package, so users do not need to run\n`npm install` or create an npm account. Sign in with `muse login` (see below),\nrestart OpenCode or OpenChamber if it was already running, and choose a Muse\nmodel.\n\n**Compatibility fallback:** Current OpenCode V2 documentation supports package\nentries in `plugins`, but our earlier probes did not observe config-array\nloading on OpenCode 2.1.3; the embedded OpenCode 2.0.32 flow was verified with a\nproject-local plugin file. If your OpenCode version ignores the package entry,\ninstall the package locally and add this file under `.opencode/plugins/`:\n\n```\nnpm install opencode-muse\nmkdir -p .opencode/plugins\ncat > .opencode/plugins/opencode-muse.js <<'EOF'\nexport { default } from \"opencode-muse\";\nEOF\n```\n\nThe locally packed package passed provider discovery and a text-turn smoke\ntest. Muse models and a text turn were also confirmed in OpenChamber after\nrestarting it. Verified Muse CLI versions are 1.4.12 and 1.4.13 (the SDK\nstays 1.4.12; a newer CLI fingerprint starts with a recorded warning\ninstead of failing). See\n[#21](https://github.com/pgquiles/opencode-muse/issues/21).\n\nSign in through the official Muse Code CLI before using the provider:\n\n```\nmuse login\n```\n\nOpenChamber's current provider UI does not expose OpenCode plugin `command`\nauthentication methods, so this plugin does not promise a sign-in button. It\nuses the Muse CLI's existing account/configuration through `muse serve`; it\nnever reads Muse credential files, exports tokens, or changes subscription\nmode. If the CLI has no usable model catalog, the provider remains a disabled\nsetup placeholder rather than advertising a model that will fail on use.\n\nThe billing lane is a plain process environment variable read once when the\nplugin loads (it is not an `opencode.json` field — probed on OpenCode 2.1.4,\nplugin options arrive empty):\n\n| Value | Meaning | \n|---|---|\n| unset (default) | Request the Contributor lane, like the Muse TUI | \n| `on` | Same as the default, explicit | \n| `off` | Request the Standard lane | \n\n```\n# One session on the Standard lane:\nOPENCODE_MUSE_CONTRIBUTOR_MODE=off opencode\n\n# Persist it by exporting the variable in your shell profile\n# (e.g. ~/.bashrc, ~/.zshrc) before launching OpenCode/OpenChamber.\n```\n\nRestart OpenCode/OpenChamber after changing it; the lane is fixed when the\nplugin loads. Anything else fails setup with a clear error instead of\nbilling the wrong lane. Confirm the requested lane in the startup log and\nthe billed lane with `muse usage`. See\n[#29](https://github.com/pgquiles/opencode-muse/issues/29).\n\n- Use Muse Code models from OpenCode or OpenChamber after adding the package to your OpenCode plugin configuration.\n- Keep Muse sign-in and inference inside the official Muse CLI; the plugin never copies or stores your subscription credentials.\n- Bill through the Contributor lane by default, like the Muse TUI, with a\ndocumented opt-out to the Standard lane. See [Configuration](#configuration) and[#29](https://github.com/pgquiles/opencode-muse/issues/29) .\n- Continue text conversations in a mapped Muse session, including resuming supported sessions and replaying available session updates after reconnects.\n- Attach supported images (PNG, JPEG, GIF, WebP) and videos (MP4, MOV) to a Muse turn.\n- Attach audio clips (WAV, MP3, OGG, and anything else the CLI's local\ndecoder accepts) to a Muse turn: the plugin transcribes them through the\nofficial `muse voice transcribe` route — voice mode is included in every\nsubscription plan — and the transcript enters the turn as declared text.\nA clip that cannot be transcribed fails the turn loudly instead of being\nsilently dropped. See[#32](https://github.com/pgquiles/opencode-muse/issues/32) .\n- Attach PDF files to a Muse turn: the plugin stages the bytes under the\nsession workspace (generated name, never a user-supplied path) and tells\nthe model where to read them, so the agent parses them with its own\ntools. The staging directory is purged when the provider unloads. See\n[#33](https://github.com/pgquiles/opencode-muse/issues/33) .\n- Pick a reasoning effort per model through OpenCode's own controls: an\nuntouched model runs its catalog default (which rotates over time), Ctrl+T\ncycles the concrete variants (`minimal` …`max` , model-dependent, one way\nuntil the model is reselected), and the TUI`/effort` command (\"Switch model\nvariant\", verified end to end) or a`#variant` model suffix\n(`opencode run --model muse/…#high` ) selects one explicitly. Unknown variants\nfail the turn instead of guessing. See[#28](https://github.com/pgquiles/opencode-muse/issues/28) .\n- Answer Muse's permission prompts conversationally: Muse's exact options are\nshown as a lettered list and your next message picks one (fuzzy match on\nletter, number, or name). Anything unrecognized is asked once more, then\ndenied — ambiguity never approves — and your message still runs as a\nfresh turn instead of being eaten, so a re-asking model can never trap\nthe conversation. Queued prompts are answered\nfirst-in-first-out with an echo of what was granted. See\n[#30](https://github.com/pgquiles/opencode-muse/issues/30) .\n- Answer Muse's structured option-questions conversationally: the oldest\nunanswered question renders as a lettered list and your next message\nanswers it the same forgiving-match way, with the question echoed back on\nsuccess. See [#31](https://github.com/pgquiles/opencode-muse/issues/31) .\n- Work each OpenCode session on its own server-managed worktree instead of\nsharing the checkout: concurrent sessions stop serializing at the\nworkspace lock, and the human merges worktrees back through normal\nsource control (the bridge never auto-merges). Requires a trusted\nworkspace and a CLI serving the experimental worktree surface;\notherwise the single-writer lock applies with a notice. Empty\nworktrees are removed when the provider unloads; anything with\nunique work is left for you. See\n[#34](https://github.com/pgquiles/opencode-muse/issues/34) .\n- Stay working across Muse CLI updates: capability checks against the pinned\nCLI mean a newer CLI fingerprint starts with a recorded warning instead of\nfailing, and only a missing/malformed fingerprint or an unsupported\nenvelope version fails closed. See\n[#21](https://github.com/pgquiles/opencode-muse/issues/21) .\n- Let Muse run its own agent and tools, while the plugin prevents overlapping writes to the same workspace.\n\n- **Approvals:** conversational verdicts skip OpenCode permission rules until\ncore ships a native verdict channel (tracked in[#22](https://github.com/pgquiles/opencode-muse/issues/22) ). The\nconversational flow above stands in meanwhile.\n- **Structured input:** single-select option-questions are answered\nconversationally; multi-select and option-less questions cancel with a\nreason until native structured input lands (tracked in[#6](https://github.com/pgquiles/opencode-muse/issues/6) ).\n- **Files and response formats:** The bridge accepts text, PNG/JPEG/GIF/WebP\nimages, MP4/MOV video, audio clips (transcribed to labeled text), and\nPDF files (staged into the workspace for the agent to read) — see\nFeatures.\nStrict JSON output and some OpenCode generation settings (such as\ntemperature and token limits) are not supported; requests that require a\nspecific OpenCode tool are rejected. Muse's separate CLI JSON-output\ncommands (`muse exec --json` , transcript`muse export` ) are not exposed\nas OpenCode features;`muse exec --output-schema` answer-shaping stays\nunwired because it would fork the turn pipeline (see #35).\n- **Tools and agent instructions:** Muse runs its own agent and tools; OpenCode\ntools are not executed for a Muse turn. Recognized custom-agent instructions\nmay be forwarded, but Muse otherwise follows its own workspace rules.\n- **Rewind and session names:** Rewind/fork is unavailable on the currently\ntested Linux Muse runtime, and custom session names may not work. Start a new\nsession after rewinding or editing the OpenCode conversation. Rewinding does\nnot undo files Muse changed. See[#20](https://github.com/pgquiles/opencode-muse/issues/20) .\n- **Recovery after missed events:** Basic session resume and cursor replay have\nbeen tested, but recovery from a real Muse event gap has only been tested\nwith a simulated gap. See[#23](https://github.com/pgquiles/opencode-muse/issues/23) .\n- **Billing:** opencode-muse is subscription-only; for pay-as-you-go use\nOpenCode's official OpenAI-compatible provider (`metamate` ). Only`muse usage` confirms the billed lane, and unknown Contributor settings fail\nclosed instead of guessing. Contributor catalog rows bill the requested lane\nlike every other row. See[Configuration](#configuration) and[#29](https://github.com/pgquiles/opencode-muse/issues/29) .\n- **Simultaneous work:** Each OpenCode session gets its own worktree where\nthe CLI supports it (see Features); where worktrees are unavailable the\nplugin allows only one active writer per workspace, so a new turn may be\nreported as busy while another is still finishing.\n\n- **Contributor mode is fully supported and is the default** (see[Configuration](#configuration) ). If something labeled \"Contributor\" fails,\ncheck which provider it belongs to first:\n- **\"Muse Spark 1.3 Contributor\" never connects after a model switch:** that\nentry is a retired OpenCode-gateway model (`opencode/muse-spark-1.3-contributor-free` ),\nnot this plugin's model. It no longer resolves anywhere, so OpenCode keeps\nretrying and the session appears stuck on \"connecting\". Pick the model under\nprovider**Muse Code** —`muse/muse-profile-tbh-model-muse-spark-1.3` —\ninstead of any historical \"contributor-free\" entry in recent-model lists. See[#26](https://github.com/pgquiles/opencode-muse/issues/26) .\n\n- [opencode-claude](https://github.com/openchamber/opencode-claude) — a\nreference for OpenCode v2 plugin setup, model/session hooks, bridge\nlifecycle, and the local-proxy fallback. This plugin uses Muse-native tools;\nauth and inference stay in the Muse CLI.\n- [muse-code-sdk](https://github.com/meta-models/muse-code-sdk) — official\nMuse Code SDK and the Muse Session Protocol used by this plugin.\n- [Paseo's Muse Code integration](https://paseo.sh/docs/muse-code) — a\nprotocol-level reference implementation.\n\n- [opencode-muse-auth](https://github.com/TheStreamCode/opencode-muse-auth) is another credential-extraction/direct-API approach; see its[issue #12](https://github.com/TheStreamCode/opencode-muse-auth/issues/12) for its discussion of subscription-term concerns.\n- [opencode-muse-code](https://github.com/swalker326/opencode-muse-code) is an unofficial direct-API alternative. It reads the Muse CLI login, requests an API key from Meta, and sends model requests to Meta's API from OpenCode instead of routing inference through`muse serve` and MSP. Its subscription eligibility is separate from this plugin's CLI-mediated approach and has not been established by this project.\n- [Official Muse Code documentation](https://dev.meta.ai/docs/quickstart#agent-setup) describes using Muse models in OpenCode through the Meta API.", "url": "https://wpnews.pro/news/opencode-muse-use-meta-ai-s-muse-code-subscription-in-opencode", "canonical_source": "https://github.com/pgquiles/opencode-muse", "published_at": "2026-10-27 22:56:05+00:00", "updated_at": "2026-10-27 23:11:25.487051+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-products"], "entities": ["OpenCode", "OpenChamber", "Meta", "Muse Code", "opencode-muse", "@muse-code/sdk"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/opencode-muse-use-meta-ai-s-muse-code-subscription-in-opencode", "markdown": "https://wpnews.pro/news/opencode-muse-use-meta-ai-s-muse-code-subscription-in-opencode.md", "text": "https://wpnews.pro/news/opencode-muse-use-meta-ai-s-muse-code-subscription-in-opencode.txt", "jsonld": "https://wpnews.pro/news/opencode-muse-use-meta-ai-s-muse-code-subscription-in-opencode.jsonld"}}