Headless mode
Running an agent with one prompt and no interactive screen, so scripts, scheduled jobs and CI can use it.
Updated November 23, 2026
Most terminal agents have one. Each of these was checked against the agent’s own help text in EnvHaven’s image:
| Agent | Headless command |
|---|---|
| Claude Code | claude -p "prompt" |
| Codex | codex exec "prompt" |
| OpenCode | opencode run "prompt" |
| Factory Droid | droid exec "prompt" |
| Goose | goose run |
| Qwen Code | qwen -p "prompt" |
| Kiro | kiro-cli chat --no-interactive "prompt" |
Headless runs cannot stop to ask for approval, so they pair with an explicit permission setting; see full-access mode.