Headless mode runs Claude Code non-interactively so it can be scripted in CI or automation.
Instead of a live session, you pass a prompt and capture the result, enabling batch jobs, pipelines, and scheduled tasks. Permissions and output formats matter more here since no human is in the loop. It turns the agent into a programmable building block.