Environment
- Platform (select one):
- 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.
Environment
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
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
Additional Context
Discovered using Kilocode with the Claude Code Provider on Windows Native.