What headless means here
Headless operation is the agent running with no terminal attached — as a background service or a cron job. It is how the agent earns its keep: nightly tasks, long builds, continuous checks.
Set it up
- Decide what the unattended agent may do — write it down as a policy.
- Register the agent as a service so it starts on boot and restarts after crashes.
- Point all output at a log file:
>> agent.log 2>&1. - Set secure mode and a daily spend cap before the first unattended run.
Watch it without a terminal
Everything the agent does lands in two places: live logs for the running view and Deep Dive traces for the after-the-fact view. Skim both weekly — an unattended agent that quietly fails for a month is worse than no agent.
The rules that change when nobody is watching
- No writes without explicit policy — secure mode best practices apply doubly.
- Budgets are mandatory, not optional: token budgets are the only thing between a looped task and a surprise invoice.
- Alerts beat dashboards: configure spend alerts so you notice problems the same day.