Meta Muse Code: A Terminal Coding Agent That Runs
Meta launches Muse Code, a terminal-native coding agent powered by Muse Spark 1.2. Async background agents, event-log replay, and 24-hour GPU kernel optimization sessions.
Meta Muse Code: A Terminal Coding Agent That Runs
I left it running overnight. When I woke up, my terminal had 1,247 tool calls logged, a freshly optimized MLA attention kernel sitting in kernels/mla_hopper_v3.cu, and a benchmark report showing a 2.3x throughput improvement over my hand-tuned baseline. No crashes, no hallucinated imports, no drift. The agent had restarted itself twice after my laptop went to sleep, picked up exactly where it left off both times, and kept grinding.
That was my first real session with Muse Code, Meta’s new terminal coding agent released on August 5, 2026. Powered by the freshly minted Muse Spark 1.2 model, it represents Meta’s clearest statement yet: they’re not just building foundation models — they’re building the tools that wield them.
What Is Muse Code?
Muse Code is a terminal-native coding agent currently in beta. You install it with a single command:
curl -fsSL https://dev.meta.ai/install.sh | bash
Once installed, muse becomes available in your shell. It reads your codebase, proposes changes, executes commands, runs tests, and iterates — much like Claude Code or Codex. But Meta has made several architectural choices that distinguish it from the current crop of terminal agents.
Async Background Agents
The headline feature is persistent subagents. When you kick off a task, Muse Code can spawn background agents that continue running independently. These aren’t fire-and-forget shell processes — they’re full reasoning agents with their own tool access, memory, and goals. You can close your terminal, reopen it hours later, and check their status. They report back when done or when they hit a decision point that requires your input.
This unlocks a workflow that other agents struggle with: parallelized, long-running tasks. Need to refactor a module while simultaneously writing integration tests for a different service? Spawn two agents. Need to research an unfamiliar API while continuing to write business logic? One agent digs through documentation while you keep working with the primary agent.
Event-Log Runtime
Under the hood, Muse Code uses an event-log architecture. Every tool call, model response, file edit, and decision is recorded in an append-only log. This gives you two properties that matter enormously for long sessions:
- Replay-exact: You can replay any session from any point and get deterministic behavior up to that point. This is invaluable for debugging agent behavior — if something went wrong at step 847, you can replay up to step 846 and intervene.
- Restart-safe: If the agent crashes, loses connection, or you simply reboot your machine, it picks up from the last logged event. No lost context, no repeated work. The overnight GPU kernel session I described above survived two connection drops without missing a beat.
This is a meaningful advance over agents that maintain state purely in context windows. When you’re running sessions that last hours or days, context window management becomes the bottleneck. Muse Code sidesteps this entirely.
Bundled Skills
Muse Code ships with three built-in slash commands that act as structured workflows:
- /plan — Generates a multi-step implementation plan for a task, with estimated complexity and dependencies. You can approve, modify, or reject individual steps before execution begins.
- /grill — An adversarial review mode. The agent stress-tests your code (or its own output) by generating edge cases, looking for logic errors, and attempting to break assumptions. Think of it as a built-in code reviewer that’s actively trying to find problems.
- /goal — Sets a high-level objective with success criteria. The agent then works autonomously toward that goal, making its own tactical decisions about how to get there. This is the mode that powered my overnight kernel optimization session.
Muse Spark 1.2: The Model Underneath
Muse Code is only as good as its underlying model, and Meta has put serious work into Muse Spark 1.2. It’s a coding-focused update to Muse Spark 1.1, with significantly scaled-up training compute dedicated specifically to coding tasks.
Co-Training With the Harness
The most interesting training decision: Muse Spark 1.2 was co-trained with the Muse Code harness itself. The model didn’t just learn to write code — it learned to write code within the specific tool-use patterns and constraints of Muse Code. It knows when to spawn a subagent vs. handle something inline. It knows how to structure its tool calls for optimal event-log replay. It understands the skill system natively.
This is a departure from the “general model + prompt engineering” approach used by most competitors. By training the model and harness together, Meta claims (and my experience tentatively confirms) significantly better tool-use reliability and fewer wasted turns.
Long-Horizon Training
Where most coding models are trained on function-level or file-level tasks, Muse Spark 1.2 was trained on:
- Whole-repository generation — creating entire repos from specifications
- Large end-to-end projects — multi-file, multi-day development tasks with complex dependencies
- Auto-research — tasks that require reading documentation, exploring APIs, and synthesizing information before writing code
This explains why the model doesn’t fall apart on multi-hour sessions. It’s been trained to maintain coherence over hundreds or thousands of steps, not just within a single prompt-response cycle.
Self-Improvement Loop
Meta employed a clever bootstrapping strategy: Muse Spark 1.1 generated challenging coding environments and test cases, then Muse Spark 1.2 was trained by grading solutions against those environments. The older model acts as an adversary and curriculum designer, while the newer model learns to solve increasingly difficult problems.
This is conceptually similar to self-play in game AI, but applied to software engineering. The result is a model that has been stress-tested against adversarial scenarios that no human-curated benchmark would cover.
Case Study: GPU Kernel Optimization
Meta’s most compelling demo is iterative GPU kernel optimization on NVIDIA Hopper architecture. Using the /goal skill, Muse Code was pointed at KDA (Key-Dot-Attention) and MLA (Multi-Latent Attention) kernels with the objective of maximizing throughput.
The agent ran for up to 24 hours, executing over 1,000 tool calls. It:
- Profiled the existing kernel with
ncu - Identified bottlenecks in shared memory usage and warp scheduling
- Generated alternative implementations
- Benchmarked each variant
- Analyzed performance counters to understand why certain approaches worked
- Iterated with increasingly fine-grained optimizations
- Documented its reasoning and final results
This isn’t a task you’d trust to a coding agent that loses context after 50 turns. The event-log runtime and long-horizon training make it feasible. Whether the results match a human CUDA expert’s best effort is debatable — but the fact that it can run autonomously for a day and produce meaningful optimization is a capability milestone.
How Does Muse Code Compare?
Here’s how Muse Code stacks up against the other major terminal coding agents as of August 2026:
| Feature | Muse Code (Beta) | Claude Code | Codex CLI |
|---|---|---|---|
| Model | Muse Spark 1.2 | Claude Sonnet 4 / Opus | GPT-4.1 / o3 |
| Install | One-line curl | npm install | pip install |
| Background agents | ✅ Persistent subagents | ❌ Single session | ❌ Single session |
| Session persistence | Event-log (restart-safe) | Context-window based | Context-window based |
| Max session length | 24h+ tested | Context window limit | Context window limit |
| Replay/debug | Deterministic replay | ❌ | ❌ |
| Built-in skills | /plan, /grill, /goal | Prompt-based | Prompt-based |
| Model-harness co-training | ✅ | ❌ | ❌ |
| Open weights | Expected (Llama tradition) | ❌ Proprietary | ❌ Proprietary |
| Pricing | Meta Model API | Anthropic API | OpenAI API |
| Maturity | Beta (new) | Stable | Stable |
The architectural advantages are clear: persistent background agents and event-log replay are genuinely new capabilities, not incremental improvements. The tradeoff is maturity — Claude Code and Codex have been in production for months, with polished ecosystems and known failure modes. Muse Code is two days old.
For a broader comparison of terminal coding tools, see our full comparison of AI coding assistants.
Availability
Muse Spark 1.2 is available through the Meta Model API with expanded global access. Meta has been steadily widening API availability throughout 2026, and this release continues that trend. Given Meta’s track record with the Llama family, open weights for Muse Spark 1.2 are widely expected, though not confirmed at launch.
Muse Code itself is free during beta. Install it, authenticate with your Meta developer account, and start using it immediately.
Who Should Try This?
Try it now if:
- You work on long-running, complex codebases where multi-hour agent sessions would help
- You do GPU/kernel development and want to explore autonomous optimization
- You want background agents that persist across terminal sessions
- You’re comfortable with beta software and want to shape the product early
Wait if:
- You need rock-solid reliability for production workflows today
- Your tasks are short and well-defined (existing agents handle these fine)
- You’re not ready to add another API provider to your stack
What This Means for the Space
Meta’s entry into the terminal agent space with this level of architectural ambition raises the bar. The event-log runtime and persistent subagents aren’t features that other providers can bolt on overnight — they require fundamental rearchitecting of how agent sessions work.
More broadly, the co-training approach (model + harness trained together) points toward a future where coding agents aren’t general models with tool-use wrappers, but purpose-built systems where the model and its execution environment are designed as one unit.
Two days in, Muse Code already feels like it’s solving different problems than its competitors. Not better at the same things — different things entirely. The 24-hour kernel optimization session isn’t just a demo; it’s a signal about where coding agents are headed.
FAQ
Is Muse Code open source?
Muse Code is currently in beta and available for free. Meta has not confirmed whether the client itself will be open-sourced. Given Meta’s Llama tradition, open weights for Muse Spark 1.2 are expected but not yet announced.
How does Muse Code handle API costs?
During beta, Muse Code usage is covered through the Meta Model API. Pricing details for post-beta are not yet published. Long sessions (like the 24-hour kernel optimization) will presumably incur significant token costs once pricing is finalized.
Can I use Muse Spark 1.2 without Muse Code?
Yes. Muse Spark 1.2 is available as a standalone model through the Meta Model API. You can use it via API calls for any purpose. However, the co-training means it performs best within the Muse Code harness.
Does Muse Code work with other models?
Currently, Muse Code is designed specifically for Muse Spark 1.2. Whether Meta will add support for other models (or whether the community will add it) remains to be seen.
How does the event-log runtime affect privacy?
Event logs are stored locally on your machine by default. They contain full records of agent actions including file contents and command outputs. Meta’s documentation states that logs are not uploaded unless you explicitly opt into telemetry.
Is Muse Code suitable for production use?
It’s in beta. Use it for development and experimentation. Don’t put it in your CI/CD pipeline yet. Meta explicitly labels this as beta software with expected rough edges.
How does it compare to Claude Code for everyday tasks?
For short, well-defined tasks (fix a bug, write a function, add a feature), Claude Code and Codex remain extremely capable and more battle-tested. Muse Code’s advantages emerge on longer, more complex sessions where persistence and parallelism matter. See our detailed comparison for more.


