Repository navigation
Conversation
Muse joins the agent picker, mobile catalog, and supported-agent list. A normal launch trusts the workspace so skills load. Full-auto permission mode is what adds --yolo. The task is pasted after the composer is ready, so a prompt that starts with exec, resume, or init stays the user's message. Orca treats the versioned muse-bin process as Muse and does not treat muse exec as an interactive session. A live trust prompt, approval menu, or numbered request for input keeps the pane waiting. A finished turn uses the same status store and attention path as the other agents. On Windows Git Bash, muse.cmd is not a command, so that shell launches through cmd //c. PowerShell, cmd, macOS, and Linux run muse directly. Co-authored-by: homesh-dev <[email protected]> Co-authored-by: jeffhuen <[email protected]> Co-authored-by: adriendeoliveira <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughThe change adds Muse as a supported TUI agent. It updates shared agent types, catalogs, process recognition, launch behavior, permissions, skills, telemetry, icons, localization, mobile metadata, and documentation. It adds Muse terminal prompt detectors and per-PTY activity status handling. It also adds tests for process recognition, launch behavior, prompt detection, and terminal status transitions. Priority: ➖ Normal Merge Risk: 🟡 Moderate · up to Terminal activity from another agent can be shown as Muse, producing incorrect status and session updates. Gate generic menu detection on the PTY’s known agent identity before merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 47.83% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 32 files. (8 skipped: 8 unsupported.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 5ab6c76d-0b4d-4638-8c2f-2056f9599afc
⛔ Files ignored due to path filters (1)
src/shared/agent-icons/muse.pngis excluded by!**/*.png
📒 Files selected for processing (40)
README.mdconfig/scripts/locale-translation-policy.mjsdocs/site/content/docs/agents/supported.mdxmobile/src/components/mobile-agent-icon-assets.tsmobile/src/tasks/mobile-tui-agents.tssrc/main/runtime/muse-terminal-activity.test.tssrc/main/runtime/muse-terminal-activity.tssrc/main/runtime/orca-runtime-schedule-wait-blocked-check.tssrc/main/runtime/terminal-wait-detection.tssrc/renderer/src/components/terminal-pane/terminal-startup-command-classifier.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/agent-catalog.tsxsrc/renderer/src/lib/agent-favicon-assets.tssrc/renderer/src/lib/agent-status.tssrc/shared/agent-headless-command.tssrc/shared/agent-kind.tssrc/shared/agent-packaged-process-name.tssrc/shared/agent-process-recognition.tssrc/shared/agent-title-evidence.tssrc/shared/agent-type-label.tssrc/shared/muse-harness.test.tssrc/shared/muse-headless-command.tssrc/shared/muse-interactive-question.tssrc/shared/muse-launch-command.tssrc/shared/muse-process-recognition.tssrc/shared/muse-ready-prompt.tssrc/shared/skill-install-providers.tssrc/shared/skills-cli-agent-keys.tssrc/shared/telemetry-property-schemas.tssrc/shared/tui-agent-config.tssrc/shared/tui-agent-display-names.tssrc/shared/tui-agent-launch-command.tssrc/shared/tui-agent-permissions.tssrc/shared/tui-agent-selection.tssrc/shared/tui-agent.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
| const museQuestion = | ||
| normalized.includes('request user input') && normalized.includes('enter to select') | ||
| const looksLikeMuse = | ||
| normalized.includes('muse code') || museTrust || museApproval || museQuestion |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,150p' src/main/runtime/muse-terminal-activity.ts
sed -n '55,110p' src/main/runtime/orca-runtime-schedule-wait-blocked-check.ts
rg -n "nextMuseTerminalStatus|emitTerminalAgentStatusEvents|agentType.*muse|ptyId.*agent|process.*agent" src/main/runtime src/shared | head -180Repository: stablyai/orca
Length of output: 21415
🏁 Script executed:
set -e
printf '%s\n' '--- caller and imports ---'
sed -n '1,155p' src/main/runtime/orca-runtime-schedule-wait-blocked-check.ts
printf '%s\n' '--- foreground identity helper ---'
sed -n '1,220p' src/main/runtime/runtime-pty-foreground-agent.ts
printf '%s\n' '--- emission path ---'
sed -n '1,145p' src/main/runtime/orca-runtime-create-terminal-side-effect-command-code-detector.ts
printf '%s\n' '--- identity and PTY bindings ---'
rg -n -C 5 "foregroundAgent|launchAgent|recognizeAgentProcess|Pty|pty.*agent|agentType" src/main/runtime src/shared/pane-agent-identity-adapter.ts src/shared/published-pane-agent-identity.ts -g '*.ts' | head -260Repository: stablyai/orca
Length of output: 41645
🏁 Script executed:
set -e
sed -n '1,155p' src/main/runtime/orca-runtime-schedule-wait-blocked-check.ts
sed -n '1,220p' src/main/runtime/runtime-pty-foreground-agent.ts
sed -n '1,145p' src/main/runtime/orca-runtime-create-terminal-side-effect-command-code-detector.ts
rg -n -C 5 "foregroundAgent|launchAgent|recognizeAgentProcess|pty.*agent|agentType" src/main/runtime src/shared/pane-agent-identity-adapter.ts src/shared/published-pane-agent-identity.ts -g '*.ts' | head -260Repository: stablyai/orca
Length of output: 40974
Gate generic Muse prompts by PTY identity.
runWaitBlockedCheck passes only the PTY text to nextMuseTerminalStatus. looksLikeMuse accepts generic approval and interactive-menu text, so a non-Muse PTY can emit a payload with agentType: 'muse'. Allow these generic branches only when pty.launchAgent or a current process-recognition result identifies Muse. Otherwise, require the Muse-specific text or return null.
There was a problem hiding this comment.
Important
One behavioral issue: Muse status prose is written into the prompt field, which Orca renders as the user's most recent prompt. See the inline comment.
Reviewed changes
- Registration:
museadded toTuiAgentand every registry —tui-agent-config.ts(launchCmd: 'muse --trust-workspace',stdin-after-start),agent-kind,telemetry-property-schemas,tui-agent-display-names,agent-type-label,tui-agent-selection,agent-statusiconable, skill install providers, locale labels, README/docs,muse.png. - Permissions:
YOLO_TUI_AGENT_ARGS.muse = '--yolo'; sinceDEFAULT_TUI_AGENT_ARGS = YOLO_TUI_AGENT_ARGS, the shipped default ismuse --trust-workspace '--yolo'. - Process recognition:
muse-bin-<version>handled by newmuse-process-recognition.tsand the extractedagent-packaged-process-name.ts;muse execfiltered as headless. - Windows launch wrapper:
muse-launch-command.tswraps Git Bash launches throughcmd //c, applied to bothcommandandcommandWithoutSessionOptions. - Screen-derived status:
muse-terminal-activity.tsclassifies ready/working/waiting from terminal text and emits status throughrunWaitBlockedCheck, with Muse matchers added toterminal-wait-detection.ts. - Tests:
muse-terminal-activity.test.tsandmuse-harness.test.ts; I ran both plusterminal-wait-detection.test.ts(50 tests pass).
ℹ️ The shared wait-detector change ships without a non-Muse negative test
terminal-wait-detection.ts is shared by every agent, and this PR adds generic sentinel phrases plus two Muse matchers to it. muse-terminal-activity.test.ts covers the Muse side well, but terminal-wait-detection.test.ts is unchanged, so nothing pins that a non-Muse pane quoting the Muse menu wording (or a working pane whose footer is esc to interrupt) stays null. I traced the candidates and could not build a realistic non-Muse false positive, but the surface is a shared regex and the existing file already has SILENT_STARTUP_DIALOGS / NON_CODEX_PROMPTS sections for exactly this.
Technical details
# Add non-Muse negatives for the new shared sentinel phrases
## Affected sites
- `src/main/runtime/terminal-wait-detection.ts:135` — `TERMINAL_WAIT_BLOCKED_SENTINEL_RE` gained `request user input`, `enter to select`, `reject once`.
- `src/main/runtime/terminal-wait-detection.ts:274-281` — Muse approval/question candidates added to `findBlockedSignalInLiveWindow`.
- `src/main/runtime/terminal-wait-detection.test.ts` — no new cases (existing `SILENT_STARTUP_DIALOGS` / `NON_CODEX_PROMPTS` sections are the natural home).
## Required outcome
- A non-Muse tail that contains the new sentinel words but no Muse-specific structure resolves to `null`.
- A working pane ending in `esc to interrupt` with numbered lines resolves to `null`.
## Open questions for the human
- Is `WAIT_BLOCKED_KEYWORD_PATTERN` in `src/main/runtime/orca-runtime-postlude.ts` intentionally left without the Muse phrases? It only affects whether a chunk bypasses the 50ms throttle, so the impact is latency rather than correctness.ℹ️ Nitpicks
src/shared/muse-ready-prompt.ts:7returns ready on any tail containing the literalmuse codefollowed by❯, with no pane/busy guard (unlikefindCursorReadyPromptIndex). It is also used as a "dismissed modal" signal infindDismissedStartupModalIndex, so a coincidental❯could suppress a real blocked signal. Reachability looks low because❯is normally the pane's own ready composer, but a guard would match the Cursor precedent.TERMINAL_WAIT_BLOCKED_SENTINEL_REadditions are partly redundant:reject onceandenter to selectare unnecessary because the Muse approval matcher requiresallow onceand the question matcher requiresrequest user input, both already in the regex.request user inputalone opens the gate for the only newly reachable matcher.src/shared/tui-agent-permissions.ts:30adds Muse toYOLO_TUI_AGENT_ARGS, and becauseDEFAULT_TUI_AGENT_ARGS = YOLO_TUI_AGENT_ARGS, a default launch ismuse --trust-workspace '--yolo'. The PR body says a normal launch leaves approvals on, so the shipped default does not match the stated safety intent.docs/site/content/docs/agents/supported.mdx:54inserts the Muse row between Devin and Droid (Factory) in an otherwise alphabetical table.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| return { state: 'waiting', prompt: 'Muse is waiting for you', agentType: 'muse' } | ||
| } | ||
| if (next === 'working') { | ||
| return { state: 'working', prompt: 'Muse is working', agentType: 'muse' } | ||
| } | ||
| if ( | ||
| next === 'ready' && | ||
| memory.seenWorking && | ||
| (previous === 'working' || previous === 'waiting') | ||
| ) { | ||
| memory.seenWorking = false | ||
| memoryByPtyId.set(ptyId, memory) | ||
| return { state: 'done', prompt: 'Muse is ready', agentType: 'muse' } | ||
| } | ||
| if (next === 'ready' && (previous === 'waiting' || previous === null)) { | ||
| return { | ||
| state: 'done', | ||
| prompt: 'Muse is ready', | ||
| agentType: 'muse', | ||
| sessionBoundary: true |
There was a problem hiding this comment.
The status producer writes human-readable status text into prompt, which AgentStatusPayload documents as the user's most recent prompt and which Orca renders as the row's primary label (getAgentRowPrimaryText → sidebar/dashboard, mobile agent-row-display, worktree ps --json). This overwrites the real prompt seeded at launch via applyInitialAgentStatus and duplicates the state dot. No other producer puts status prose in prompt — the Droid hook explicitly keeps its Notification.message status text out of it.
Technical details
# Keep status prose out of the user-prompt field
## Affected sites
- `src/main/runtime/muse-terminal-activity.ts:83` — `prompt: 'Muse is waiting for you'`
- `src/main/runtime/muse-terminal-activity.ts:86` — `prompt: 'Muse is working'`
- `src/main/runtime/muse-terminal-activity.ts:95,100` — `prompt: 'Muse is ready'`
## Required outcome
- The Muse producer must not overwrite the row's user prompt with status text.
## Suggested approach (optional)
- Return `prompt: ''` (or otherwise leave the field unset on the wire). `ParsedAgentStatusPayload` types `prompt` as required, so `''` is the minimal change; the Muse tests assert only `state`/`agentType`/`sessionBoundary` via `toMatchObject` and are unaffected. Note the terminal/OSC ingest path (`server-ingest-terminal.ts`) does not run `resolvePrompt`, so an empty value does not inherit a cached prompt the way Droid's hook path does — this is a display-only field for Muse either way.
- `state` already carries working/waiting/done, so nothing user-visible is lost.| commandWithoutSessionOptions: finalizeMuseLaunchCommand({ | ||
| agent: args.agent, | ||
| command: commandWithoutSessionOptions, | ||
| platform: args.platform, | ||
| shell: args.shell | ||
| }), |
There was a problem hiding this comment.
finalizeMuseLaunchCommand is also applied to commandWithoutSessionOptions, which buildSleepingAgentLaunchConfig persists as launchConfig.agentCommand. That field is expected to be a bare, re-parseable command: the OMP precedent wraps command only (tui-agent-startup.ts:76 vs :81), and sleeping-record-access.ts:168 feeds agentCommand to recognizeAgentProcessFromCommandLine, which sees the first token if and returns null. Today this is masked by launchAgent metadata and because Muse is not resumable, but the wrapper makes the persisted command stop round-tripping.
Technical details
# Keep the persisted agentCommand a bare command
## Affected sites
- `src/shared/tui-agent-launch-command.ts:105-110` — wraps `commandWithoutSessionOptions`.
- `src/renderer/src/components/terminal-pane/pty-connection/sleeping-record-access.ts:168` — parses `effectiveLaunchConfig.agentCommand` for reattach identity recovery.
- `src/main/ipc/terminal-startup-color-query-replies.ts:44` — same parse as a fallback.
## Required outcome
- `launchConfig.agentCommand` for Muse stays the bare launch command on `win32` + `posix`, matching the OMP invariant, while `command` keeps the Git Bash wrapper.
## Open questions for the human
- If Muse is intended to become resumable, note that `buildAgentResumeStartupPlan` appends resume argv to `agentCommand` (`agent-resume-launch-command.ts`), which would produce `... fi --resume` on a wrapped value.|
Important update from #19188 after testing the installed Muse Code 1.3.0: the hook-attribution statement here is now stale. Muse 1.3 supports #19188 now also uses the I think the strongest result would combine this PR’s launch/readiness/question detection and Windows support with #19188’s hooks/history/resume/commit-message support. Could we consolidate those surfaces and update the comparison section? |
|
Superseded by #22216, which landed first-class Muse Code support. |

ELI5
Orca can launch Meta's Muse Code CLI the same way it launches OpenCode, Codex, and Claude. You pick Muse, it opens in a terminal, and Orca can tell when it is working, waiting on you, or done.
What Changed
Before, Muse was not an agent Orca knew how to launch or supervise. After this, Muse is in the agent picker, the mobile catalog, skill install, and the supported-agents list.
A normal launch runs
muse --trust-workspace, so project skills load and Muse still asks before it does something risky. Choosing full-auto permissions is what adds--yolo. A task is pasted into the composer after Muse is ready. If the task starts withexec,resume, orinit, Muse treats it as your message instead of a command.Orca recognizes the real process,
museormuse-bin-<version>. Amuse execone-shot is not treated as an interactive session. A live trust prompt, approval menu, or numbered "Request user input" keeps the pane waiting. A finished turn uses the same status store and attention path as the other agents.On Windows Git Bash,
muse.cmdis not a command, so that shell launches throughcmd //c. PowerShell, cmd, macOS, and Linux runmusedirectly.Why
Three open pull requests each added part of this, and each also did something that does not match the installed CLI:
museand the catalog registration come from. Its defaultmuse --yololaunch is not used.--yoloskips the approval and trust questions.muse-bin-*recognition,muse execfiltering, stdin prompt delivery, and--trust-workspacecome from. Those match Muse 1.3.0. The agent id staysmuse.musecode, argv prompt injection, and an unvalidated session importer are not used.muse -- resumestill dispatches theresumesubcommand, which is why prompts are pasted instead of passed as arguments.Personal skills are installed under
~/.config/muse/skills. Project skills stay in.agents/skills, which is what Muse reads.~/.agents/skillsis import-only.Linked Issue
Relates #14901, #19672
Visual Proof
Local screenshots of the trust question, the ready composer, and a delivered prompt are in an untracked HTML report and are not part of this diff.
Testing
macOS: launched Muse in a hidden Orca window. The trust dialog appeared, then the composer (
Skills: 95 loaded), then an echo-provider prompt was delivered and answered.Windows (
awin, Git Bash and PowerShell):museismuse.cmdplusmuse-bin-1.3.0-R3401.1.exe. Git Bash cannot runmusedirectly.cmd //c muse --trust-workspacereached the composer. PowerShell runsmuse --versiondirectly.pnpm teston the new Muse tests passed twice.pnpm tcandpnpm run check:code-quality:changedpassed.AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Linux uses the native
musecommand, covered by the launch tests. No Linux host was available for a live screenshot.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)