[Agent] Interactive recovery runs shell commands in the install folder, not the user's folder
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
AgentLauncher、EnvironmentProber、ChatAgent.BuildSessionConfigAsyncから始め、Copilot SDKでSessionConfig.WorkingDirectoryがどのように設定されるかを確認します。AZCLIPS_CALLER_CWDがセッションに届く経路を追い、未設定の場合のフォールバックを確認します。インタラクティブな復旧で、呼び出し元のフォルダーを基準にシェルとファイルの相対パスが解決されれば完了です。issueのparams.jsonの手順で再現してください。
索引モデルが issue の本文から書いたものです。
説明
Affected surface
Agent (interactive recovery: powershell / bash / view tool calls)
Describe the bug
This behavior already exists on main.
The Copilot session runs in the agent install folder instead of the folder where the user ran az. Shell commands and file reads that the agent runs with a relative path therefore resolve against the install folder.
AgentLauncherstarts the agent process withWorkingDirectoryset to the agent install folder. .NET needs this to resolve relative probing paths. The user's folder is forwarded inAZCLIPS_CALLER_CWD.EnvironmentProberreadsAZCLIPS_CALLER_CWDand reports it ascwdin the injected<environment>block, so the model is told the right folder.ChatAgent.BuildSessionConfigAsyncdoesn't setSessionConfig.WorkingDirectory, so the Copilot session, and every shell tool it runs, uses the agent process folder.
Repro (interactive mode, packaged build):
- In
C:\work, createparams.jsonand runaz config get --key @params.json. - Run
az troubleshoot recover --style interactiveand approve the plan. - The
<environment>block showscwd: C:\work. The session'scwdis...\Programs\azcli\. The agent runsGet-ChildItem -Path .\params.json, which fails with exit code 1 although the file exists inC:\work.
One-shot recovery isn't affected: the plan's relative paths are run by the user from their own folder. Reading files that the failed command names isn't affected either, because FailedCommandFiles resolves them against AZCLIPS_CALLER_CWD.
Expected behavior
The Copilot session runs in the user's folder, so relative paths in agent commands resolve the same way as in the user's failed command.
Additional context
Possible fix: set SessionConfig.WorkingDirectory (a GitHub Copilot SDK option) to the AZCLIPS_CALLER_CWD value, and fall back to the current behavior when it is unset.
Found while testing #1457, which doesn't change this path. Priority: P2.
- 主要言語
- C#
- スター
- 18
- フォーク
- 10
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 157
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Azure/azclips のほかの issue
-
act-identity-squad bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
act-identity-squad bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
act-identity-squad bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
act-identity-squad bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Azure/azclips#1512 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[Dev] Bypass telemetry tag rules when AZCLIPS_TELEMETRY_TARGET=local対応中かも @JaysonTaiMicrosoft が 10 日前に担当しました。 オープンact-observability-squad
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Azure/azclips#1353 · リアクション 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Realm667/WolfenDoom#1758 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
AI documentation good first issue help wanted
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
akshit-bansal11/edgepad#106 ·
メンテナーはふだん 1 日以内に返信