[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3
Headless Mode & CI Automation
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.
⌨ HANDS-ON LABAutomate Code Audits Headless in CI
⭐ +200 XPIntegrate Claude Code into continuous integration. Run a headless analysis with --print (-p) that inspects git diff and exits cleanly.
1Run claude in print mode (-p) to audit git changes without opening an interactive terminal.
OBJECTIVE 1 / 1 — type "hint" if stuck
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