Copilot CLI 1.0.116 refuses session.metadata.setWorkingDirectory calls from extensions
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 52/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, node.js, typescript
調査の方向性
Read the bundled SDK documentation in copilot-sdk/extension.js and the declarations in copilot-sdk/generated/rpc.d.ts for metadata.setWorkingDirectory; compare their wording with the extension restrictions described for gitHubFetch.* and gitHubRelease.downloadAsset. Document the extension restriction there and in the release notes if the refusal is intentional. The issue does not identify a release notes file, so first locate the project's release notes entry point.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
In Copilot CLI 1.0.116, calling session.rpc.metadata.setWorkingDirectory({ workingDirectory }) from a user extension fails with an RPC error and emits a refusal warning:
✗ Command /start failed: Request session.metadata.setWorkingDirectory failed with message: Relaxing session permissions is not available to extensions
! Refused session.metadata.setWorkingDirectory from extension user:start: Relaxing session permissions is not available to extensions. The session owner must make this change; an extension author should remove this call.
The call failed with Allow All enabled for the session (/allow-all), after the extension's folder-trust check (session.rpc.permissions.folderTrust.isTrusted) passed. The target directory was the session's startup working directory, unchanged between session start and the call.
In copilot-sdk/extension.js and copilot-sdk/generated/rpc.d.ts, the bundled 1.0.116 @microsoft/copilot-sdk JSDoc for metadata.setWorkingDirectory describes host use and does not state that calls from extensions are refused. Some other extension-restricted methods in copilot-sdk/extension.js, such as gitHubFetch.* and gitHubRelease.downloadAsset, state Refused for extensions. or Extensions cannot use this method. in their JSDoc comments.
Related issue: #3035 (where a commenter noted an extension calling session.rpc.metadata.setWorkingDirectory as a workaround in the desktop app with CLI 1.0.94-3).
Affected version
GitHub Copilot CLI 1.0.116
Steps to reproduce the behavior
Reproduction outline:
- Enable experimental extensions (
"experimental": truein~/.copilot/settings.json). - Create
~/.copilot/extensions/repro-cwd/extension.mjsregistering a/repro-cwdslash command viajoinSessionfrom@microsoft/copilot-sdk/extension, with a handler reading the session's absoluteworkingDirectoryviasession.rpc.metadata.snapshot()and callingawait session.rpc.metadata.setWorkingDirectory({ workingDirectory }). - In Copilot CLI 1.0.116 started in a trusted folder, enable
/allow-allfor the session and run/repro-cwd.
The output above came from an interactive run of a user extension named user:start. Running /repro-cwd from the outline above is expected to fail with Request session.metadata.setWorkingDirectory failed with message: Relaxing session permissions is not available to extensions and a Refused session.metadata.setWorkingDirectory from extension user:repro-cwd warning.
Expected behavior
If refusing session.metadata.setWorkingDirectory for extensions is intentional:
- Document the restriction in the release notes and in the bundled
@microsoft/copilot-sdkJSDoc formetadata.setWorkingDirectory. - Consider either allowing a same-directory call to succeed without modifying session permissions or the permission primary directory, or providing a host-mediated working-directory change with explicit session-owner confirmation.
Additional context
- Operating system: SUSE Linux Enterprise Server 15 SP6 (Linux 6.4.0-150600.23.81-default)
- CPU architecture: x86_64
- Package-content comparison (not a runtime test of older releases): The strings
Relaxing session permissions is not available to extensionsandextension_refusedare absent from cached1.0.113and1.0.114prebuilds/linux-x64/runtime.node, and present in1.0.115and1.0.116.
- 主要言語
- Python
- スター
- 11.5k
- フォーク
- 2k
- 平均マージ
- 6時間 34分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-cli のほかの issue
-
area:plugins
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
github/copilot-cli#5567 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncationオープンarea:tools
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/copilot-cli#5476 ·
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5340 ·
github/copilot-cli の issue をすべて見る
似ている issue
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
Status: Triage Suggestion
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
collabnix/awesome-mcp-lists#515 ·
メンテナーはふだん 1 日以内に返信
-
Look-ahead bias via resample('1min').interpolate(method='time') in CCIStrategy and ReinforcedQuickieオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信