By default, when you run claude -p (or the TypeScript or Python SDKs), Claude searches for local CLAUDE.md's, settings, and MCPs. But for non-interactive usage, most of the time you want to explicitly specify what to load via --system-prompt, --mcp-config, --settings, etc.
- This was a design oversight when the SDK was first built
- In a future version, they will flip the default to
--bare - For now, opt in with the flag to get up to 10x faster startup
claude -p "summarize this codebase" \
--output-format=stream-json \
--verbose \
--bare