Preflight Checklist
What's Wrong?
Claude CLI in headless mode (-p flag) returns empty output when processing large stdin input (~7000+ characters), while smaller inputs (~2500 characters) work correctly.
What Should Happen?
Claude CLI should process large text input and return analysis results.
Error Messages/Logs
- Command exits with return code 0 (success)
- Empty stdout output (0 characters)
- No stderr errors
- `--verbose` flag provides no additional information
Steps to Reproduce
- Create a test file with ~7000 characters of content
- Run:
cat testfile.txt | claude -p --verbose --append-system-prompt "Analyze this content" --output-format text
- Observe empty output despite successful exit code
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
1.0.108
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Non-interactive/CI environment
Additional Information
Test Results
- Input size ~2350 characters: Returns expected output (1904 characters)
- Input size ~6986 characters: Returns empty output (0 characters)
- Both cases: exit code 0, no stderr errors
Impact
This prevents using Claude CLI for processing large documents, code reviews, or batch text analysis in automated workflows.
Preflight Checklist
What's Wrong?
Claude CLI in headless mode (
-pflag) returns empty output when processing large stdin input (~7000+ characters), while smaller inputs (~2500 characters) work correctly.What Should Happen?
Claude CLI should process large text input and return analysis results.
Error Messages/Logs
Steps to Reproduce
cat testfile.txt | claude -p --verbose --append-system-prompt "Analyze this content" --output-format textClaude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
1.0.108
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Non-interactive/CI environment
Additional Information
Test Results
Impact
This prevents using Claude CLI for processing large documents, code reviews, or batch text analysis in automated workflows.