Skip to content

feat(agents): add Muse Code CLI as supervised TUI agent - #21494

Closed
adriendeoliveira wants to merge 2 commits into
stablyai:mainfrom
adriendeoliveira:feat/muse-code-agent
Closed

adriendeoliveira wants to merge 2 commits into
stablyai:mainfrom
adriendeoliveira:feat/muse-code-agent

Conversation

@adriendeoliveira

@adriendeoliveira adriendeoliveira commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Orca can now launch and supervise Meta's Muse Code CLI (muse) like any other
supported agent: it appears in the agent picker, auto-detects from PATH,
receives orchestration tasks, and reports readiness — using your existing Muse
login, no API key involved.

What Changed

Agent registration (same shape as the most recent minimal agents):

  • TuiAgent + TUI_AGENT_CONFIG: detectCmd: 'muse', launchCmd: 'muse --trust-workspace', promptInjectionMode: 'stdin-after-start'
  • Selection order, display names, UI catalog (+ bundled 64px icon, 6 locales),
    telemetry kind, skills-CLI mapping (null → universal target), skill-install
    provider (canonical .agents/skills at both scopes), mobile icon/domain maps
  • Permissions: --yolo default (Manual supported), settings test coverage
  • Docs: supported.mdx row + permissions list, README badges (EN + 6 locales)

Muse-specific behavior, all measured against Muse 1.3.0 (no guessing):

  • The muse launcher execs a versioned muse-bin-<version> binary, so the
    foreground process never equals muse. Recognition accepts the muse-bin-
    prefix (also covers comm-truncated rows) and the expected-process check does
    the same scoped to muse only — no global rule was relaxed
    (ante-obsidian test still guards the generic path).
  • muse exec … (headless one-shot) never classifies as the interactive TUI.
  • Readiness: Muse sets its OSC title to the bare cwd and never updates it, so
    every existing tui-idle tier stayed null and worker-start timed out at
    agent_readiness on a fully booted TUI. New tier-1b lane: the stable ready
    screen (banner + Skills: … loaded + ❯ composer, captured from the real
    TUI) counts only after the standard 3s quiescence. No sleep added, no timeout
    raised. A later trust/approval dialog below the banner vetoes the match, and
    the trust dialog itself already maps to agent-trust-workspace.

Why

Alternative 1 — argv prompt injection (with or without --): rejected with
proof. muse -- resume still dispatches the resume subcommand, so any spec
starting with resume/exec/init/… would misfire. stdin-after-start
(Bare TUI + paste after readiness) avoids argv parsing entirely; bracketed
paste + single Enter verified to submit, including multi-line prompts.

Alternative 2 — agent id musecode (see #19188): muse matches the binary
name like every other agent and matches #18791, so the ecosystem converges on
one id.

Relation to open PRs: supersedes #18791 (same id; this PR adds
muse-bin-* process recognition, exec filtering, the readiness lane, and a
proven worker-start E2E). Alternative to #19188 (id musecode, argv
injection, hooks/resume/vault — intentionally out of scope here; this PR is
the minimal safe core those can build on).

Out of scope (documented, not invented): session resume, agent hooks,
mailbox-pointer push to hookless panes (workers pull via check, as with
other hookless agents), usage/account tracking (#19224).

Linked Issue

Fixes #19672
Relates #14901, #18791, #19188

Visual Proof

TODO (attach when opening): picker screenshot showing Muse + worker-start
E2E transcript below. No committed attachments per repo rule.

orca-dev orchestration worker-start --spec "…" --worktree current --agent muse --json
→ state: ready, stage: input_accepted, dispatch_input: accepted

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Manual (macOS arm64, Muse Code 1.3.0, Meta subscription login):

  • worker-start --agent muse → ready/input_accepted; task injected into
    the Muse TUI; no API key configured anywhere.
  • Trust dialog (fresh worktree, no flag) observed → maps to
    agent-trust-workspace; --trust-workspace launch skips it in both modes.
  • Bracketed-paste + Enter submission verified against the echo provider
    (zero model calls); muse exec / muse -- resume / muse --yolo exec
    dispatch behaviors verified via --help/error paths only.

Automated: 29 new test cases (config, cross-shell yolo/manual startup matrix,
process recognition incl. comm-truncated + unrelated muse-* negatives,
headless matcher, ready-screen body incl. ANSI + trust veto, evidence ranking,
wait-level fake-timer + live-pipeline regression — the live test fails with a
15s timeout on the pre-fix tree).
pnpm typecheck ✓, pnpm lint ✓ (full gate), targeted suites green
(201 tests), full src/main/runtime suite: only pre-existing unrelated
failure (orchestration-cli-subprocess keepalives, fails on pristine tree
too).

AI Disclosure

Implemented with Muse Code (Meta Muse Spark) under human direction; every
Muse behavior claim above was verified against the installed CLI 1.3.0, and
the E2E was run by the author.

Agent skill upstream boundary

  • Not applicable — no upstream skill-installer source copied; the
    skill-install-providers entry is a 6-line data row pointing at the
    canonical .agents/skills root Muse demonstrably reads.

Notes

Security: no auth/credential handling added or changed — Orca only spawns the
muse binary, which uses the user's existing session. --trust-workspace in
the base launch line skips the trust menu (it would otherwise eat the pasted
task); approval/sandbox bypass stays behind the Yolo/Manual switch.
Cross-platform: macOS/Linux per the launcher's own platform gate (no native
Windows binary; WSL follows the Linux path); startup matrix covers
linux/darwin/win32 × posix/powershell/cmd quoting.
Backwards compat: additive only; the one shared-semantics touch
(isExpectedAgentProcess) is gated on expected === 'muse'.
Performance: the new body thunk runs only after the agent gate passes, so
non-Muse panes pay nothing.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

- registry/config/detection/launch/selection/permissions/telemetry/labels
- muse-bin-* process recognition, muse exec headless filtering
- tui-idle readiness via quiet ready-screen body lane
- launchCmd trusts the workspace so the trust menu cannot eat pastes
- narrow process recognition to the muse-bin- prefix
- headless matcher covers exec past any position, case-sensitive
- bundled icon, README badges, supported-agents docs
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

📝 Walkthrough

Walkthrough

The change adds Muse as a supported agent across shared configuration, process recognition, launch behavior, telemetry, skills, renderer and mobile surfaces, localization, and documentation. It recognizes versioned Muse binaries and exec headless commands. It also detects quiet Muse ready screens as TUI-idle evidence and adds unit, integration, and live-PTY coverage.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: 🟠 High · up to d7d0b

Launching Muse in an untrusted workspace can enable project-local behavior without explicit consent, while dismissed trust prompts may leave sessions blocked. These issues should be fixed before merge.

🚥 Pre-merge checks | ✅ 1 | ❌ 4

❌ Failed checks (3 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Most changes support Muse integration, including catalog, documentation, mobile mappings, skills support, runtime detection, and tests. src/shared/skills-cli-agent-keys.ts also changes the existing … Revert the unrelated trae mapping change, unless a separate requirement justifies it and the change is moved to the appropriate pull request.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 32 files. (14 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description covers the change, rationale, linked issue, testing, AI disclosure, scope, security, compatibility, and checklist items. However, the required Visual Proof section is incomplete becaus… Attach the required before-and-after screenshot or video for the agent picker and relevant behavior, or write exactly N/A with a brief explanation if there is no visual or interaction change.
Linked Issues check ❓ Inconclusive The PR implements the coding objectives in #19672 for registration, picker selection, process recognition, launch configuration, Yolo and Manual permissions, readiness detection, trust handling, telem… Provide evidence that Muse does not expose usage or rate-limit data, or add the required tracking and tests if the CLI exposes that data.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: adding Meta's Muse Code CLI as a supervised TUI agent.
Full details: Linked Issues check

Explanation

The PR implements the coding objectives in #19672 for registration, picker selection, process recognition, launch configuration, Yolo and Manual permissions, readiness detection, trust handling, telemetry, and automated tests. The summary states that usage or rate-limit tracking is out of scope. The issue requires this tracking if the Muse CLI exposes it, but the supplied evidence does not establish whether such an API exists.

Full details: Out of Scope Changes check

Explanation

Most changes support Muse integration, including catalog, documentation, mobile mappings, skills support, runtime detection, and tests. src/shared/skills-cli-agent-keys.ts also changes the existing trae mapping to trae-cn. The summary provides no connection between that Trae behavior change and #19672, so it is unrelated to the linked issue.

Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 32 files. (14 skipped: 14 unsupported.)

Full details: Description check

Explanation

The description covers the change, rationale, linked issue, testing, AI disclosure, scope, security, compatibility, and checklist items. However, the required Visual Proof section is incomplete because it says attachments are still TODO for this UI and behavior change.

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Clear a Muse trust block after the Muse prompt appears. · terminal-wait-detection.ts:94-100

src/main/runtime/terminal-wait-detection.ts:94-100
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clear a Muse trust block after the Muse prompt appears.

findDismissedStartupModalIndex omits findMuseReadyPromptIndex, while isMuseReadyPromptPreview treats a Muse ready prompt after the trust signal as ready. detectTerminalWaitBlockedReason uses the actionable signal, so stale Muse trust text can remain actionable. Add the Muse ready index and a regression for a trust dialog followed by MUSE_READY_TAIL.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 396e539f-0cfc-4802-9cbc-5d3911996c2e

📥 Commits

Reviewing files that changed from the base of the PR and between 0b57ce0 and d7d0b03.

⛔ Files ignored due to path filters (1)
  • src/shared/agent-icons/muse.png is excluded by !**/*.png
📒 Files selected for processing (46)
  • README.md
  • docs/readme/README.es.md
  • docs/readme/README.fr.md
  • docs/readme/README.ja.md
  • docs/readme/README.ko.md
  • docs/readme/README.pt.md
  • docs/readme/README.zh-CN.md
  • docs/site/content/docs/agents/supported.mdx
  • mobile/src/components/mobile-agent-icon-assets.ts
  • mobile/src/tasks/mobile-tui-agents.ts
  • src/main/runtime/orca-runtime-resolve-exit-waiters.ts
  • src/main/runtime/runtime-terminal-idle-polls.ts
  • src/main/runtime/runtime-terminal-wait.ts
  • src/main/runtime/terminal-wait-detection.test.ts
  • src/main/runtime/terminal-wait-detection.ts
  • src/main/runtime/terminal-wait-name-only-idle.test.ts
  • src/main/runtime/tui-idle-evidence.test.ts
  • src/main/runtime/tui-idle-evidence.ts
  • src/renderer/src/components/terminal-pane/terminal-startup-command-classifier.test.ts
  • src/renderer/src/components/terminal-pane/terminal-startup-command-classifier.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/agent-catalog.tsx
  • src/renderer/src/lib/agent-favicon-assets.ts
  • src/renderer/src/lib/agent-status.ts
  • src/shared/agent-headless-command.ts
  • src/shared/agent-kind.ts
  • src/shared/agent-process-recognition.test.ts
  • src/shared/agent-process-recognition.ts
  • src/shared/agent-type-label.ts
  • src/shared/constants.test.ts
  • src/shared/muse-headless-command.ts
  • src/shared/skill-install-providers.ts
  • src/shared/skills-cli-agent-keys.ts
  • src/shared/telemetry-property-schemas.ts
  • src/shared/tui-agent-config.test.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-display-names.ts
  • src/shared/tui-agent-permissions.ts
  • src/shared/tui-agent-selection.ts
  • src/shared/tui-agent-startup.test.ts
  • src/shared/tui-agent.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

// Why: skip the workspace trust menu so it cannot consume the drafted task — the TUI
// would otherwise sit on the dialog while Orca pastes into it. Permission bypass
// stays configurable via the yolo default args.
launchCmd: 'muse --trust-workspace',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🛡️ Analyzed with Security Review | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

rg -n "trust-workspace|workspace trust|workspaceTrust|trusted workspace|Manual|manual" src mobile docs/site/content/docs/agents
sed -n '270,310p' src/shared/tui-agent-config.ts
sed -n '700,770p' src/shared/tui-agent-startup.test.ts

Repository: stablyai/orca

Length of output: 50370


🌐 Web query:

Meta Muse Code CLI --trust-workspace skills rules hooks security

💡 Result:

<search_synthesis>
Muse Code is a terminal-based coding agent released by Meta in August 2026, designed for complex, repository-wide tasks [1][2][3]. The --trust-workspace flag is a critical security control in the Muse Code CLI [4][5]. The --trust-workspace flag enables the agent to load and execute project-specific configurations, including skills, rules, and hooks defined within the repository [4]. When this flag is not used, the agent operates with a restricted set of capabilities to prevent unauthorized actions from malicious or untrusted code in a repository [4]. Key security and configuration concepts for Muse Code include: Skills, Rules, and Hooks: Muse Code can utilize repository-local configurations (such as.muse/hooks.json) to automate workflows, enforce coding standards, or trigger custom scripts [4]. These project-level features are only active after the user explicitly grants trust to the workspace [4]. Security and Isolation: Muse Code runs in a sandbox environment by default [4][5]. Using flags like --yolo or --trust-workspace effectively lowers these security boundaries by granting the agent elevated access to project-defined logic [4]. Using --trust-workspace on an untrusted or external repository can allow an attacker to control the agent&#39;s behavior through malicious configurations [4]. Command Usage: The CLI includes several built-in commands for managing these features, such as muse skills to list, inspect, or manage skills, and muse sandbox to verify the environment&#39;s configuration [6][5]. In summary, --trust-workspace acts as a consent mechanism, signaling to the CLI that the user trusts the local configuration files to perform automated tasks [4]. Users are advised to inspect files like AGENTS.md, skill definitions, and hook configurations before enabling trust on unfamiliar repositories to avoid potential security risks [4].
</search_synthesis>

<source_evidence>

<title>Meet Muse Spark 1.2 and Muse Code: a coding model and the agent built to run it | AI Developers blog</title> https://developer.meta.com/ai/resources/blog/build-with-muse-code/ - Fan work out: this recipe is designed to show you how Muse Code distributes one large job across several subagents, each running in parallel in its own isolated git worktree and how they can be controlled from a single point. (Cookbook: Agent fan-out). - Bundled skills: Muse Code comes with a few trusted and tested playbooks built in. This recipe runs four of them end to end to show you what each one does and when to use it. (Cookbook: Bundled skills). - Goal tracking: See how Muse Code keeps an agent on a multi-step task from concept to merge. (Cookbook: Goal tracking). ... - Agent fan-out: Split one big job across multiple subagents each in its own worktree, so nothing collides mid-flight and your working copy stays clean. - Bundled skills: Put a rough idea in, and get a grilled, taste-checked feature out. This recipe shows the built-in playbooks doing the work. - Goal tracking: Set your goal and Muse Code keeps an agent on task, so what you originally wanted is what gets merged. ... Muse Code runs on Model API, but you can start within your terminal by installing the package and authenticating in the browser when prompted before getting your first session off the ground. ... - Muse Spark is a reasoning model. It thinks before it answers; those tokens are billed as output. /effort dials the thinking up or down so you don&`#39`;t have to pay more for deep reasoning on straightforward tasks. - Your tone, format and other standing rules can be set in a system message so you don&`#39`;t have to repeat them every time you send a prompt. ... Muse Code is built around a simple pattern: when a job is split into several different tasks, they&`#39`;re fanned out automatically to separate agents. The parent agent spawns a write-capable child per task, and each child gets its own git worktree, so parallel children never collide on the same files. Your working copy is never touched and you don&`#39`;t set any of this up — Muse Code does it all automatically. ... ``` cd /path/to/your/repo muse --subagent-worktree-isolation ``` ... The isolation is real on disk and the runtime creates each worktree under `.muse/worktrees/` in detached-HEAD state, checked out from the parent&`#39`;s HEAD with no manual `git worktree` command. In the recipe&`#39`;s run, the child that fixed the bug passes the full suite inside its own worktree while the parent&`#39`;s `master` still fails that same test, untouched. The lifecycle is visible in the event log: each worktree walks `operation_requested → prepared → lease_active → workspace_scope_activated`, carrying its `base_commit, base_ref: HEAD, and cleanup_policy: remove_if_clean`. ... We know handing work off to a swarm of sub ... can feel a bit worrying; you can never be 100% sure exactly what they&`#39`;re going ... do. That ... s why we&`#39`;ve built Muse Code to log everything including sessions, agent spawns, actions, and every decision a subagent made. When you&`#39`;re wondering which child did what and when, you can just look it up instead ... having to spend time hunting down what went wrong. ... ## A paved road: bundled skills ... Muse Code ships with a small set of opinionated playbooks so even a rough one sentence idea can get you going fast. The bundled skills include: ... - `/taste`: an anti-slop filter: a flat checklist of visual defaults not to use, so generated UI stops looking machine-made. - `/grilling`: interviews you one decision-forcing question at a time until the design holds up. - `/grill-with-docs`: the same interview, but it writes the settled decisions into your project docs as durable decision records, not chat scrollback. - `/plan`: grounds a plan in your real files, names the key decisions with a recommendation for each, saves it to `.agents/plans/` and stops for approval. No code changes. ... All four are explicit-invocation only. Muse Code won&`#39`;t reach for `/grill` just because a design looks shaky. And a skill loads its full instructions only for the turn you invoke it on; th…[truncated] <title>How to Use Muse Code: Install, Auth, First Task (2026)</title> https://www.layer3labs.io/guides/how-to-use-muse-code How to Use Muse Code: Install, Auth, First Task (2026) Reviewed by Jonathan West · Updated Aug 29, 2026 # How to Use Muse Code From zero to a working Muse Code session — install, authenticate, and drive your first task with the event log. Reviewed by Jonathan West · Updated Aug 29, 2026 Muse Code is Meta&`#39`;s CLI coding agent released 2026-08-05. This guide walks through install, browser authentication, first task, and using the event log. The install and auth flow is deliberately minimal. You should be running a real task within five minutes of the curl command. Every command below is quoted from Meta&`#39`;s launch materials. Anything not published (headless auth, MCP wiring) is called out. ## Install Muse Code Install with a single line: curl -fsSL https://dev.meta.ai/install.sh | bash. Meta ships this as the primary install path. The script drops the muse binary into your PATH. Verify with muse --version. For teams that want to review the install script before running it, download it first (curl -fsSL https://dev.meta.ai/install.sh -o install.sh), audit, then run. - curl -fsSL https://dev.meta.ai/install.sh | bash - Verify: muse --version - Optional: download + audit script first - Binary lands in $PATH Sources Meta Muse Code product page↗ Getting Muse Code wired up for a real team? Book a consult and we will handle auth, tier policy, and adoption together. ## Browser Authentication First run of muse triggers a browser auth flow against your Meta developer account. Sign in and grant the CLI access. For CI or headless environments, a documented headless auth flow is not available at launch. Verify at https://developer.meta.com/ai/products/muse-code/. Once authenticated, credentials cache locally. Subsequent runs skip the browser step. - First run: browser auth against Meta developer account - Headless / CI flow: not documented - Credentials cache locally after first auth - No re-auth per session ## Your First Task cd into a repo, then run muse. The agent reads the local context and starts a task loop. Give it a small verifiable task: "add a missing test for the parseDate function and make sure it passes." You will see a worker draft the test, a reviewer critique it, and the test run. The whole round trip usually takes a couple of minutes. This is the fastest way to feel the multi-agent workflow in practice. - cd into a repo, run muse - Start with one small verifiable task - Worker drafts → reviewer critiques → test runs - A few minutes to full round-trip ## Using the Event Log Every session records a full event log — file edits, tool calls, and decisions. Run muse replay to walk it step by step. Export the full trace when you need to share a session with a teammate or attach it to a compliance review. In our engagement with client engineering teams we treat the event log as a first-class code-review artifact. It gives an outsider enough context to review the agent&`#39`;s reasoning without re-running the session. - muse replay = step-by-step walk - Export the trace for handoff / audit - First-class code-review artifact - Shareable with teammates ## How to use Muse Code You do not host Muse Code yourself — you use it through a tool, so "getting started" really means choosing the right one. The fastest way to put Muse Code to work day to day is inside an AI IDE, and Cursor is the most popular — it supports it directly, so you can be working in minutes. Prefer a different editor? Windsurf, Zed, and GitHub Copilot drive these models too. ## Frequently Asked Questions - How do I install Muse Code? curl -fsSL https://dev.meta.ai/install.sh | bash. Verify with muse --version. - How does authentication work? First run opens a browser to sign into your Meta developer account. Credentials cache locally after that. - Can I run Muse Code in CI? A headless auth flow is not documented at launch. Verify at https://developer.meta.com/ai/products/muse-code/. - What is a good first task? Add a missing test for a …[truncated] <title>Meta launches Muse Code, an AI agent for large code bases | TechCrunch</title> https://techcrunch.com/2026/08/05/meta-launches-muse-code-an-ai-agent-for-large-code-bases/ Meta launches Muse Code, an AI agent for large code bases | TechCrunch Posted: 2:21 PM PDT · August 5, 2026 Image Credits: David Paul Morris/Bloomberg / Getty Images - Lucas Ropek # Meta launches Muse Code, an AI agent for large code bases Meta, considered a bit of a straggler in the AI harnesses realm, is making strides to catch up. This week, the company released a new terminal coding agent aimed at programmers looking for assistance with complex tasks across large software code bases. Muse Code, which is currently available in beta, can accomplish “complete software engineering tasks across large repos,” Meta CEO Mark Zuckerberg said in a social media post on Wednesday. Those tasks include “planning changes, writing code, validating the results,” he added. Code, which can be installed with a single command, is powered by Meta’s previously released coding model, Muse Spark. It handles large projects by launching its own agents, which then work simultaneously. “When a job is big enough, it fans out to separate sub-agents working in parallel in isolated worktrees,” Zuckerberg explained. “Your working copy is never touched. In testing we had it build six features for a game simultaneously with no collisions.” The move attempts to position Meta more competitively, and more affordably, with AI lab peers like OpenAI and its coding agent Codex, and Anthropic with Claude Code. “We think that for a lot of workflows and a lot of use cases, this can be an incredibly good option, especially from a cost perspective,” Alexandr Wang, Meta’s AI chief who leads Meta Superintelligence Labs, told the Wall Street Journal. Meta has been attempting to grow its AI presence by pouring money into development. In June, it expanded beyond its core focus of using AI to support its advertising business and entered the enterprise AI market with an agent aimed at customer service and support. <title>Muse Code Cheat Sheet | Vibecoding.cz</title> https://www.vibecoding.cz/cheat-sheet/muse-code/ | Příkaz / flag | Co udělá | | --- | --- | | `--approval-mode `⧉ | `on-request` (výchozí) · `untrusted` (striktnější pro shell) · `never` (nic se nezastavuje). | | `--approval-judge <on|off>`⧉ | Vypnutím pošle každé rozhodnutí tobě místo automatickému reviewerovi. | | `--sandbox-network `⧉ | `proxy-only` (výchozí, souhlas per destinace) · `restricted` (bez sítě) · `enabled` (plná síť). | ... | `--disable-approval`⧉ | Přeskočí schvalovací prompty, sandbox nechá zapnutý. Vhodné pro automatizaci v izolaci. | | `--disable-sandbox`⧉ | Nechá schvalování, vypne sandbox (i pro file nástroje a síť). Start i `/status` to přiznají. | | `--yolo`⧉ | Vypne schvalování i sandbox a důvěřuje workspace (= profil Unrestricted). Jen v izolovaném prostředí, nikdy na stanici s reálnými tajemstvími. | ... | Příkaz / flag | Co udělá | | --- | --- | | `--trust-workspace`⧉ | Načte project skills, pravidla a hooky checkoutu pro tento běh. | | `--workspace `⧉ | Ukoření workspace nástrojů na danou cestu (policy-gated). | | `--no-session-log`⧉ | Běh bez uloženého logu: bez resume, trajectory exportu, pojmenování, peer messaging a retained recovery workflow. | | `--subagent-worktree-isolation`⧉ | Kompatibilní flag — izolaci stejně žádáš per subagent, flag ji nevynutí všem. | | `muse -w`⧉ | Session ve vlastním Git worktree z `HEAD` — pro paralelní zápisy více session. | | `muse resume`⧉ | Otevře interaktivní UI — není headless povrch. Headless pokračování je `muse exec --session-id `. | ... | `muse export --session `⧉ | Neinteraktivní export běhu (`--out run.json`). Při jiném workspace vyžaduje `--allow-workspace-switch`. | ... muse trace inspect ... ⧉ | Zpětná inspekce uloženého logu session. | ... | `exit ... max-model ... `/`143 ... SIGINT/SIGTERM. ` ... nost — hlídej vlastní ... | Soubor / klíč | K čemu slouží | | --- | --- | | `~/.config/muse/settings.json` | Uživatelské nastavení: výchozí model, TUI předvolby, `permissions.default_profile`, MCP servery, `hooks` blok + `managed_hooks_path`, `runtime_capabilities`, telemetrie. | ... | `AGENTS.md` | Pravidla projektu. V každé úrovni platí první existující z `AGENTS.md`, `CLAUDE.md`, `.agents/AGENTS.md`, `.claude/CLAUDE.md`. Při konfliktu vítězí projekt nad uživatelem a hlubší soubor nad mělčím. Na nedůvěryhodném checkoutu se nenačtou, dokud workspace nedůvěřuješ. | ... | Profil / režim | Chování | | --- | --- | | `Auto-review` | Výchozí: stejný přístup jako Ask me, ale způsobilé žádosti rozhoduje automatický reviewer; když není dostupný, ptá se tebe. | | `Ask me` | Každou způsobilou žádost rozhoduješ ty. Oba režimy běží v módu `on-request`. | | `Unrestricted` | Bez schvalování i sandboxu, workspace důvěryhodný — stejná pozice jako `--yolo`, jen do izolace. | | `Read-only` | Agent čte workspace, ale nezapisuje soubory ani nespouští příkazy s vedlejšími účinky. | ... | `on-request` | Výchozí mód: běžné nerozpoznaně-nebezpečné shell fáze projdou v sandboxu, destruktivní a externě-spouštěcí vzory (např. `rm -rf`, ripgrep `-z`/`--pre`) se zastaví k posouzení. Kontrolují se i wrappery (`env`, `setsid`). | ... | `untrusted` | Striktnější: shell fáze bez odpovídajícího allow pravidla se zastaví vždy. Čtení souborů a zápisy v rámci workspace procházejí v každém módu. | ... | `never` | Nic se nezastavuje ke schválení — drží jen sandbox. | ... | `Allow once · Always · Reject` | Rozsah důvěry při zastavení: jednou / pravidlo prefixu pro tento workspace / zamítnout celý příkaz. Deny vždy přebije allow; prefix interpretu (`python`, `bash`, `node`) jako široké allow uložit nelze. | ... | Skill / příkaz | Co udělá | | --- | --- | | `muse skills list`⧉ | Vypíše všechny skilly ze všech zdrojů. | | `muse skills inspect `⧉ | Detail jedné skill. | | `muse skills enable `⧉ | Zapne skill (`--scope project` pro projektový rozsah). | | `muse skills install ./my-skill`⧉ | Nainstaluje skill (`--scope user` pro celý účet). Předtím ověř přes `muse skills validate ./my-skill`. | | `muse skills import --from claude`⧉ …[truncated] <title>cmd/observer/muse.go</title> https://github.com/superbasedapp/observer/blob/9081edd2/cmd/observer/muse.go // museSubcommands are muse&`#39`;s argv tokens that are subcommands, not a prompt // (the `muse --help` Commands block), so forwardedPromptConflict does not // misread a forwarded verb (e.g. `muse skills`) as a competing positional // prompt. It is also the leading-verb set that makes a launch // attach-incompatible and continue-from-incompatible: `exec` runs headlessly // and exits; `export`/`trace`/`skills`/`sandbox`/`session-message`/`auth`/ // `login`/`logout`/`init` are one-shot management verbs. `resume` is grouped // here too even though it can reopen an interactive TUI (reattaching an // EXISTING session) — it never accepts a FRESH prompt the way the bare // command does, and observer&`#39`;s own native --resume flag already covers the // resume-into-attach path via resumeAttachPassthrough, so a raw forwarded // `-- resume …` does not need attach/seed compatibility guaranteed. ... var museSubcommands = map[string]bool{ "resume": true, "exec": true, "export": true, "trace": true, "skills": true, "sandbox": true, "session-message": true, "auth": true, "login": true, "logout": true, "init": true, } ... // museValueFlags are muse&`#39`;s SPLIT-value top-level options — the // ` `-REQUIRED spellings, which always consume the following token. ... // Read verbatim off `muse --help` (Muse Code 0.1.0 (0.1.0-R708.1), live // install, 2026-08-06): // // --agents --provider --preset --model // --reasoning-effort --base-url --image // --workspace --worktree-base --worktree-existing // --approval-mode --approval-judge <off|on> --echo-delay-ms // --sandbox-network // ... // Without this table the leading-verb guard reads a split VALUE as the // operand and lets a following subcommand through (see leadingVerbScan). ... var museValueFlags = map[string]bool{ "--agents": true, "--provider": true, "--preset": true, "--model": true, "--reasoning-effort": true, "--base-url": true, "--image": true, "--workspace": true, "--worktree-base": true, "--worktree-existing": true, "--approval-mode": true, "--approval-judge": true, "--echo-delay-ms": true, "--sandbox-network": true, } ... // museBoolFlags are muse&`#39`;s top-level switches — declared with no value at // all, so they consume nothing (`muse --help`): // // -h/--help -V/--version --parallel-tool-calls --no-parallel-tool-calls // --subagent-worktree-isolation --no-session-log --yolo // --trust-workspace --disable-approval --disable-sandbox // --disable-write --disable-shell --enable-shell-tool // ... // The OPTIONAL-value option `-w, --worktree []` is DELIBERATELY in // NEITHER set: whether it eats the following token depends on what that // token looks like, which the guard cannot replicate — so it falls through // to the conservative ambiguous branch rather than being misclassified in // either direction. ... var museBoolFlags = map[string]bool{ "-h": true, "--help": true, "-V": true, "--version": true, "--parallel-tool-calls": true, "--no-parallel-tool-calls": true, "--subagent-worktree-isolation": true, "--no-session-log": true, "--yolo": true, "--trust-workspace": true, "--disable-approval": true, "--disable-sandbox": true, "--disable-write": true, "--disable-shell": true, "--enable-shell-tool": true, } ... // museHeadlessScan is muse&`#39`;s grounded leading-verb guard: the subcommand set // plus the flag grammar above, so a split-value flag can no longer hide a // following subcommand in the operand position. var museHeadlessScan = leadingVerbScan{ subs: museSubcommands, valueFlags: museValueFlags, boolFlags: museBoolFlags, }

Citations:


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- Muse references in focused files ---'
rg -n --glob '*.ts' --glob '*.tsx' --glob '*.mdx' "muse|launchCmd|stdin-after-start|trust-workspace|AgentPermissionMode|permission mode" src/shared src/main docs/site/content/docs/agents | head -n 500
printf '%s\n' '--- Config shape and Muse entry ---'
sed -n '1,140p' src/shared/tui-agent-config.ts
sed -n '250,320p' src/shared/tui-agent-config.ts
printf '%s\n' '--- Permission resolution ---'
sed -n '1,180p' src/shared/tui-agent-permissions.ts
printf '%s\n' '--- Startup test coverage ---'
sed -n '680,780p' src/shared/tui-agent-startup.test.ts
printf '%s\n' '--- Config tests ---'
sed -n '1,80p' src/shared/tui-agent-config.test.ts

Repository: stablyai/orca

Length of output: 39887


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- Startup-plan definitions and launch-command resolution ---'
rg -n -C 4 "buildAgentStartupPlan|resolveTuiAgentLaunchArgs|getTuiAgentLaunchCommand|launchCommand|agentCommand" src/shared src/main | head -n 600
printf '%s\n' '--- Trust preflight definitions and callers ---'
rg -n -C 5 "preflightTrust|agent-trust-presets|trust preset|TrustPreset" src/shared src/main src/renderer | head -n 500
printf '%s\n' '--- Launch entrypoint call sites ---'
rg -n -C 4 "buildAgentStartupPlan|buildAgentDraftLaunchPlan|launchAgent|start.*agent|TUI_AGENT_CONFIG" src/main src/shared src/renderer | head -n 700

Repository: stablyai/orca

Length of output: 50370


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- New-session startup implementation ---'
sed -n '1,190p' src/shared/tui-agent-startup.ts
printf '%s\n' '--- Resume startup implementation ---'
sed -n '1,100p' src/shared/tui-agent-resume-startup.ts
printf '%s\n' '--- Exact preflight-trust references ---'
rg -n -C 8 "preflightTrust" src
printf '%s\n' '--- Exact startup builder callers ---'
rg -n -C 6 "buildAgentStartupPlan\(" src --glob '*.ts' --glob '*.tsx'
printf '%s\n' '--- Exact resume builder callers ---'
rg -n -C 6 "buildAgentResumeStartupPlan\(" src --glob '*.ts' --glob '*.tsx'

Repository: stablyai/orca

Length of output: 50370


Security Misconfiguration

Reachability: External
Exploitability: Moderate
CWE: CWE-693

Do not auto-trust a workspace in Manual mode. The normal and resume launch paths use muse --trust-workspace without a Muse-specific consent gate. Manual mode only removes Muse’s --yolo permission argument. It does not restore workspace-trust consent. Add an explicit Orca confirmation before passing --trust-workspace, and update the Manual-mode expectations in src/shared/tui-agent-startup.test.ts.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one coverage question and one minor matcher-scope note.

Reviewed changes

  • Adds muse as a supervised TUI agent across the registration surfaces: TuiAgent + TUI_AGENT_CONFIG (detectCmd: 'muse', launchCmd: 'muse --trust-workspace', stdin-after-start), auto-pick order, display name, UI catalog entry + bundled 64px icon, all 6 i18n locales, mobile icon/domain maps, telemetry kind, skills-CLI mapping (null), skill-install provider, and --yolo permissions.
  • Recognizes the versioned muse-bin-<version> binary the launcher execs — in agentForNormalizedProcess, a Muse-scoped branch in isExpectedAgentProcess, and the startup-command classifier — plus an exec headless-one-shot filter.
  • Adds a tier-1b tui-idle lane (isMuseReadyPromptPreview + hasQuietMuseReadyPrompt) for the captured ready screen, believed only after quiescence and vetoed by a first-party working status; wired through all six isTuiIdleSatisfied call sites, including the mailbox-pointer delivery path.
  • Tests cover the config/startup matrix, process recognition (comm truncation + exec negatives), the readiness body (ANSI + trust-dialog veto), evidence ranking, and a live-PTY-pipeline E2E. I ran the touched suites locally: 201 tests green, with the Muse E2E exercising the new lane (~4s).

ℹ️ Muse readiness has no fallback once the startup banner leaves the retained tail

findMuseReadyPromptIndex requires the muse code banner to still be in the retained tail (2000 lines / 256 KiB). Because Muse emits no title signal and its bare-cwd OSC title classifies as null (not idle), no other lane can settle a tui-idle wait once that banner scrolls out — tier 1 is false, the first-party veto has nothing to veto, and tier 3 needs lastAgentStatus === 'idle'. This is fine for a fresh worker-start (the tested case), but I could not verify the long-lived case. If Muse keeps the banner pinned on screen this is a non-issue; otherwise a re-used Muse pane would time out on tui-idle.

Technical details
# Muse readiness has no fallback after the banner scrolls off

## Affected sites
- `src/main/runtime/terminal-wait-detection.ts:134` — `findMuseReadyPromptIndex` anchors on `lastIndexOf('muse code')` in the tail.
- `src/main/runtime/tui-idle-evidence.ts:141` — `hasQuietMuseReadyPrompt` is the only lane that can settle a Muse pane; it delegates entirely to that body check.
- `src/main/runtime/terminal-tail-limits.ts:1` — retained tail is `MAX_TAIL_LINES = 2000` / `MAX_TAIL_CHARS = 256 KiB`.

## Required outcome
- Confirm whether the Muse TUI keeps its banner in the retained tail for the life of a session.
- If it does not, decide whether a re-used Muse pane needs a body signal that survives scrollback (e.g. the persistent composer/status line) or whether timing out on long-lived panes is an accepted limitation.

## Open questions for the human
- Does `muse` repaint the banner on every turn, or only at startup?
- Is `worker-start`/`tui-idle` on an already-running Muse pane in scope for this PR?

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

// subcommand dispatch is (`muse 'EXEC'` is a TUI prompt), and a quoted TUI prompt
// never splits into an `exec` token on its own.
export function isMuseHeadlessOneShotCommand(tokens: readonly string[]): boolean {
return tokens.slice(1).some((token) => token === 'exec')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exec is matched at any position, but the captured evidence only establishes it as the first positional (muse exec … dispatches headless, muse <flags> exec … errors). If Muse treats a non-subcommand first positional as the prompt, then a manually launched muse refactor the exec path (unquoted) is classified headless and the pane is not recognized as Muse. Does Muse scan every positional for a subcommand, or only the first? If only the first, matching just the first non-flag positional would keep the documented cases and drop the false positive.

@nwparker

Copy link
Copy Markdown
Contributor

Thank you for this! First-class Muse Code support has now landed in #22216, which builds on its readiness detection, versioned muse-bin-* process recognition and headless behavior from this PR (credited in the PR description). Closing as superseded.

@nwparker nwparker closed this Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Muse Code (muse CLI) as an agent

2 participants