github / github/app

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

未关闭
#13 0 条评论 0 个 reaction 已指派 1 人 已被 @jmoseley 认领 在 GitHub 查看
Bugs feature-request
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。