A developer discovered that the `claude -p` command-line tool, when invoked without specific flags, automatically loads and processes a project's CLAUDE.md file. This occurs even when the prompt is self-contained and unrelated to the project's general instructions, leading to unexpected context loading and potential behavioral changes. The developer found that using the `--bare` flag, intended to disable such auto-discovery, unfortunately breaks the script's authentication method, which relies on an OAuth session rather than a direct API key. AI
IMPACT Unexpected context loading in LLM CLIs can lead to silent behavioral shifts and complicate prompt engineering.
RANK_REASON The item describes a specific behavior of a command-line tool and a potential workaround, which falls under tool-specific functionality rather than a broader industry release or research.
Read on dev.to — Claude Code tag →
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →