github / github/app

Bug: Copilot CLI extensions fail to load @github/copilot-sdk in worktree-backed sessions

Ouverte
#13 0 commentaires 0 réactions 1 personne assignée Réclamée par @jmoseley Voir sur GitHub
Bugs feature-request
Langage dominant
Aucune donnée de langage
Étoiles
2.1k
Forks
153
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## Summary

Extensions in `.github/extensions/` that import `@github/copilot-sdk/extension` fail with `ERR_MODULE_NOT_FOUND` when the session runs in a worktree rather than the main checkout. The Copilot CLI runtime does not appear to inject the SDK into the Node module resolution path for worktree-backed sessions.

## Repro steps

1. Create a project extension at `.github/extensions/people-sync/extension.mjs` that imports `@github/copilot-sdk/extension`
2. Open the project in the Copilot desktop app
3. Create a new worktree-backed session (any branch)
4. The extension shows as **failed** in `extensions_manage list`

## Error

```
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@github/copilot-sdk' imported from
/Users/.../copilot-worktrees/obsidian/ryanwaite-symmetrical-couscous/.github/extensions/people-sync/[eval]
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:301:9)
at packageResolve (node:internal/modules/esm/resolve:764:81)
...
```

## Expected behavior

The SDK should be available to extensions regardless of whether the session is running from the main checkout or a worktree. The runtime should inject `@github/copilot-sdk` into the module resolution path for the worktree's filesystem location, not just the main repo root.

## Environment

- macOS (Darwin)
- Node.js v25.9.0
- Copilot CLI v1.0.48-1
- Workspace type: worktree

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.