diff --git a/.npmrc b/.npmrc index 94a06c218..a9f79656b 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1 @@ -access=public +access=public \ No newline at end of file diff --git a/packages/cli/src/commands/spawn.ts b/packages/cli/src/commands/spawn.ts index fed2f0585..54d1e7986 100644 --- a/packages/cli/src/commands/spawn.ts +++ b/packages/cli/src/commands/spawn.ts @@ -248,6 +248,33 @@ async function spawnSession( ); console.log(` View: ${chalk.dim(projectSessionUrl(port, projectId, session.id))}`); + // Warn when running in permissionless mode — Claude Code shows a one-time + // confirmation prompt inside the tmux session that silently kills the session + // if dismissed. Users need to know to accept it or switch to default mode. + const effectivePermissions = + config.projects[projectId]?.agentConfig?.permissions ?? "permissionless"; + if (effectivePermissions === "permissionless") { + console.warn( + chalk.yellow( + ` ⚠ Running in permissionless mode (--dangerously-skip-permissions).\n` + + ` Claude Code will show a one-time confirmation prompt — accept it in the dashboard terminal.\n` + + ` To use interactive mode instead, set in agent-orchestrator.yaml:\n` + + ` ${chalk.cyan("agentConfig:\n permissions: default")}`, + ), + ); + } + + // Warn if prompt delivery failed (for post-launch agents like Claude Code) + const promptDelivered = session.metadata?.promptDelivered; + if (promptDelivered === "false") { + console.warn( + chalk.yellow( + ` ⚠ Prompt delivery failed — agent may be idle.\n` + + ` Use '${chalk.cyan("ao send " + session.id + ' "message..."')}' to send instructions manually.`, + ), + ); + } + // Open terminal tab if requested if (openTab) { try { diff --git a/packages/cli/src/lib/config-instruction.ts b/packages/cli/src/lib/config-instruction.ts index 1d1a4f11e..7ce4dbcc0 100644 --- a/packages/cli/src/lib/config-instruction.ts +++ b/packages/cli/src/lib/config-instruction.ts @@ -66,6 +66,11 @@ projects: # ── Agent configuration (optional) ──────────────────────────── agentConfig: + # permissions controls whether Claude Code skips tool-use confirmation prompts. + # DEFAULT is "permissionless" — passes --dangerously-skip-permissions to Claude Code. + # Claude Code will show a one-time confirmation prompt on first run; + # if dismissed, the session silently exits. Accept it in the dashboard terminal. + # Use "default" for fully interactive mode where Claude asks before each action. permissions: permissionless # permissionless | default | auto-edit | suggest model: claude-sonnet-4-20250514