Headless mode
Definition
Running a coding agent non-interactively from a script or CI job, passing the task as an argument and reading the result from output.
In more detail
Examples are claude -p "..." in Claude Code and codex exec "..." in Codex. Headless runs are used for automated code review, fixing lint errors in CI, or generating reports on a schedule.
Without a person to approve actions, permissions must be set in advance, so headless agents should run with narrow tool access and, ideally, in a sandbox.
Related terms
Agent
A system where a model decides which actions or tools to use, in a loop, until a goal or stop condition is met, rather than following fixed steps.
Hooks
User-defined commands that run automatically at set points in a coding agent's lifecycle, such as before a tool call or when a session ends.
Git worktree
An extra working directory attached to the same Git repository, with its own branch checked out, created with `git worktree add`.
Read more about Headless mode
- Code review with Claude Code on every pull request
Write your checklist once, dry-run it locally, then review every pull request in GitHub Actions and post the findings.