Skip to content

CI test and global npm installs broken by @github/copilot-sdk 1.0.29 (postinstall rewrites the vscode-jsonrpc import) #2414

Closed

Description

@tamirdresher

What's broken

Since @github/copilot-sdk 1.0.29 was published on 2026-11-06, two things fail:

  1. CI. Two tests in test/cli-packaging-smoke.test.ts fail on every PR into dev (for example ci: run PR workflows without pull_request_target #2409 and feat: bring agentic bootstrap upstream with gh-aw 1.x integrity support #2413), in both Squad CI test and Squad Release Verify:

    • start command gracefully handles forced-missing node-pty
    • unknown command produces "Unknown command" error

    Both get this error (run 42460059168):

    Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './node.js' is not defined by "exports" in .../node_modules/@github/copilot-sdk/node_modules/vscode-jsonrpc/package.json imported from .../node_modules/@github/copilot-sdk/dist/session.js
    

    dev requires test to pass, so nothing can merge.

  2. Users. npm install -g @bradygaster/squad-cli (1.1.0) on npm 10 or 11 (bundled with Node 22 and 24, which run install scripts automatically) produces an install where Squad's Copilot adapter can't load. Project installs break the same way after squad upgrade. The interactive shell and other Copilot features fail; squad --version still works.

Cause

  • copilot-sdk 1.0.29 moved from vscode-jsonrpc 8.2.1 to 10.0.0, and @bradygaster/squad-sdk accepts it ("@github/copilot-sdk": "^1.0.19").
  • The CLI's ESM import patch packages/squad-cli/scripts/patch-esm-imports.mjs (the squad-cli fails with ERR_MODULE_NOT_FOUND on Node 22 (vscode-jsonrpc ESM import) #449 workaround for vscode-jsonrpc 8, which had no exports map) rewrites vscode-jsonrpc/node to vscode-jsonrpc/node.js in copilot-sdk's dist/session.js. It runs as the CLI postinstall, which reaches copilot-sdk in global installs, and from squad upgrade, which patches a project's node_modules. In the CI smoke test, the rewrite comes from squad upgrade.
  • vscode-jsonrpc 10 exports ./node but not ./node.js, so the rewritten import fails. Without the rewrite, the import works.
  • Squad itself depends on vscode-jsonrpc ^9.0.3, so copilot-sdk gets its own nested 10.0.0 copy, and the script's exports patch never touches it.

Reproduced with the published 1.1.0 in a global install: after the postinstall, importing @bradygaster/squad-sdk/dist/adapter/client.js fails with ERR_PACKAGE_PATH_NOT_EXPORTED. With the rewritten line reverted, it loads.

Fix

Activity

  1. added a commit that references this issue on Nov 8, 2026
    89504b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions