Skip to content

Run the CopilotKit CLI on Windows when making a Learning container - #909

Closed
rafaelcuca wants to merge 1 commit into
CopilotKit:mainfrom
rafaelcuca:fix/learning-cli-windows
Closed

rafaelcuca wants to merge 1 commit into
CopilotKit:mainfrom
rafaelcuca:fix/learning-cli-windows

Conversation

@rafaelcuca

Copy link
Copy Markdown

Node refuses to spawn npx.cmd without a shell on Windows (EINVAL), so every CLI step in the Learning setup failed there. runCli now spawns it through the shell on win32 only.

The arguments are fixed or come from the CLI's own output (container.id), never from a person's input.

Also ignores .copilotkit/ (the CLI's project selection for one machine and login) and .playwright-mcp/ (browser snapshots a coding agent writes).

Testing

  • bun test for learning-ensure-container, learning-auto-assign and learning-personal-space: 87 pass.
  • On Windows 11, against managed Intelligence: bun scripts/setup-learning.ts exits 0, and runCli runs whoami, project list --json and learning containers get openbot --json, each verified. Creating a new container was not exercised.

🤖 Generated with Claude Code

Node refuses to spawn npx.cmd without a shell on Windows (EINVAL), so every
CLI step in the Learning setup failed there. Spawn it through the shell on
win32 only.

Also ignore .copilotkit/ (the CLI's project selection for one machine and
login) and .playwright-mcp/ (browser snapshots a coding agent writes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@davidmckayv

Copy link
Copy Markdown
Contributor

Thanks for this. We're closing it for a security reason, and consolidating on #793.

With shell: true on Windows, Bun joins the arguments into one cmd.exe command line without quoting them. One of those arguments is now a person's display name: since #858 each person's own Learning space is created with --name "OpenBot: <their display name>". A name containing cmd.exe metacharacters would then be run as part of the command on a Windows server. #793 fixes the same problem and checks every argument before it reaches cmd.exe.

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.

2 participants