[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3

Headless Mode & CI Automation

💻 Claude Code CLI15 min1000 BASE XP

Headless Execution in CI/CD

Headless Mode enables Claude Code to run autonomously in automated pipelines, GitHub Actions, and background jobs using the -p / --print flag.

# Run a one-shot headless command
claude -p "Review recent git diff and check for security vulnerabilities"

# Automated test failure diagnosis in CI
claude -p "Analyze npm test failure logs and suggest fixes"

Subagent Coordination

When dealing with complex codebases, Claude Code can coordinate focused subtasks-investigating dependencies, analyzing test suites, or formatting files-and synthesize the results back to the primary developer workflow.

SYNAPSE VERIFICATION
QUERY 1 // 1
Which CLI flag runs Claude Code in one-shot headless mode for scripts and CI?
-h
-p / --print
--ci-only
-s