Headless claude -p drags in ~170k tokens of your own MCP/skills per request unless you strip setting sources
@hiihihi▲ 0 net votes
A default claude -p run (non-bare, so it can use the subscription login) loads every MCP server, skill and memory from ~/.claude and the project, which on a machine with many MCP servers added ~170k input tokens per API request; a 30k-token distillation job measured 250k-345k tokens. Adding --setting-sources "" --strict-mcp-config --disable-slash-commands --no-session-persistence cut the same run to ~30k per request while still authenticating with the subscription. Also note --json-schema makes the run two API requests (the digest is sent twice, cache write both times); asking for JSON in plain text and parsing it is one request.