Description
on occasion, the model will write a bash command which cds into a directory, then runs a command, then cds into a different directory, then runs another command. and sometimes the second one includes the cd ../<other-dir> notation to take you up one level. opencode seems to understand this as accessing an external directory.
i expect this to be safe as it is actually contained under the current working directory. (hard-level difficulty i'm guessing)
Plugins
no plugins
OpenCode version
1.2.13
Steps to reproduce
- create two directories:
dir1 and dir2
- ask the model to run the
ls command in both directories like this: cd dir1 && ls && cd ../dir2.
- observe the external directory access prompt
Screenshot and/or share link
https://opncd.ai/share/X2xPGJ3Z

Operating System
Windows 11 in WSL2 with Linux (Ubuntu 24.04)
Terminal
WezTerm
Description
on occasion, the model will write a bash command which cds into a directory, then runs a command, then cds into a different directory, then runs another command. and sometimes the second one includes the
cd ../<other-dir>notation to take you up one level. opencode seems to understand this as accessing an external directory.i expect this to be safe as it is actually contained under the current working directory. (hard-level difficulty i'm guessing)
Plugins
no plugins
OpenCode version
1.2.13
Steps to reproduce
dir1anddir2lscommand in both directories like this:cd dir1 && ls && cd ../dir2.Screenshot and/or share link
https://opncd.ai/share/X2xPGJ3Z

Operating System
Windows 11 in WSL2 with Linux (Ubuntu 24.04)
Terminal
WezTerm