The software world
Headless mode
claude -p
Running Claude as a one-shot command instead of a conversation: you pass a prompt in, it does the work and prints a result, with no interactive session. In the CLI that's
claude -p "…". Why it matters
Part of Building Claude into your own software → It's what makes Claude scriptable. Anything that can run a command can now run an agent — a scheduled job, a CI step, a line in a shell script, a build pipeline. It's also the natural rung below the Agent SDK: a one-off task in a script is headless mode's job, and you only reach for the SDK when the agent needs to be a component inside a real program.