Building with Muse Code
Build durable, auditable agents with Muse Code, the harness building blocks for safety, recovery, and orchestration. Part of the Cookbook.
- Audit and resume agent sessionsReplay any session exactly as it ran from an append-only event log, show who authorized each action, then kill the run mid-task and resume with no duplicate side effects.
- Deterministic replay in CITurn recorded events into a golden fixture and replay its model-context projection as a merge-blocking CI check.
- Staged approvalsSplit a compound shell command into stages so safe ones auto-resolve while risky ones hold for review.
- Contained executionRun every command in an OS sandbox that refuses to proceed unless containment is proven live.
- Immutable guardrailsThe agent can't rewrite its own rules: guardrail edits stop for review and a shell write to the same path fails read-only at the sandbox.
- Subagent fanoutFan one job out to parallel subagents, each in its own isolated git worktree.
- Goal trackingPin an objective once and the harness audits the work against acceptance checks before the goal can close.
- Bundled skillsDrive the built-in /plan, /grilling, /grill-with-docs, and /taste skills to plan, pressure-test, and build.
- Loop and cronSchedule recurring or one-time agent work in natural language, then view, change, or cancel it from the same chat.
- Side chatsBranch off the main thread for a side conversation that never enters the main history.
Mirrored from dev.meta.ai/docs/cookbook/muse-code (synced Oct 30, 2026). Text and examples © Meta. Live demos run on Muse Muse's key.