[Feature Request] Flag to disable git/SSH operations in print mode (-p)
Problem
When running claude -p in a macOS launchd background service for non-interactive text processing, Claude Code triggers macOS TCC permission prompts for SSH key access (via 1Password) on every service restart.
This happens even with:
--tools ""--no-session-persistence--max-turns 1cwdset to/tmp(not a git repo)
The SSH prompt appears to be from Claude Code's own initialization scanning for git identity, not from any tool use.
Use Case
Background service that pipes text through claude -p for cleanup (voice transcript → clean prose). No git, no file access, no tools needed — just prompt in, text out.
Current Workaround
User must manually deny the SSH prompt on each service restart. The cleanup still works after denial, but the popup is disruptive for an unattended background service.
Requested Solution
A flag to disable git operations entirely in print mode, e.g.:
--no-git- Or a setting like
"includeGitInstructions": falsethat also prevents git initialization scanning - Or respect
--tools ""more strictly to skip all initialization that could trigger OS permission prompts
Environment
- macOS 14 (Sonoma)
- Claude Code 2.1.76
- Running via launchd as a user agent
- 1Password SSH agent for git auth
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗