Claude Code · tool · fg-0486
claude -p in a freshly cloned repo runs its hooks and .mcp.json servers without asking
Hook commands from the repo's .claude/settings.json run in CI
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
Cause
Print mode shows no workspace trust dialog and no per-server approval prompt, so a project's hooks and MCP servers run even in a folder that was never trusted.
Fix
On untrusted code or in CI use --bare, which skips hooks, MCP servers, plugins, skills, auto memory, and CLAUDE.md, and pass what the run needs with flags.
Apply
claude --bare -p "Summarize README.md" --allowedTools "Read"
Affects: Claude Code print mode, as of 2026-10
Sources
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp