From 0ec147c8181ec0b5e3cfb71dfa7276377bf0b57d Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Mon, 20 Jul 2026 12:12:05 -0700 Subject: [PATCH] fix(skills): pass -y to skill install command so it can't hang on agent prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Orca spawns the skill install command (`npx skills add ... --global`) in a non-driven ephemeral setup terminal. The skills CLI runs an interactive "Which agents do you want to install to?" prompt (@clack/prompts) whenever stdin is a TTY, which the PTY is. With no `-y` flag the prompt blocks forever, Orca kills the terminal after ~50s (exit 1), and the install silently fails — Settings shows "install complete" but Re-check keeps reporting "Not installed" and agent coverage stays "missing". Repros reliably on a WSL2 work area with agents installed inside the distro (#9567). Verified against skills CLI dist: with `-y`/`options.yes` the add command takes the non-interactive path `targetAgents = ensureUniversalAgents(installedAgents)` (all detected agents) instead of prompting, matching the CLI's own tip ("use the --yes (-y) and --global (-g) flags to install without prompts"). Scope kept to the install command; update commands run in user-facing terminals where the upstream-deletion prompt is an intentional choice. --- .../components/onboarding/onboarding-feature-setup.test.ts | 2 +- .../src/components/settings/AgentSkillSetupPanel.test.tsx | 3 ++- .../src/components/settings/OrchestrationPane.test.tsx | 2 +- .../settings/linear-agent-skill-install-cta.test.tsx | 4 ++-- src/shared/agent-feature-install-commands.ts | 5 ++++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/renderer/src/components/onboarding/onboarding-feature-setup.test.ts b/src/renderer/src/components/onboarding/onboarding-feature-setup.test.ts index e0916c5fad0..d65444bf074 100644 --- a/src/renderer/src/components/onboarding/onboarding-feature-setup.test.ts +++ b/src/renderer/src/components/onboarding/onboarding-feature-setup.test.ts @@ -119,7 +119,7 @@ describe('onboarding feature setup runner', () => { expect(text).toBe(ALL_SKILL_INSTALL_COMMAND) expect(text).toBe( - 'npx skills add https://github.com/stablyai/orca --skill orca-cli computer-use orchestration orca-linear --global' + 'npx skills add https://github.com/stablyai/orca --skill orca-cli computer-use orchestration orca-linear --global -y' ) }) diff --git a/src/renderer/src/components/settings/AgentSkillSetupPanel.test.tsx b/src/renderer/src/components/settings/AgentSkillSetupPanel.test.tsx index 69d2360b7e7..54a24ffee8d 100644 --- a/src/renderer/src/components/settings/AgentSkillSetupPanel.test.tsx +++ b/src/renderer/src/components/settings/AgentSkillSetupPanel.test.tsx @@ -7,7 +7,8 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { AgentSkillSetupPanel } from './AgentSkillSetupPanel' import { TooltipProvider } from '../ui/tooltip' -const INSTALL_COMMAND = 'npx skills add https://github.com/stablyai/orca --skill orca-cli --global' +const INSTALL_COMMAND = + 'npx skills add https://github.com/stablyai/orca --skill orca-cli --global -y' const UPDATE_COMMAND = 'npx skills update orca-cli --global' const mocks = vi.hoisted(() => ({ diff --git a/src/renderer/src/components/settings/OrchestrationPane.test.tsx b/src/renderer/src/components/settings/OrchestrationPane.test.tsx index 02da9913403..08aea8a3b8d 100644 --- a/src/renderer/src/components/settings/OrchestrationPane.test.tsx +++ b/src/renderer/src/components/settings/OrchestrationPane.test.tsx @@ -8,7 +8,7 @@ import { getOrchestrationUsageExamples } from '@/lib/orchestration-usage-example import { OrchestrationPane } from './OrchestrationPane' const INSTALL_COMMAND = - 'npx skills add https://github.com/stablyai/orca --skill orchestration --global' + 'npx skills add https://github.com/stablyai/orca --skill orchestration --global -y' const UPDATE_COMMAND = INSTALL_COMMAND const mocks = vi.hoisted(() => ({ diff --git a/src/renderer/src/components/settings/linear-agent-skill-install-cta.test.tsx b/src/renderer/src/components/settings/linear-agent-skill-install-cta.test.tsx index a3a4a1db3dd..b82d1b12419 100644 --- a/src/renderer/src/components/settings/linear-agent-skill-install-cta.test.tsx +++ b/src/renderer/src/components/settings/linear-agent-skill-install-cta.test.tsx @@ -115,7 +115,7 @@ describe('LinearAgentSkillInstallCta', () => { expect(rendered.textContent).toContain('Not installed') expect(rendered.textContent).toContain('Let your agents read and edit Linear tasks.') expect(rendered.textContent).toContain( - 'npx skills add https://github.com/stablyai/orca --skill orca-linear --global' + 'npx skills add https://github.com/stablyai/orca --skill orca-linear --global -y' ) }) @@ -129,7 +129,7 @@ describe('LinearAgentSkillInstallCta', () => { }) expect(mocks.clipboardWrite).toHaveBeenCalledWith( - 'npx skills add https://github.com/stablyai/orca --skill orca-linear --global' + 'npx skills add https://github.com/stablyai/orca --skill orca-linear --global -y' ) expect(mocks.toastSuccess).toHaveBeenCalled() }) diff --git a/src/shared/agent-feature-install-commands.ts b/src/shared/agent-feature-install-commands.ts index 60bdc6d6baf..cd56c36fe2c 100644 --- a/src/shared/agent-feature-install-commands.ts +++ b/src/shared/agent-feature-install-commands.ts @@ -12,7 +12,10 @@ export function buildAgentFeatureSkillInstallCommand(skillNames: readonly string if (skillNames.length === 0) { throw new Error('At least one skill name is required.') } - return `npx skills add ${ORCA_SKILLS_REPOSITORY_URL} --skill ${skillNames.join(' ')} --global` + // Why: Orca spawns this in a non-driven PTY (ephemeral setup terminal). Without -y the + // skills CLI's interactive "Which agents?" prompt blocks until Orca kills it (~50s, exit 1), + // so the install silently fails (#9567). -y installs to all detected agents non-interactively. + return `npx skills add ${ORCA_SKILLS_REPOSITORY_URL} --skill ${skillNames.join(' ')} --global -y` } export function buildAgentFeatureSkillUpdateCommand(skillName: string): string {