Fix: PowerShell(*) in CLI-Allowlist für Windows-Shell-Tool
Die Claude-CLI bietet unter Windows kein "Bash"-Tool an, sondern ein
separates Shell-Tool "PowerShell" (eigener Tool-Name + Permission-Regel).
Ohne PowerShell(*) fiel jeder Shell-Aufruf headless auf "ask" und wurde
still abgelehnt ("keine Permissions"). Auf Linux/macOS harmlos.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
3f251d788b
commit
9db9bd4cc7
1 file changed
+8
-2
@@ -365,8 +365,14 @@ public class ClaudeCliService
|
|||||||
}
|
}
|
||||||
else if (hasWorkspace)
|
else if (hasWorkspace)
|
||||||
{
|
{
|
||||||
// Normaler Modus mit Workspace: alle File-Tools
|
// Normaler Modus mit Workspace: alle File-Tools.
|
||||||
tools.AddRange(new[] { "Bash(*)", "Read", "Write", "Edit", "Glob", "Grep" });
|
// WICHTIG: Unter Windows bietet die Claude-CLI KEIN "Bash"-Tool an, sondern ein
|
||||||
|
// separates Shell-Tool namens "PowerShell" (userFacingName/interner Tool-Name
|
||||||
|
// "PowerShell", eigene Permission-Regel PowerShell(...)). Ohne PowerShell(*) fällt
|
||||||
|
// jeder Shell-Aufruf auf Windows headless auf "ask" → wird still abgelehnt
|
||||||
|
// ("keine Permissions"). Auf Linux/macOS ist PowerShell(*) harmlos (dort wird das
|
||||||
|
// Tool nie angeboten). Deshalb beide Shell-Tools freigeben.
|
||||||
|
tools.AddRange(new[] { "Bash(*)", "PowerShell(*)", "Read", "Write", "Edit", "Glob", "Grep" });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user