Headless mode
Also called non-interactive mode, print mode, claude -p
Running a coding agent from a script or pipeline with nobody at the keyboard: it takes a prompt, works, prints the result and exits.
A coding agent at your desk asks questions and waits for answers. In a pipeline there's nobody to answer, so it needs a mode that takes one prompt, works, prints and stops. That's headless mode.
What makes it useful in CI is the output. Ask for JSON that matches a schema and the result is data your script can loop over, such as review findings with a file, a line and a severity, ready to post on the pull request without parsing prose.
For example
A CI job runs claude -p with a findings schema on every pull request and posts what comes back as inline review comments.
Put it to use
Where you'll meet headless mode in ChatGPT, Gemini and Claude, how to use it there, and the mix-up most people make.
Daily Bytes Plus is in the Android app.