Skip to main content
Watch: Google Found How to Make Your Agents Cheaper and Faster

GitHub Copilot CLI error

Copilot CLI: <exited with error: posix_spawnp failed.>

Error message
<exited with error: posix_spawnp failed.>

Status: Fixed in releaseLast verified 2 documented fixes2 sources

What it means

After long use, the bash tool can no longer start a new shell (pseudo-terminal), so every shell command fails.

Causes

  • A pseudo-terminal file-descriptor leak. An organization member: "Each bash tool call allocates a PTY that isn't properly released" and "Eventually posix_spawn fails with ENOENT when trying to allocate a new PTY". The same comment traced it to the PTY sessions the bash tool creates via node-pty.

How to fix it

  1. Fix 1.

    Upgrade to 0.0.407 or later: "Updated node-pty to fix file descriptor leaks". The assignee: "Just merged the node-pty update. Will go out in next release."

  2. Fix 2.

    Workaround on older versions from the same member: "Restart copilot CLI sessions periodically (we restart daily)."

More Copilot CLI errors

All 12 Copilot CLI errors

FAQ

What does "<exited with error: posix_spawnp failed.>" mean in Copilot CLI?

After long use, the bash tool can no longer start a new shell (pseudo-terminal), so every shell command fails.

How do I fix "<exited with error: posix_spawnp failed.>"?

There are 2 documented fixes. Start with the first: Upgrade to 0.0.407 or later: "Updated node-pty to fix file descriptor leaks". The assignee: "Just merged the node-pty update. Will go out in next release."

Is this Copilot CLI error fixed?

Status: Fixed in release. A release fixed this. The affected versions note says where the fix landed. Affected versions: 0.0.358 to 0.0.406. Fixed in 0.0.407 (2026-02-11). A May 2026 comment on the closed issue reported the error again.

Sources

Last verified against 2 sources: official docs, maintainer replies and release notes.

Newsletter

Fixes for the tools you use, weekly

One email per week. New coding agent releases, what broke, and how developers are working around it.