[PR #3923] fix(tui): use repo root as default dir in dev mode #10804

Closed
opened 2026-02-16 18:15:33 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3923

State: closed
Merged: No


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

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3923 **State:** closed **Merged:** No --- 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
yindo added the pull-request label 2026-02-16 18:15:33 -05:00
yindo closed this issue 2026-02-16 18:15:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10804