Skip to content

fix(tui): pass directory to tui() to fix session loading#13602

Closed
olosegres wants to merge 1 commit into
anomalyco:devfrom
olosegres:fix/tui-directory
Closed

fix(tui): pass directory to tui() to fix session loading#13602
olosegres wants to merge 1 commit into
anomalyco:devfrom
olosegres:fix/tui-directory

Conversation

@olosegres
Copy link
Copy Markdown

@olosegres olosegres commented Feb 14, 2026

Fixes #13600

Pass the cwd variable to tui() in thread.ts to fix session loading.

The issue occurred when running a locally built OpenCode from within the local repository clone.

Verified by: Running TUI and confirming sessions load correctly.

When running opencode from a different working directory, sessions were
not loading because the directory parameter was not being passed to the
tui() function. This caused the SDK to not set the x-opencode-directory
header, and the server fell back to process.cwd() which was incorrect
in the worker context (Bun Workers don't inherit process.chdir()).
@disrupted
Copy link
Copy Markdown

I can confirm that this fixes the issue

@github-actions
Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: TUI doesn't pass directory to tui(), breaking session loading

2 participants