remote: Support local terminals in remote projects#46532
Merged
Veykril merged 6 commits intozed-industries:mainfrom Jan 13, 2026
Merged
remote: Support local terminals in remote projects#46532Veykril merged 6 commits intozed-industries:mainfrom
Veykril merged 6 commits intozed-industries:mainfrom
Conversation
Veykril
reviewed
Jan 12, 2026
Member
Veykril
left a comment
There was a problem hiding this comment.
This generally sounds useful to me, one minor question.
Comment on lines
+288
to
+297
| /// Creates a local terminal even if the project is remote. | ||
| /// Used for "breaking out" of remote to access local shell. | ||
| /// The terminal will open in the Zed process's current directory, | ||
| /// which is where Zed was launched from (if via CLI) or home directory (if via app icon). | ||
| pub fn create_local_terminal( | ||
| &mut self, | ||
| cx: &mut Context<Self>, | ||
| ) -> Task<Result<Entity<Terminal>>> { | ||
| self.create_terminal_shell_internal(None, true, cx) | ||
| } |
Member
There was a problem hiding this comment.
Seeing this, that means if one uses the local terminal creation action in a local project one will not get a relevant working directory either way (despite having one available in theory). I feel like it'd be nice to make that work?
Contributor
Author
There was a problem hiding this comment.
Good catch! That's been fixed in 8b3e4e0
auto-merge was automatically disabled
January 13, 2026 15:47
Head branch was pushed to by a user without write access
rtfeldman
pushed a commit
that referenced
this pull request
Jan 13, 2026
This PR adds the ability to open local terminals when working in remote
projects. When working in a remote (often actually remoting into a local
container) I always need to run separate terminals outside Zed so I can
run local build tools, scripts, agents, etc. for the related project.
I'd like to be able to run all of these in the same Zed window and this
adds that ability via one-off local terminals.
## Changes
Adds an optional `local` parameter to terminal commands. When set to
`true`, creates a local shell on your machine instead of connecting to
the remote.
### Implementation
- Added `force_local` parameter to terminal creation logic
- Created `create_local_terminal()` method that bypasses remote client
- Updated terminal actions (`NewTerminal`, `NewCenterTerminal`) to
accept optional `local: bool` field (defaults to `false`)
### Usage
**Via keybinding:**
```json
{
"bindings": {
"cmd-t": "workspace::NewCenterTerminal",
"cmd-T": ["workspace::NewCenterTerminal", { "local": true }]
}
},
{
"context": "Terminal",
"bindings": {
"cmd-n": "workspace::NewTerminal",
"cmd-N": ["workspace::NewTerminal", { "local": true }],
},
},
```
**Behavior:**
- Default terminal commands continue to work as before (remote in remote
projects, local in local projects)
- The `local` parameter is optional and defaults to `false`
Release Notes:
- Added support for opening local terminals in remote projects via
`local` parameter on terminal commands.
|
Thank you for adding this, is it possible to pass a custom command to this command? I'm hoping I can use this to auto-tmux-ssh into the remote with a persistent connection so remote terminals don't die automatically. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to open local terminals when working in remote projects. When working in a remote (often actually remoting into a local container) I always need to run separate terminals outside Zed so I can run local build tools, scripts, agents, etc. for the related project. I'd like to be able to run all of these in the same Zed window and this adds that ability via one-off local terminals.
Changes
Adds an optional
localparameter to terminal commands. When set totrue, creates a local shell on your machine instead of connecting to the remote.Implementation
force_localparameter to terminal creation logiccreate_local_terminal()method that bypasses remote clientNewTerminal,NewCenterTerminal) to accept optionallocal: boolfield (defaults tofalse)Usage
Via keybinding:
{ "bindings": { "cmd-t": "workspace::NewCenterTerminal", "cmd-T": ["workspace::NewCenterTerminal", { "local": true }] } }, { "context": "Terminal", "bindings": { "cmd-n": "workspace::NewTerminal", "cmd-N": ["workspace::NewTerminal", { "local": true }], }, },Behavior:
localparameter is optional and defaults tofalseRelease Notes:
localparameter on terminal commands.