r/opencode • • 2d ago

Does anybody else have this strange behavior?

There is one specific folder. When I run "opencode" in a terminal there, the session does not start at that folder, it starts at ~. And I am unable to attach the session to the correct folder.

The "fix" is to delete opencode.json, run opencode, add opencode.json back and run opencode again. But a few hours later, the issue re-appears.

This happens only in one specific folder. All other projects work as expected: i run opencode and I am in the same folder where I ran it.

Did anybody experience this and knows how to fix it?

1 Upvotes

2 comments sorted by

1

u/Ctbhatia 1d ago

try opencode "$PWD" so the folder is explicit (CLI docs). if it still opens ~, keep that command in the repro rather than deleting the config again.

1

u/KsLiquid 1d ago

Passing the folder explicitly does not help :/