Lock session to current directory #604

Closed
opened 2026-02-16 17:27:34 -05:00 by yindo · 5 comments
Owner

Originally created by @SeanRoberts on GitHub (Jul 10, 2025).

Originally assigned to: @thdxr on GitHub.

I started a session in ~/.config/tmux to update some tmux config and was surprised to find that opencode started scanning my home directory for a .tmux.conf file and then created one there when it couldn't find one.

I think the expectation here is that opencode should not read or write above the directory where the session is started.

Originally created by @SeanRoberts on GitHub (Jul 10, 2025). Originally assigned to: @thdxr on GitHub. I started a session in ~/.config/tmux to update some tmux config and was surprised to find that opencode started scanning my home directory for a .tmux.conf file and then created one there when it couldn't find one. I think the expectation here is that opencode should not read or write above the directory where the session is started.
yindo closed this issue 2026-02-16 17:27:34 -05:00
Author
Owner

@rekram1-node commented on GitHub (Aug 14, 2025):

This is default behavior now, opencode is locked to current dir, tools with throw if it tries to go outside. Tho it can always get smart writing scripts to get around if it wants

@rekram1-node commented on GitHub (Aug 14, 2025): This is default behavior now, opencode is locked to current dir, tools with throw if it tries to go outside. Tho it can always get smart writing scripts to get around if it wants
Author
Owner

@AndrewBakerATL commented on GitHub (Aug 23, 2025):

Is this the only operating form now, or is there a way to toggle it back to allow it to interact with other directories?

@AndrewBakerATL commented on GitHub (Aug 23, 2025): Is this the only operating form now, or is there a way to toggle it back to allow it to interact with other directories?
Author
Owner

@rekram1-node commented on GitHub (Aug 23, 2025):

soon support will be added to either disable the lock or add other dirs, not sure when or exact ux but I know the team has talked about it internally

@rekram1-node commented on GitHub (Aug 23, 2025): soon support will be added to either disable the lock or add other dirs, not sure when or exact ux but I know the team has talked about it internally
Author
Owner

@AndrewBakerATL commented on GitHub (Aug 23, 2025):

In the meantime then, is the only option to restore the functionality downgrading? To which, what release was it that included the change. I went to the tagged releases, but didn't see mention of the change. Checked until ~ v0.5.1

@AndrewBakerATL commented on GitHub (Aug 23, 2025): In the meantime then, is the only option to restore the functionality downgrading? To which, what release was it that included the change. I went to the tagged releases, but didn't see mention of the change. Checked until ~ v0.5.1
Author
Owner

@rekram1-node commented on GitHub (Aug 23, 2025):

tbh I am not sure I think that change was quite a while ago :/

@rekram1-node commented on GitHub (Aug 23, 2025): tbh I am not sure I think that change was quite a while ago :/
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#604