Skip to main content
Watch: I Built an AI App Without Leaving Databricks

GitHub Copilot CLI error

Copilot CLI: posix_spawnp failure

Error message
posix_spawnp failure

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. Maintainer djdefi (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 leak was traced to the bundled node-pty and to the CLI's shell session handling.

How to fix it

  1. Fix 1.

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

  2. Fix 2.

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

More Copilot CLI errors

All 12 Copilot CLI errors

FAQ

What does "posix_spawnp failure" 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 "posix_spawnp failure"?

There are 2 documented fixes. Start with the first: Upgrade to 0.0.407 or later: "Updated node-pty to fix file descriptor leaks". Maintainer MRayermannMSFT: "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).

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.