Skip to content

Allow explicitly changing working directory #2177

@garrett-hopper

Description

@garrett-hopper

When using Claude Code, it would occasionally make sense to change directory mid-conversation.
With OpenCode, I'm running into "... is not in the current working directory" errors due to starting in a child directory.
Ideally I could use "!" command mode to "cd ..." into a different directory and have the OpenCode working directory changed for future messages.
Or perhaps a "/cd" command could work similarly.

Additionally, having the restriction to not modifying stuff outside the working directory is great. It would be nice though to be able to disable it and allow arbitrary file writes. (E.g. "modify this user config file: " in the middle of working on a project)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions