fix(cli): warn users when spawning in permissionless mode#1755
fix(cli): warn users when spawning in permissionless mode#1755neversettle17-101 wants to merge 5 commits intoComposioHQ:mainfrom
Conversation
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]>
Greptile SummaryThis PR adds a post-spawn warning to
Confidence Score: 5/5Safe 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.
|
| 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)
Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/permissionl..." | Re-trigger Greptile
Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Summary
Fixes #1754
ao spawnoutput when the effective permissions mode ispermissionless(the default), explaining the one-time Claude Code confirmation prompt and how to respond to it or opt outconfig-instruction.tsdocs to describe whatpermissionlessdoes, the silent-exit risk if the prompt is dismissed, and how to switch todefaultinteractive modeWhat was happening
When
agentConfig.permissionsis not set, the config schema defaults topermissionless, which passes--dangerously-skip-permissionsto 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 showsspawn_incompletewith no explanation. Very hard to debug without runningtmux capture-panemanually.After this fix
ao spawnnow prints:Test plan
ao spawn <issue>with noagentConfig.permissionsset shows the warningao spawn <issue>withagentConfig.permissions: defaultdoes not show the warningao spawn <issue>withagentConfig.permissions: permissionlessshows the warningao config-helpshows the updated permissions documentation🤖 Generated with Claude Code