-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
External: github/copilot-cli
Problem
When the CLI's shell tool (powershell/bash) fails to spawn a shell session, the ConPTY native addon reports:
<exited with error: File not found: >
The string after "File not found:" is empty — no executable name, no PATH searched, no Windows error code. The CLI then retries the same failing operation 5-6 times with no fallback, alternative shell, or additional diagnostics.
This was observed on Windows with copilot CLI 1.0.12-2. The standalone CLI and embedded CLI (via SDK) both exhibited the same behavior. The issue resolved itself after process cleanup, suggesting a transient ConPTY/system state issue — but diagnosing it required decompiling the pkg binary and tracing through minified JS and native conpty.node code.
Suggestions
- Include the shell executable name in the error (e.g.,
File not found: pwsh.exe) — the native conpty.node supports this but receives an empty string - Log the PATH that was searched when shell resolution fails
- Try fallback shells (e.g.,
powershell.exeorcmd.exeifpwsh.exefails) - Surface the underlying Windows error code from CreateProcessW
Context
- Windows 11 Enterprise 10.0.26100
- Copilot CLI 1.0.12-2
- pwsh.exe was on PATH and functional (
pwsh --versionworked from terminal) - Error affected both standalone
copilot -pand SDK-embedded sessions - Resolved after killing stale copilot processes and cleaning orphaned lock files in
~/.copilot/pkg/ - Root cause unknown — could not reproduce on demand
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels