Frequent “Unlock SSH key” prompt in Agent Window

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hi. I keep seeing the “Unlock SSH key” prompt many times a day while using Cursor in Agent Window.

What is confusing is that I am not using GitHub at those moments. I am just using the AI chat for questions (not even related to coding). I am not pushing, pulling, cloning, or running GitHub commands.

Steps to Reproduce

  • Open Cursor in Agents Window.
  • That’s it.

Expected Behavior

I would like to not see this prompt and at the same time keep my passphrase secret.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.11.19
VS Code Extension API: 1.125.0
Commit: bf249e6efb5b097f23d7e21d7283429f0760b740
Date: 2026-07-12T21:39:24.175Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the detailed report. This is expected behavior: when you switch chats or Cursor is running in the background, the Agent Window can trigger git remote operations like resolving branches or PRs, even if you’re just chatting. Your SSH key is protected with a passphrase, and it isn’t cached between operations, so the Unlock SSH key prompt keeps showing up.

Workaround on macOS is to load the key into ssh-agent via Keychain. Then the passphrase is requested once per login session, not for every operation.

  1. Add this to ~/.ssh/config:

    Host *
      AddKeysToAgent yes
      UseKeychain yes
      IdentityFile ~/.ssh/github
    
  2. Run once:

    ssh-add --apple-use-keychain ~/.ssh/github
    

After that, the passphrase is stored in macOS Keychain. It stays secret and background git operations in Cursor should stop asking for it.

If the prompt still gets in the way, you can also set git.autofetch: false, or git.useIntegratedAskPass: false. The second option removes the in-window modal and switches back to the standard system SSH auth flow.

The repeated prompt in the Agent Window is a bug on our side, and it’s on our radar. I can’t share an ETA for a fix yet. Let me know if the workaround helped.

Hi! Thank you for your quick response.

git.autofetch: false is the default setting, so it changed nothing, but git.useIntegratedAskPass: false stopped the ssh passphrase prompt at least in the Agent Window! I saw one prompt in the IDE Window with a different UI and that’s it as for now.

Great, glad that helped.

About that one prompt you still see in the IDE window with a different UI, that’s expected. git.useIntegratedAskPass: false disables the in-window modal in Cursor and brings back the default system SSH auth flow, so the UI looks different, and the prompt can still show up sometimes during remote git operations.

If you want to remove that too, load your passphrase key into ssh-agent via macOS Keychain. Then you’ll be asked for the passphrase only once per login session:

  • In ~/.ssh/config:
    Host *
      AddKeysToAgent yes
      UseKeychain yes
      IdentityFile ~/.ssh/github
    
  • One time:
    ssh-add --apple-use-keychain ~/.ssh/github
    

The passphrase will be saved in Keychain and background git operations should stop prompting. Let me know if anything else comes up.

Yeah, understood about the keychain. What I don’t understand is what these background git operations are. I don’t want any process I’m not familiar with to use my GitHub account, if that makes sense :slight_smile:

Good question, there’s nothing hidden here. By background git operations, I mean normal read-only git commands that the built-in git integration and the Agent Window run to show up-to-date status like your current branch, remote state, linked PRs, and so on. This includes things like git fetch, ls-remote, and resolving branches and PRs. They can run, for example, when you switch between chats.

Important: these operations only read the state of your repo and its remote. They don’t push your code, don’t change anything on GitHub, and don’t do anything with your account beyond what git already does with your configured remote. The SSH key prompt shows up simply because contacting the remote over SSH requires a passphrase. It’s the same auth you’d see when running git fetch in a terminal.

If you don’t want these operations to run in the background at all, you can disable auto fetch with git.autofetch: false. Or if you want to fully disable the built-in git integration, set git.enabled: false. Just note that this will remove the SCM panel and branch status in the UI.

Let me know if anything’s still unclear.