Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Use an SSH key that has a passphrase and is not loaded in an SSH agent (for example,
ssh-add -D). - Add a project whose
originis an SSH remote, such asgit@github.com:<user>/<repo>.git. - Start a new thread with New worktree, using the default remote base (start from origin), and send a prompt.
Expected behavior
T3 Code asks for the key passphrase, the way a terminal does, and creates the worktree.
Actual behavior
The worktree base fetch runs with every prompt turned off (GIT_ASKPASS=, GIT_TERMINAL_PROMPT=0, SSH_ASKPASS=, SSH_ASKPASS_REQUIRE=never), so ssh has no way to ask for the passphrase:
- Desktop app (no TTY): the fetch fails right away and the thread fails with
Workspace preparation failed during provision worktree: … Git could not authenticate with the remote. Check Git credentials or SSH access on the server, then retry.Retrying fails the same way. t3started from a terminal: ssh asks for the passphrase on the server's own terminal instead. The thread sits on "Fetch base branch" until the 5-minute fetch timeout.
A thread without a worktree works, because it doesn't fetch.
I reproduced both cases against a local sshd with a passphrase-protected ed25519 key, running git with the same environment the driver uses:
# no TTY (desktop)
$ GIT_ASKPASS= GIT_TERMINAL_PROMPT=0 SSH_ASKPASS= SSH_ASKPASS_REQUIRE=never git ls-remote fixture:repo.git
user@127.0.0.1: Permission denied (publickey).
fatal: Could not read from remote repository.
# with a TTY (terminal-launched server)
Enter passphrase for key '~/.ssh/id_ed25519': <- waits on the server's terminal
Impact
Blocks work completely: anyone with a passphrase key who doesn't keep it in an agent can't start a worktree thread from origin.
Version or commit
Desktop 0.1.10 (Beta). The code path is unchanged on main at 6a29d58.
Environment
macOS 27.2.1 arm64, OpenSSH 10.5p1, desktop app as the server.
Screenshots, recordings, or supporting files
New worktree thread on main (6a29d58) against a local sshd with a passphrase-protected key. Setup fails at "Fetch base branch" in under 100 ms. The machine name and home paths were replaced with generic text before capture.
Workaround
Load the key into an agent before starting the thread (ssh-add --apple-use-keychain ~/.ssh/id_ed25519), or turn off "start from origin" for the worktree.
Related
- Feature: Prompt for SSH key passphrase during commit/push/PR #3813 asked for a passphrase prompt for commit/push/PR (closed as completed, but
mainhas no Git passphrase prompt). - fix(source-control): prompt for SSH key passphrases #7322 implemented prompts across clone, push and pull; it was closed as too large (3k lines, overlapping
DesktopSshPasswordPrompts). - Worktree bootstrap fetch hangs for the full 30s timeout when a GUI SSH agent is waiting on key authorization #11930 / fix(server): a new-worktree fetch waiting on SSH key approval fails in 10 seconds and says so #36342 cover a different case: a GUI agent (1Password, Secretive) that waits for approval.
Proposed fix
I have a working fix and can open a PR if that's wanted. It is scoped to the new-worktree base fetch only:
- The fetch runs with the existing askpass helper from
packages/ssh(already used for desktop SSH connections). In probe mode the helper declines ssh's prompt and reports the exact prompt text. - The worktree setup card (web and mobile) shows that prompt with a password field. The answer goes over a new
worktreeSetup.answerCredentialRPC, redacted on the server, and is never saved. - The fetch reruns with the answer, which the helper gives only to that exact prompt. A wrong passphrase asks again. Cancel works, the prompt times out after 10 minutes, and Windows keeps today's behavior.
- People without a passphrase key see no change.
I checked it end to end against real OpenSSH: no answer gives today's error; a wrong passphrase re-asks; the correct one fetches origin/main.

Activity
juliusmarminge commentedon Nov 18, 2026
Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.