opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(tui): use repo root as default dir in dev mode

Open paralin opened this issue 2 months ago • 0 comments

This was an unintentional regression with opentui similar to #3777

Before "bun dev" would start with the project dir set to ./

...but now it's ./packages/opencode

This can cause some confusion as there is an AGENTS.md in the repo root.

When Installation.isLocal() returns true (dev mode), the default directory is now: typescript path.resolve(process.cwd(), "../..")

This means when running bun dev from the root with --cwd packages/opencode, the working directory will be correctly set to the repo root (./) instead of ./packages/opencode, ensuring the root AGENTS.md file is properly accessible.

Fixes: #3922

paralin avatar Nov 04 '25 23:11 paralin