Skip to content

fix(cli): warn users when spawning in permissionless mode#1755

Open
neversettle17-101 wants to merge 5 commits intoComposioHQ:mainfrom
neversettle17-101:fix/permissionless-spawn-warning
Open

fix(cli): warn users when spawning in permissionless mode#1755
neversettle17-101 wants to merge 5 commits intoComposioHQ:mainfrom
neversettle17-101:fix/permissionless-spawn-warning

Conversation

@neversettle17-101
Copy link
Copy Markdown

Summary

Fixes #1754

  • Adds a post-spawn warning in ao spawn output when the effective permissions mode is permissionless (the default), explaining the one-time Claude Code confirmation prompt and how to respond to it or opt out
  • Improves the config-instruction.ts docs to describe what permissionless does, the silent-exit risk if the prompt is dismissed, and how to switch to default interactive mode

What was happening

When agentConfig.permissions is not set, the config schema defaults to permissionless, which passes --dangerously-skip-permissions to Claude Code. Claude shows a confirmation prompt in the tmux session. If the user dismisses it (or doesn't know it's there), the session exits silently — the dashboard shows spawn_incomplete with no explanation. Very hard to debug without running tmux capture-pane manually.

After this fix

ao spawn now prints:

⚠ Running in permissionless mode (--dangerously-skip-permissions).
  Claude Code will show a one-time confirmation prompt in the tmux session.
  If this is your first time, accept it with: tmux attach -t <session-id>
  To use interactive mode instead, set in agent-orchestrator.yaml:
    agentConfig:
      permissions: default

Test plan

  • ao spawn <issue> with no agentConfig.permissions set shows the warning
  • ao spawn <issue> with agentConfig.permissions: default does not show the warning
  • ao spawn <issue> with agentConfig.permissions: permissionless shows the warning
  • ao config-help shows the updated permissions documentation

🤖 Generated with Claude Code

neversettle17-101 and others added 2 commits May 9, 2026 14:02
The prebuild-install package is no longer maintained, but it's a transitive
dependency of better-sqlite3 (optional) and node-pty (optional). Both packages
continue to use it reliably for downloading prebuilt binaries across platforms.

Suppressing this warning avoids noise in npm install output while we await
upstream changes. See ComposioHQ#1752

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
When agentConfig.permissions is unset, the schema defaults to
"permissionless", which passes --dangerously-skip-permissions to Claude
Code. Claude then shows a one-time confirmation prompt inside the tmux
session; if dismissed, the session exits silently with no user-facing
error — making it very hard to debug.

Add a post-spawn warning in ao spawn output explaining the mode and
how to either accept the prompt or switch to interactive mode. Also
improve the config-instruction docs to describe each permissions value
and the silent-exit risk.

Fixes ComposioHQ#1754

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@neversettle17-101 neversettle17-101 marked this pull request as draft May 9, 2026 13:07
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 9, 2026

Greptile Summary

This PR adds a post-spawn warning to ao spawn when the effective permissions mode is permissionless, and improves the config-instruction.ts template docs to explain the same behavior. The fix directly addresses the spawn_incomplete silent-failure UX problem caused by users missing the Claude Code one-time confirmation prompt.

  • spawn.ts: After a session is created, reads agentConfig.permissions from config (falling back to \"permissionless\") and prints a chalk.yellow warning explaining the dashboard terminal prompt and how to opt into interactive mode.
  • config-instruction.ts: Adds inline YAML comments describing what permissionless does, the silent-exit risk, and the \"default\" alternative.
  • .npmrc: Trailing newline removed — no functional change.

Confidence Score: 5/5

Safe to merge — the change is additive (a console warning and doc comments) and cannot break existing spawn or session behavior.

The warning block reads only from the already-loaded config object and touches no session creation logic. The fallback ?? "permissionless" matches the schema default, so the condition fires exactly when it should. No data is mutated; the worst case is an extra line of CLI output.

No files require special attention.

Important Files Changed

Filename Overview
packages/cli/src/commands/spawn.ts Adds permissionless-mode warning to spawnSession() output, reading effective permissions from the project config with a safe ?? "permissionless" fallback. Logic is correct and well-scoped.
packages/cli/src/lib/config-instruction.ts Adds clarifying comments to the permissions field in the YAML config doc template, accurately describing the permissionless default, the one-time confirmation prompt, and how to switch to interactive mode.
.npmrc Trailing newline removed — no functional change.

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as ao spawn (CLI)
    participant SM as SessionManager
    participant CC as Claude Code (tmux)

    User->>CLI: "ao spawn <issue>"
    CLI->>SM: "sm.spawn({ projectId, issueId })"
    SM-->>CLI: session (id, runtimeHandle, metadata)
    CLI->>CLI: Read config.projects[projectId].agentConfig.permissions (falls back to "permissionless")
    alt "effectivePermissions === "permissionless""
        CLI->>User: ⚠ Permissionless warning printed
    end
    SM->>CC: Launch with --dangerously-skip-permissions
    CC->>User: One-time confirmation prompt (in dashboard terminal)
Loading

Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/permissionl..." | Re-trigger Greptile

Comment thread packages/cli/src/commands/spawn.ts
@neversettle17-101 neversettle17-101 marked this pull request as ready for review May 9, 2026 13:36
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.

Sessions silently fail when Claude Code bypass-permissions prompt is dismissed

1 participant