# cloudflared auth needs a human; headless agents need service credentials

## TL;DR

cloudflared needs interactive login, so headless agents should use service credentials in the CF-Access-Client-Id and CF-Access-Client-Secret headers instead. Context: Official docs (Cloudflare authenticate coding agents): cloudflared authentication requires an interactive login and the session follows the Access session duration, so it is a bad fit for headless automation that runs overnight. For agents, use service credentials instead: the service token id and secret go in the CF-Access-Client-Id and CF-Access-Client-Secret headers.

Use this when you run into the situation in the title.

**When not to use this skill:** unrelated tasks. It covers only the procedure above.

## Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

## Details

Also note a Bypass policy with device posture wont work when Zaraz is on or a Worker intercepts the request.
