-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesthas reproHas detailed reproduction stepsHas detailed reproduction stepsplatform:windowsIssue specifically occurs on WindowsIssue specifically occurs on Windows
Description
Environment
- Platform (select one):
- Anthropic API
- AWS Bedrock
- Google Vertex AI
- Other:
- Claude CLI version: 1.0.51 (Claude Code)
- Operating System: Windows 11
- Terminal: pwsh
Bug Description
The claude command, along with a massive --system-prompt argument, exceeds the character limit for a single command that can be passed to the underlying CreateProcess API in Windows, which is typically 8,191 characters.
Steps to Reproduce
- Create a long system prompt
- Run:
claude -p "Build a REST API" --system-prompt "Your very long system prompt"
Expected Behavior
Claude code is able to read the system prompt from a file. For example by implementing a --system-prompt-file cli argument
Actual Behavior
Command failed with ENAMETOOLONG: claude -p --system-prompt "You are Kilo Code, ..." --verbose --output-format stream-json --disallowedTools "Task,Bash,Glob,Grep,LS,exit_plan_mode,Read,Edit,MultiEdit,Write,NotebookRead,NotebookEdit,WebFetch,TodoRead,TodoWrite,WebSearch" --max-turns 1 --model claude-sonnet-4-20250514
spawn ENAMETOOLONG
Additional Context
Discovered using Kilocode with the Claude Code Provider on Windows Native.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesthas reproHas detailed reproduction stepsHas detailed reproduction stepsplatform:windowsIssue specifically occurs on WindowsIssue specifically occurs on Windows