Edit tools (edit_existing_file, single_find_and_replace) fail when workspace is connected via Remote SSH
Before submitting your bug report
- [x] I've tried finding an answer on the Continue docs site
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- Continue extension version: 1.3.40
- VS Code version: Version: 1.124.2
- OS: Windows_NT x64 10.0.26200
- Connection type: Remote – SSH (via ms-vscode-remote.remote-ssh)
- Remote OS: Linux (Ubuntu 22.04)
- Local OS: Windows 11
Description
- Open a folder in VS Code using Remote – SSH.
- Install and activate the Continue extension.
- Open a simple text file, e.g.,
e.phpcontaining only123456789. - Ask Continue to edit the file, for example: "Add 10 to the number" or "Replace content with 123456799".
- The agent attempts to use
edit_existing_file,single_find_and_replace, orrun_terminal_commandto modify the file.
Observed Behavior
edit_existing_filefails with:
Failed to edit undefined. To continue working with the file, read it again to see the most up-to-date contentssingle_find_and_replacefails with:
string old_string is required(even though the argument is correctly provided).create_new_filefails with:
contents argument is required. (type string)(again despite providing the argument).run_terminal_commandexecutes without error but the file is not actually modified (e.g.,echo 123456799 > movie.phphas no effect;view_diffshows empty diff).read_fileandfile_glob_searchwork correctly and show the original content.
Expected Behavior
All edit tools should modify file content in a remote SSH workspace exactly as they do in a local workspace.
Additional Notes
The problem appears to be related to file path resolution or write-permissions when the workspace is accessed via Remote – SSH. The agent can read files but cannot write them, which severely limits functionality in remote development environments.
To reproduce
No response
Log output
Hi I checked the latest code and this issue looks partially outdated.
- The main Remote SSH execution/write path seems to be handled correctly now:
- file writes go through VS Code
workspace.fs.writeFile(...) - remote terminal commands are routed through the VS Code integrated terminal instead of local spawn
- So the original “Remote SSH cannot edit/write files” root cause may already be fixed.
What still appears to remain is the error handling / UX:
Failed to edit undefinedcan still happen because the apply failure path closes state without preservingfilepath- if this issue still reproduces, the likely fix is to preserve the resolved file URI/filepath throughout the apply flow and include it in failure state
- it would also help to harden edit-tool arg normalization (
old_string/new_string/contents) in case some of the reported failures are coming from argument-shape mismatches rather than Remote SSH itself
Suggested fix direction:
- preserve
filepathin the edit apply failure path - make the failure message fallback-safe (avoid showing
undefined) - ensure the apply pipeline keeps full remote URIs intact end-to-end
So my read is: the original Remote SSH write bug may be fixed, but the failure reporting path still needs cleanup, and there may be a separate argument-handling issue if repro still exists.
I would like to fix this issue. @sestinj
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, you are welcome to leave a comment and this will keep the issue open. However please note that this repo is no longer being actively maintained.