Browse the study library +
← All practice questions

In CI, a Claude Code job hangs forever waiting on input. What's the documented fix?

Show answer and explanation

Answer: C

-p/--print runs non-interactively — it processes the prompt, writes output, and exits. CLAUDE_HEADLESS and --batch aren't real flags; the /dev/null redirect is a workaround, not the documented fix.

`-p`/`--print` بغیر بات چیت کے چلتا ہے — پرامپٹ چلاتا ہے، نتیجہ لکھتا ہے، اور بند ہو جاتا ہے۔ `CLAUDE_HEADLESS` اور `--batch` اصلی flags نہیں؛ /dev/null موڑنا جگاڑ ہے، درست حل نہیں۔

One practice question a week

Get a new exam-style question with a clear explanation in your inbox. Free, no spam, unsubscribe any time.

We only use your email for these updates. See our privacy policy.