Reference guide for running Claude Code in headless, container, and CI environments — covers auth strategies, interactive mode pitfalls, tmux orchestration, root user workarounds, and git auth without SSH agents or keychains
SkillScore45Maintained
Automatic
◆AI Engineer pack
Last verified 7/28/2026
What it changes
Passed 9 of 20 test cases with the skill, and 2 of 20 without it.
Without skill9%
With skill45%
8 fixed2 passed either way12 still failing0 broke
Pass-rate lift
+36 pp
Tokens
+191%
Agent turns
0%
Response time
-46%
Model gemini-3.6-flashMeasured 7/28/2026v110 of 22 cases passed with skill · 20 comparable
Tokens, turns and time describe resource use, not a dollar price.
What's inside
The instructions your model reads when the skill loads.
SKILL.md485 linessingle file
Headless Claude Code
Running Claude Code outside a desktop terminal — in Docker containers, CI runners, cloud
VMs, or orchestrated by another process — is full of undocumented friction. This guide
covers everything we've learned getting CC to work reliably in these environments.
1. Authentication
CC tries multiple auth strategies in a fixed priority order. Understanding this chain is
the key to headless auth.