github / github/app

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

Abierto
#13 0 comentarios 0 reacciones 1 asignado Reclamado por @jmoseley Ver en GitHub
Bugs feature-request
Lenguaje dominante
Sin datos de lenguaje
Estrellas
2.1k
Forks
153
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

## 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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.