Summary
After installing the official cloudcli-plugin-terminal through CloudCLI Settings > Plugins on macOS, opening the Terminal tab connects briefly and then immediately shows disconnected.
Environment
- CloudCLI:
1.29.0
- Plugin:
cloudcli-plugin-terminal 1.0.1
- Platform: macOS arm64
- Install path: CloudCLI plugin manager (
npm install --ignore-scripts, then build)
What I observed
- The UI briefly shows a connected state and then disconnects immediately.
- CloudCLI-side logs show the plugin websocket connection being established.
- The plugin backend then fails when spawning the PTY shell.
Reproduction
- Install
cloudcli-plugin-terminal from the official repo through Settings > Plugins.
- Open the Terminal tab on macOS.
- The session disconnects almost immediately.
Root cause
The plugin depends on node-pty, and on macOS the packaged prebuilds/darwin-*/spawn-helper can be present without execute permission.
CloudCLI's plugin installer intentionally runs:
npm install --ignore-scripts
So install-time postinstall hooks are blocked by design. That means the main CloudCLI app's own node-pty fix pattern cannot be reused here via plugin install hooks.
As a result, the terminal plugin can reach websocket-ready state, but then fail on pty.spawn(...) with a macOS-side spawn error (posix_spawnp failed), which surfaces as an immediate disconnect in the UI.
Expected behavior
The plugin should recover from this packaging/permission issue at runtime, before calling pty.spawn(...), without requiring install-time scripts.
Suggested fix
Do a darwin-only, best-effort runtime self-heal inside the plugin server right before pty.spawn(...):
- locate the actual loaded
node-pty module root
- target only the current architecture's
spawn-helper
- add only the minimal execute bit needed
- no-op on non-macOS platforms
This stays within CloudCLI's plugin security model because it does not require relaxing --ignore-scripts.
Summary
After installing the official
cloudcli-plugin-terminalthrough CloudCLI Settings > Plugins on macOS, opening the Terminal tab connects briefly and then immediately showsdisconnected.Environment
1.29.0cloudcli-plugin-terminal1.0.1npm install --ignore-scripts, then build)What I observed
Reproduction
cloudcli-plugin-terminalfrom the official repo throughSettings > Plugins.Root cause
The plugin depends on
node-pty, and on macOS the packagedprebuilds/darwin-*/spawn-helpercan be present without execute permission.CloudCLI's plugin installer intentionally runs:
npm install --ignore-scriptsSo install-time
postinstallhooks are blocked by design. That means the main CloudCLI app's ownnode-ptyfix pattern cannot be reused here via plugin install hooks.As a result, the terminal plugin can reach websocket-ready state, but then fail on
pty.spawn(...)with a macOS-side spawn error (posix_spawnp failed), which surfaces as an immediate disconnect in the UI.Expected behavior
The plugin should recover from this packaging/permission issue at runtime, before calling
pty.spawn(...), without requiring install-time scripts.Suggested fix
Do a darwin-only, best-effort runtime self-heal inside the plugin server right before
pty.spawn(...):node-ptymodule rootspawn-helperThis stays within CloudCLI's plugin security model because it does not require relaxing
--ignore-scripts.