-
Notifications
You must be signed in to change notification settings - Fork 4k
Bug: 'Open Warp in New Tab' from Explorer context menu doesn't navigate to current directory on Windows #9844
Copy link
Copy link
Open
Labels
area:window-tabs-panesWindow, tab, pane, and workspace layout management.Window, tab, pane, and workspace layout management.area:workspaceFile tree, workspace navigation, project switching, and working-directory management.File tree, workspace navigation, project switching, and working-directory management.bugSomething isn't working.Something isn't working.os:windowsWindows-specific behavior, regressions, or requests.Windows-specific behavior, regressions, or requests.ready-to-implementThe issue is ready for implementation work.The issue is ready for implementation work.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triage-reviewedtriagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Metadata
Metadata
Assignees
Labels
area:window-tabs-panesWindow, tab, pane, and workspace layout management.Window, tab, pane, and workspace layout management.area:workspaceFile tree, workspace navigation, project switching, and working-directory management.File tree, workspace navigation, project switching, and working-directory management.bugSomething isn't working.Something isn't working.os:windowsWindows-specific behavior, regressions, or requests.Windows-specific behavior, regressions, or requests.ready-to-implementThe issue is ready for implementation work.The issue is ready for implementation work.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triage-reviewedtriagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Pre-submit Checks
Describe the bug
When right-clicking in Windows File Explorer and selecting "Open Warp in new tab", the new Warp tab opens at
~(USERPROFILE / home directory) instead of the directory where the right-click occurred.This appears to be the Windows counterpart of issue #6665 (which reports the same behavior on Linux via "Open in Terminal" context menu).
To reproduce
C:\Projects\my-app)pwdis~(e.g.C:\Users\<username>) instead ofC:\Projects\my-appExpected behavior
Warp should open the new tab with the working directory set to the folder where the right-click context menu was invoked.
Actual behavior
Warp opens at
USERPROFILE(e.g.C:\Users\<username>), ignoring the directory context entirely.Operating system (OS)
Windows
Operating system and version
Windows 10 (Build 26200.4061)
Current Warp version
Latest stable (as of May 2025)
Regression
No, this bug has existed throughout my experience using Warp on Windows.
Technical analysis
Based on a review of the Warp source code, here is a likely root cause:
URI handler parsing: The
on_open_urlshandler parses incoming URLs viaUrl::parse()andextract_filepath(). Forfile://URIs with no host component, it attempts to prepend a drive letter by scanning for the first:or\.Shell extension format mismatch: The Windows shell extension likely passes bare Windows paths (e.g.
C:\Users\user\folder) rather than properly formattedfile:///URIs. WhenUrl::parse()receives a bare path likeC:\Users\user\folder, it fails because theC:is interpreted as a scheme rather than a drive letter.Silent fallback: When URL parsing fails, the path is silently dropped. The window spawn logic then falls back to
std::env::var_os("USERPROFILE")wheninitial_directoryisNone, resulting in the home directory being used.Possible mitigation: The
warp://warp/new_from_pathendpoint exists for shell integration and may be the intended mechanism, but it appears the shell extension's context menu action doesn't invoke it correctly (or at all).Suggested investigation areas:
Url::parse()handles bare Windows paths (with drive letters) correctlyC:\...paths whenUrl::parse()failsAdditional context
$HOME)