anthropics / anthropics/claude-code
[BUG] «PowerShell tool в Code tab всегда возвращает Exit code 1 без вывода на любую команду (даже Write-Output test), при этом PowerShell в системе работает нормально
- Lenguaje dominante
- Python
- Estrellas
- 145k
- Forks
- 23.1k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
### What's Wrong?
Every PowerShell tool call in this session returns "Exit code 1" with zero
output, even for trivial no-op commands (e.g. `Write-Output test`,
`Get-Date`, `1+1`). A command writing to a file (`Out-File`) also produces
no file at all, confirming the shell process itself never runs — this is
not a script error. PowerShell works normally when run manually outside
Claude Code on the same machine. The issue persisted after fully closing
and restarting the Claude Code app, and also reproduces identically inside
a spawned subagent in the same session.
### What Should Happen?
The PowerShell tool should execute the given command and return its actual
stdout/stderr and exit code — e.g. running `Write-Output test` should return
exit code 0 with output "test".
### Error Messages/Logs
```shell
```
### Steps to Reproduce
1. Open Claude Code desktop app (Code tab), any project folder on Windows.
2. Ask Claude to run any PowerShell command via its terminal tool.
3. Observe: tool call returns only "Exit code 1", no stdout/stderr, no
side effects (files never get created).
### Claude Model
None
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
_No response_
### Claude Code Version
1.52386.6
### Platform
Anthropic API
### Operating System
Windows
### Terminal/Shell
PowerShell
### Additional Information
Windows 11 Home Single Language, PowerShell 5.1 (Windows PowerShell),
Claude Code desktop app (Code tab).
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start at the PowerShell tool entry point used by the desktop app and reproduce the failure on Windows with `Write-Output test`, `Get-Date`, and `1+1`. Compare the tool's process, stdout/stderr, and exit-code handling with a manually run PowerShell session; done means these commands execute, return output, and report exit code 0, including inside a spawned subagent.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- powershell
- Área
- cli
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100