Tech
claude -p: what headless Claude Code actually loads (and when --bare is the right call)
You wire claude -p into a script, it works, and then the usage numbers make no sense: a one-line prompt cost as much as a whole working session. We hit this running Claude Code on a schedule — a cold claude -p in our repo root burned roughly 150,000 tokens before doing any work , because print mode loads everything an interactive session would.
This post covers what -p actually loads, the --bare flag that fixes the cost problem, and the permission and output flags that matter once Cl...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to