Skip to content

Add Meta's Muse Code as a selectable SANDY_AGENT option #128

Description

@rappdw

Goal

Add Muse Code (Meta's terminal coding agent, released beta 2026-08-05, powered by Muse Spark 1.2) as a selectable SANDY_AGENT value alongside claude/gemini/codex/opencode/grok — so SANDY_AGENT=muse sandy (name TBD) runs it inside a sandy sandbox.

What Muse Code is (from launch coverage)

  • Terminal agent, macOS + Linux, beta, single-command install.
  • Model: Muse Spark 1.2 (co-trained), scores ~82.9% Terminal-Bench 2.1.
  • Auth/access via the Meta Model API (public preview; contributor-tier pricing).
  • Features: plans/writes/validates code, persistent background + parallel sub-agents in isolated worktrees, a local event log (model calls, tool use, approvals, edits) enabling crash-resume.

Closest existing template: grok (#99 / v1.5.0)

Muse Code looks grok-shaped: a prebuilt binary installed via a single command, authenticating headlessly from an API key (no interactive-login file to materialize). Follow the grok addition as the reference implementation. (If it turns out to be npm-installed like gemini/codex/opencode, follow those instead.)

Key unknowns to confirm FIRST (research before coding)

  • Install mechanism — exact single command; npm package vs prebuilt binary (a binary needs grok's relocate-off-the-tmpfs-home trick to /usr/local/bin).
  • Credential env var — the Meta Model API key variable name (e.g. META_API_KEY/MUSE_API_KEY?). Whether it authenticates fully headless from that env var (grok-style) or needs an auth file/OAuth (codex-style). This decides whether sandy just forwards the key (privileged-tier) or must materialize an auth file.
  • Headless/print invocation — the -p/exec/run-equivalent for one-shot mode (sandy -p), and whether --continue/-c exists.
  • Model flag — how to pass the model (default muse-spark-1.2), for a MUSE_MODEL passing knob.
  • Version pin/floating — install pins a version or floats latest (affects the CVE-watch/auto-update posture).

Implementation checklist (mirrors grok/opencode)

  • New single-agent image sandy-muse (+ install in the generated Dockerfile); add muse to sandy-full for multi-agent combos.
  • build_muse_cmd() routed through _sandy_wrap_cmd_exit_pause + _sandy_translate_args.
  • Config keys: MUSE_MODEL + SANDY_MUSE_AUTH=auto|api_key|oauth (passive-safe); the API key (privileged-tier, forwarded via -e) — add _sandy_key_metadata rows + run test/regen-config-docs.sh.
  • Credential probe order + ephemeral handling (never persist; grok forwards env, codex materializes a :ro auth.json — pick per the auth finding above).
  • Headless translation for -p/--print/--prompt (and drop --continue if unsupported).
  • --print-schema agents list entry (name, image, credential probe order).
  • Feature-support table row in CLAUDE.md; README + SPECIFICATION.md updates.
  • run-tests.sh routing/image-selection assertions (the §54-style static checks).

Multi-agent note

Muse would be the 6th selectable agent, but the layout is still a 2×2 grid (hard cap 4). all stays claude,gemini,codex,opencode (4). A 5+ combo already hard-errors — muse just becomes another opt-in single/combo member, not part of all.

Notes

  • Muse Code's own "parallel sub-agents in isolated worktrees" is an internal feature of the agent, orthogonal to sandy wrapping it — sandy still provides the outer container/egress isolation around the whole Muse process.
  • macOS/Linux only matches sandy's supported hosts; fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions