CCARF Practice Question
Correct answer: B
A: The Claude Code CLI has no --batch flag for this. Non-interactive mode is -p or --print.
B: The `-p` (or `--print`) flag is the documented way to run Claude Code non-interactively. It processes the prompt, prints the result to stdout, and exits without waiting for user input—ideal for CI/CD pipelines.
C: Closing stdin does not put Claude Code into print mode. It is waiting for interactive input by design.
D: CLAUDE_HEADLESS is not a Claude Code setting. The process still waits.