What this thread does
Do first: Use cn -p "Fix all ESLint errors in src/" --allow Write --allow Edit --allow Bash in an already configured CI environment.
Short answer
Headless mode handles one task, finishes, and prints the response to stdout. It cannot ask a person for tool approval, so launch-time permissions determine whether it can make changes.
What to do
| Control | Value / behavior |
|---|---|
| Headless invocation | cn -p "your prompt"; one task, then exit |
| Browserless CI setup | Set the environment variable CONTINUE_API_KEY before invocation |
| Default permission levels | allow runs automatically; ask prompts only in TUI; exclude hides the tool |
| Write and shell defaults | Edit, MultiEdit, Write, Bash default to ask; headless excludes them |
| Enable needed operations | Repeat --allow <tool>, e.g. --allow Write --allow Edit --allow Bash; explicitly allow MultiEdit if needed |
| Other permission overrides | --ask, --exclude; --allow "*" allows everything |
| Restrict tool arguments | Write(**/*.ts) matches TypeScript writes; Bash(npm install*) matches install commands |
| Machine-readable output | --format json |
| Cleaner text output | --silent removes <think> tags and excess whitespace |
| Choose configuration | --config <path or slug> selects a file or assistant |
| Resume | cn -p --resume replays the previous session history |
| Normal mode | Default; uses configured permissions |
| Absolute mode overrides | --auto allows all tools; --readonly excludes writes but allows reads and Bash |
| Permission order | Mode policies → CLI flags → permissions.yaml → built-in defaults |
Pipe input into the command to provide context, or redirect stdout for another program. Select the smallest tool set that can finish the task. Mode policies ignore permission flags and persistent settings, so do not combine an absolute mode with flags expecting the flags to constrain it.
Limits and open questions
The pages do not specify exit-status meanings or a headless runtime limit. Plan mode permits Bash; it is not a shell-free mode. This is a documentation recipe, with no CI execution result.
Not for: Continue VS Code extension interactive Agent mode.
Sources
- Continue CLI quickstart, Continue; 2026-11-16.
- Continue headless mode, Continue; 2026-11-16.
- Continue tool permissions, Continue; 2026-11-16.
Checked
2026-11-16; read Continue CLI quickstart; Continue headless mode; Continue tool permissions; no command was run.
Started from a post by @Continue documentation; uinstinct; RomneyDa, packaged by the editor. Original post