fix(agent): stabilize command working directories - #2623
Merged
bobleer merged 1 commit intoAug 29, 2026
Conversation
Resolve relative ExecCommand workdirs from the active workspace, keep remote paths POSIX and contained, and defer directory existence checks to the actual local or SSH execution channel. Remove the legacy Bash SFTP preflight and cover local, remote, compatibility, and escape cases.
bobleer
force-pushed
the
bob/fix-agent-command-workdir-explore
branch
from
August 29, 2026 02:51
a87cd6a to
0d20114
Compare
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.
Summary
Type and Areas
Type: regression fix
Areas: Rust core, Agent tools, remote SSH workspace execution
Motivation / Impact
Remote ExecCommand previously called SFTP is_dir before every command, including commands using the default workspace root. A healthy SSH command channel could therefore be rejected whenever the separate file channel was unavailable or transiently unhealthy. Local execution also performed a duplicate preflight before the terminal runtime check. Relative working directories were rejected by ExecCommand even though other workspace tools supported them.
Commands now accept stable workspace-relative paths, retain existing absolute inputs, and validate directory existence in the same channel that performs execution. Remote commands still refuse paths outside the current workspace and never fall back to local execution.
Verification
Reviewer Notes
Checklist