[BUG] Terminal becomes unresponsive when plugin installation triggers Git HTTPS credential prompt

Resolved 💬 3 comments Opened Apr 9, 2026 by patricklittle Closed Apr 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When Claude Code spawns git subprocesses for plugin operations (clone, pull, submodule sync), it does not set GIT_TERMINAL_PROMPT=0. If HTTPS credentials are missing for a plugin's git URL, git's default behavior is to prompt for username/password on stdin. Because the subprocess inherits Claude Code's terminal stdin, the credential prompt silently steals all keyboard input, making Claude Code's UI permanently unresponsive with no recovery path except force-quitting.

What Should Happen?

Claude Code should fail cleanly with a visible error, e.g.:
Failed to install plugin 'my-plugin': could not authenticate to https://code.corp.example.com
— without blocking terminal input.

Error Messages/Logs

No error is displayed. The terminal simply stops responding to all keyboard input.

Steps to Reproduce

  1. Add a plugin to a marketplace pointing to an HTTPS Git URL (e.g., GitLab, Azure DevOps)
  2. Enable that plugin in the project's settings.local.json
  3. Ensure no HTTPS credentials are stored for that host (no credential helper, no cached token) 4. Start Claude Code in that project directory
  4. Claude Code attempts to clone the plugin repo — git prompts for credentials on stdin, stealing terminal input
  5. The UI is frozen; no keypress reaches Claude Code

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.97 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Suggested fix: Set GIT_TERMINAL_PROMPT=0 in the environment of all git subprocesses spawned for plugin operations. This tells git to fail immediately if it cannot authenticate silently (via credential helper, SSH agent, etc.) rather than blocking on interactive input. Claude Code can then catch the non-zero exit code and surface a proper error in the UI.

As secondary hardening, set GIT_ASKPASS=/bin/echo on the same subprocesses. This handles credential helpers that bypass GIT_TERMINAL_PROMPT by returning an empty string to any credential prompt, causing authentication to fail fast.

Both variables should be scoped to plugin-related git subprocesses rather than set globally, so that intentional git operations initiated by the user (e.g., git push via the Bash tool) are unaffected.

Workaround: Users hitting this issue today can export these variables before launching Claude Code. Note that this suppresses git credential prompts for all git operations within the session, not just plugin fetches:

export GIT_TERMINAL_PROMPT=0                                                                                                                                                      
export GIT_ASKPASS=/bin/echo
claude

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗