Skip to content

fix: CLI fails to start on Windows with process.execve unavailable - #8

Merged
elkaix merged 3 commits into
mainfrom
fix/windows-launcher-execve
Aug 4, 2026
Merged

fix: CLI fails to start on Windows with process.execve unavailable#8
elkaix merged 3 commits into
mainfrom
fix/windows-launcher-execve

Conversation

@elkaix

@elkaix elkaix commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Related Issue

No linked issue — problem explained below.

Problem

On Windows, pythinker installed via npm fails immediately:

Failed to start Pythinker Code: The feature process.execve is unavailable on the current platform, which is being used to run Node.js

Windows Node defines process.execve as a function that throws ERR_FEATURE_UNAVAILABLE_ON_PLATFORM when called. The launcher's existence check (process.execve !== undefined) therefore routed Windows into the execve path and crashed before the existing spawn fallback could run.

What changed

The launcher checks the platform first: win32 always uses the spawn fallback; the execve path (which preserves pid, process group, and controlling terminal) remains for POSIX. Added a regression test that fakes win32 with a throwing execve and asserts the fallback child completes — verified it fails against the previous launcher.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

elkaix added 2 commits August 3, 2026 22:43
Windows Node defines process.execve but throws
ERR_FEATURE_UNAVAILABLE_ON_PLATFORM when it is called, so the
existence check routed Windows into execve and the CLI failed to
start. Route win32 to the spawn fallback before touching execve.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ffc566ba-5b0b-41b0-b77e-7baaf2f0d354

📥 Commits

Reviewing files that changed from the base of the PR and between d396320 and f6aeffa.

📒 Files selected for processing (5)
  • .agents/skills/gen-docs/SKILL.md
  • .agents/skills/sync-changelog/SKILL.md
  • .changeset/windows-launcher-execve.md
  • apps/pythinker-code/src/launcher.ts
  • apps/pythinker-code/test/cli/ffi-launcher.test.ts

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 4, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pythoughts/pythinker-code@f6aeffa
npx https://pkg.pr.new/@pythoughts/pythinker-code@f6aeffa

commit: f6aeffa

Name the published docs site and Pythoughts-labs/pythinker-code
explicitly in gen-docs and sync-changelog instead of generic
placeholders.
@elkaix
elkaix merged commit 9b1b195 into main Aug 4, 2026
10 checks passed
@elkaix
elkaix deleted the fix/windows-launcher-execve branch August 4, 2026 02:53
elkaix pushed a commit that referenced this pull request Aug 4, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @pythoughts/pythinker-code@0.6.1

### Patch Changes

- [#7](#7)
[`d396320`](d396320)
- Prompt for an API key when connecting a catalog provider whose
environment variable is not set, instead of failing with "Environment
variable is not set or is empty". Applies to `/login`, `/provider`, and
`pythinker provider catalog add`, which now also accepts `--api-key
<key>`.

- [#7](#7)
[`d396320`](d396320)
- Explain in `/update` and the startup update notice that Homebrew
installs do not auto-update, and point to the native installer for
automatic background updates.

- [#7](#7)
[`d396320`](d396320)
- Point the native install scripts at the published release assets.

- [#7](#7)
[`d396320`](d396320)
- Show a clear requirement message with the native-installer alternative
when the CLI is launched on Node.js older than 26.4, instead of failing
with a cryptic flag error.

- [#8](#8)
[`9b1b195`](9b1b195)
- Fix the CLI failing to start on Windows with "process.execve is
unavailable" by using the spawn fallback instead of calling execve
there.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant