Repository navigation
fix(ssh): agent signing failures no longer trigger password prompts - #23455
juliusmarminge wants to merge 6 commits into
Conversation
…sword Reproduces #23413. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…password A failed ssh-agent signature or a Permission denied list without password or keyboard-interactive was treated as a password-recoverable failure, so every connection attempt opened a password prompt that could not help and hid the real agent error. Only offer the prompt when the server accepts a password method and the agent did not fail. Fixes #23413 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matching any "communication with agent failed" text also caught "error fetching identities", where no key was offered and a password may still work. Narrow the check to ssh's sign_and_send_pubkey ... from agent diagnostic, and keep the prompt for the identities-fetch case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-only servers Only an ssh-agent signing failure suppresses the password prompt; other auth failures, including publickey-only denials, retry as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This targeted fix changes the existing SSH authentication fallback by suppressing password prompts after agent signing failures and preserving the original error, with focused regression coverage. Human review is required because the production change is in authentication-sensitive SSH code. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Closing in favour of #23437, which makes the same change. |
Problem
When a locked SSH agent cannot sign, each desktop reconnect opens an SSH password prompt even though unlocking the agent is needed. A local OpenSSH integration fixture reproduces this on both password-enabled and key-only hosts: two connection attempts produce two password requests.
Change
Return the original SSH error when OpenSSH reports an agent signing failure, before entering password fallback. Keep existing password, keyboard-interactive, and encrypted-key passphrase fallback unchanged.
Scope and approval
Fixes #23413
Triaged bug via the automated issue flow. The production change is a four-line signing-error guard in the shared SSH package; no renderer, contract, setting, or reconnect-policy changes.
Verification
vp test run packages/ssh/src/auth.test.ts packages/ssh/src/tunnel.test.ts: 16 passed at fa4f43f61f. The same final test fixture against base production has 3 failures and 13 passes, specifically the signing-error prompt assertions: red output, green output.vp run check:changedpasses: formatting, lint, unused-code checks, typechecks for four affected packages, and the two focused test files (16 tests). Typechecks report existing suggestions on unchanged code.SshEnvironmentManager, real SSH client/local sshd, and a protocol-agent fixture advertising an accepted ED25519 key. Each row runs two connection attempts under identical conditions. After the fix, both failures retain the originalSshCommandError, exit 255, and byte-identical stderr. Validated assertions.The tests also retain prompts for identity-listing failures, ordinary password/keyboard-interactive denials, and standalone publickey denials. A real encrypted-key SSH control confirms that a key-only host can require a passphrase through askpass.
Evidence index and reproducible fixture scripts. The visual matrix is empty because no render paths changed; these are service transcripts rather than desktop captures. Independent proof audit: sufficient for all six operational rows.
Unverified: macOS/Electron IPC and dialog presentation, real 1Password/Secretive lock/unlock and recovery, Windows, and successful manager-mediated passphrase retry.
cannot-verify desktop.Models: Claude Opus 5.5 and GPT-6.1 Sol; harnesses: Claude and Codex in T3 Code.