[Agent] Interactive recovery runs shell commands in the install folder, not the user's folder
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Empieza por AgentLauncher, EnvironmentProber y ChatAgent.BuildSessionConfigAsync; después, comprueba cómo se configura SessionConfig.WorkingDirectory en el Copilot SDK. Sigue cómo llega AZCLIPS_CALLER_CWD a la sesión y confirma el valor de reserva cuando no está definida. El trabajo estará hecho cuando la recuperación interactiva resuelva las rutas relativas de shell y de archivos desde la carpeta del llamador; reproduce el problema con los pasos de params.json del issue.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 18
- Forks
- 10
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 157
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/azclips
-
act-identity-squad bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
act-identity-squad bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
act-identity-squad bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
act-identity-squad bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Azure/azclips#1512 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Dev] Bypass telemetry tag rules when AZCLIPS_TELEMETRY_TARGET=localPosiblemente ocupada @JaysonTaiMicrosoft la tomó hace 10 días. Abiertoact-observability-squad
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Azure/azclips#1353 · 2 reacciones · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Azure/azclips
Issues similares
-
launcher item missingAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Realm667/WolfenDoom#1758 ·
-
SDK version compatibility issueAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
-
AI documentation good first issue help wanted
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Keboo/SimplyBudget#334 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día