Paths Subjects Questions Quizzes Pricing Search
Intermediate Open Free

Piping a Large Log File Into Headless Claude Code

You want to analyze a 40MB build log with cat build.log | claude -p "explain the failure".

What actually happens?

Solution

The correct answer is "Piped stdin is capped at 10MB — write large input to a file instead."

Headless mode reads stdin to compose with ordinary Unix pipelines, but that input is capped at 10MB. For anything larger than that, the documented pattern is to write the content to a file and reference the file path in the prompt instead of piping it directly, rather than relying on piped stdin to carry it.

The distractors misstate the limit: headless mode isn't exempt from a stdin cap the way interactive mode supposedly is; the cap doesn't disappear because --output-format json is set; and the 10MB limit applies to piped stdin itself, not just to a separate file-upload path.

Share this question

← Back to Headless Mode, CI Automation & the Agent SDK practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.