Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Headless mode

Topic: AgentsAlso called non-interactive 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.

  • 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`.