[Agent] Interactive recovery runs shell commands in the install folder, not the user's folder
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Inizia da AgentLauncher, EnvironmentProber e ChatAgent.BuildSessionConfigAsync, poi verifica come viene configurato SessionConfig.WorkingDirectory nel Copilot SDK. Traccia il percorso di AZCLIPS_CALLER_CWD fino alla sessione e conferma il valore di ripiego quando non è impostata. Il lavoro è completato quando il ripristino interattivo risolve i percorsi relativi della shell e dei file a partire dalla cartella del chiamante; riproduci il problema seguendo i passaggi params.json dell’issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C#
- Stelle
- 18
- Fork
- 10
- Merge medio
- 1g 20h
- PR unite (30g)
- 157
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/azclips
-
act-identity-squad bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
act-identity-squad bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
act-identity-squad bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
act-identity-squad bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Azure/azclips#1512 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Dev] Bypass telemetry tag rules when AZCLIPS_TELEMETRY_TARGET=localForse già presa @JaysonTaiMicrosoft l’ha presa 10 giorni fa. Apertaact-observability-squad
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Azure/azclips#1353 · 2 reazioni · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Azure/azclips
Issue simili
-
launcher item missingAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Realm667/WolfenDoom#1758 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
AI documentation good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
akshit-bansal11/edgepad#106 ·
I maintainer di solito rispondono entro 1 giorno