OpenCode not launching in a random folder with .git folder #7115

Open
opened 2026-02-16 18:06:13 -05:00 by yindo · 3 comments
Owner

Originally created by @DenysMb on GitHub (Jan 21, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Hello!

Earlier today I was working fine in a project that has a .git folder.
At some point I accidentally closed the terminal with the OpenCode session running.
When I tried to open the OpenCode on the folder again, it didn't launch.
It seems that it actually launches but display nothing on terminal. I am not able to close with Ctrl + C or Ctrl + D, having to force quit the terminal.
Once I remove the .git folder, OpenCode opens fine.
This happens only in this single specific folder. Other folders with .git works fine.
I deleted the folder, cloned again, "re-initialize" git, reboot the machine. Nothing works.
The logs doesn't show nothing relevant.
The problem is not related to anything inside the .git folder because even having an empty .git folder this issue still happens.

Log
INFO  2026-01-21T22:38:57 +86ms service=server method=GET path=/event request
INFO  2026-01-21T22:38:57 +1ms service=server status=started method=GET path=/event request
INFO  2026-01-21T22:38:57 +0ms service=default directory=/home/denys/Projects/KDE/TimeTracker creating instance
INFO  2026-01-21T22:38:57 +0ms service=project directory=/home/denys/Projects/KDE/TimeTracker fromDirectory
INFO  2026-01-21T22:38:57 +1ms service=server method=GET path=/session request
INFO  2026-01-21T22:38:57 +0ms service=server status=started method=GET path=/session request
INFO  2026-01-21T22:38:57 +0ms service=server method=GET path=/config/providers request
INFO  2026-01-21T22:38:57 +0ms service=server status=started method=GET path=/config/providers request
INFO  2026-01-21T22:38:57 +0ms service=server method=GET path=/provider request
INFO  2026-01-21T22:38:57 +0ms service=server status=started method=GET path=/provider request
INFO  2026-01-21T22:38:57 +0ms service=server method=GET path=/agent request
INFO  2026-01-21T22:38:57 +0ms service=server status=started method=GET path=/agent request
INFO  2026-01-21T22:38:57 +0ms service=server method=GET path=/config request
INFO  2026-01-21T22:38:57 +0ms service=server status=started method=GET path=/config request
INFO  2026-01-21T22:38:57 +17ms service=default directory=/home/denys/Projects/KDE/TimeTracker bootstrapping
INFO  2026-01-21T22:38:57 +3ms service=config path=/home/denys/.config/opencode/config.json loading
INFO  2026-01-21T22:38:57 +0ms service=config path=/home/denys/.config/opencode/opencode.json loading
INFO  2026-01-21T22:38:57 +4ms service=config path=/home/denys/.config/opencode/opencode.jsonc loading
INFO  2026-01-21T22:38:57 +2ms service=bun cmd=["/home/denys/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.30","--exact"] cwd=/home/denys/.config/opencode running
INFO  2026-01-21T22:38:57 +40ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

installed @opencode-ai/plugin@1.1.30

[36.00ms] done
 stderr=Saved lockfile
 done
INFO  2026-01-21T22:38:57 +0ms service=bun cmd=["/home/denys/.opencode/bin/opencode","install"] cwd=/home/denys/.config/opencode running
INFO  2026-01-21T22:38:57 +7ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)

Checked 3 installs across 4 packages (no changes) [1.00ms]
 stderr= done
INFO  2026-01-21T22:38:57 +2ms service=config path=/home/denys/.opencode/opencode.jsonc loading
INFO  2026-01-21T22:38:57 +0ms service=config path=/home/denys/.opencode/opencode.json loading
INFO  2026-01-21T22:38:57 +0ms service=bun cmd=["/home/denys/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.30","--exact"] cwd=/home/denys/.opencode running
INFO  2026-01-21T22:38:57 +4ms service=plugin name=CodexAuthPlugin loading internal plugin
INFO  2026-01-21T22:38:57 +0ms service=plugin name=CopilotAuthPlugin loading internal plugin
INFO  2026-01-21T22:38:57 +0ms service=plugin path=file:///home/denys/.config/opencode/plugins/the-council.ts loading plugin
INFO  2026-01-21T22:38:57 +41ms service=server status=started method=POST path=/log request
INFO  2026-01-21T22:38:57 +0ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

installed @opencode-ai/plugin@1.1.30

[2.00ms] done
 stderr=Saved lockfile
 done
INFO  2026-01-21T22:38:57 +0ms service=bun cmd=["/home/denys/.opencode/bin/opencode","install"] cwd=/home/denys/.opencode running
INFO  2026-01-21T22:38:57 +4ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)

Checked 3 installs across 4 packages (no changes) [1.00ms]
 stderr= done

Plugins

No response

OpenCode version

1.1.30

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

openSUSE Tumbleweed

Terminal

Konsole and Alacritty

Originally created by @DenysMb on GitHub (Jan 21, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Hello! Earlier today I was working fine in a project that has a `.git` folder. At some point I accidentally closed the terminal with the OpenCode session running. When I tried to open the OpenCode on the folder again, it didn't launch. It seems that it actually launches but display nothing on terminal. I am not able to close with `Ctrl + C` or `Ctrl + D`, having to force quit the terminal. Once I remove the `.git` folder, OpenCode opens fine. This happens only in this single specific folder. Other folders with `.git` works fine. I deleted the folder, cloned again, "re-initialize" git, reboot the machine. Nothing works. The logs doesn't show nothing relevant. The problem is not related to anything inside the `.git` folder because even having an empty `.git` folder this issue still happens. <details> <summary>Log</summary> ``` INFO 2026-01-21T22:38:57 +86ms service=server method=GET path=/event request INFO 2026-01-21T22:38:57 +1ms service=server status=started method=GET path=/event request INFO 2026-01-21T22:38:57 +0ms service=default directory=/home/denys/Projects/KDE/TimeTracker creating instance INFO 2026-01-21T22:38:57 +0ms service=project directory=/home/denys/Projects/KDE/TimeTracker fromDirectory INFO 2026-01-21T22:38:57 +1ms service=server method=GET path=/session request INFO 2026-01-21T22:38:57 +0ms service=server status=started method=GET path=/session request INFO 2026-01-21T22:38:57 +0ms service=server method=GET path=/config/providers request INFO 2026-01-21T22:38:57 +0ms service=server status=started method=GET path=/config/providers request INFO 2026-01-21T22:38:57 +0ms service=server method=GET path=/provider request INFO 2026-01-21T22:38:57 +0ms service=server status=started method=GET path=/provider request INFO 2026-01-21T22:38:57 +0ms service=server method=GET path=/agent request INFO 2026-01-21T22:38:57 +0ms service=server status=started method=GET path=/agent request INFO 2026-01-21T22:38:57 +0ms service=server method=GET path=/config request INFO 2026-01-21T22:38:57 +0ms service=server status=started method=GET path=/config request INFO 2026-01-21T22:38:57 +17ms service=default directory=/home/denys/Projects/KDE/TimeTracker bootstrapping INFO 2026-01-21T22:38:57 +3ms service=config path=/home/denys/.config/opencode/config.json loading INFO 2026-01-21T22:38:57 +0ms service=config path=/home/denys/.config/opencode/opencode.json loading INFO 2026-01-21T22:38:57 +4ms service=config path=/home/denys/.config/opencode/opencode.jsonc loading INFO 2026-01-21T22:38:57 +2ms service=bun cmd=["/home/denys/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.30","--exact"] cwd=/home/denys/.config/opencode running INFO 2026-01-21T22:38:57 +40ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/plugin@1.1.30 [36.00ms] done stderr=Saved lockfile done INFO 2026-01-21T22:38:57 +0ms service=bun cmd=["/home/denys/.opencode/bin/opencode","install"] cwd=/home/denys/.config/opencode running INFO 2026-01-21T22:38:57 +7ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd) Checked 3 installs across 4 packages (no changes) [1.00ms] stderr= done INFO 2026-01-21T22:38:57 +2ms service=config path=/home/denys/.opencode/opencode.jsonc loading INFO 2026-01-21T22:38:57 +0ms service=config path=/home/denys/.opencode/opencode.json loading INFO 2026-01-21T22:38:57 +0ms service=bun cmd=["/home/denys/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.30","--exact"] cwd=/home/denys/.opencode running INFO 2026-01-21T22:38:57 +4ms service=plugin name=CodexAuthPlugin loading internal plugin INFO 2026-01-21T22:38:57 +0ms service=plugin name=CopilotAuthPlugin loading internal plugin INFO 2026-01-21T22:38:57 +0ms service=plugin path=file:///home/denys/.config/opencode/plugins/the-council.ts loading plugin INFO 2026-01-21T22:38:57 +41ms service=server status=started method=POST path=/log request INFO 2026-01-21T22:38:57 +0ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/plugin@1.1.30 [2.00ms] done stderr=Saved lockfile done INFO 2026-01-21T22:38:57 +0ms service=bun cmd=["/home/denys/.opencode/bin/opencode","install"] cwd=/home/denys/.opencode running INFO 2026-01-21T22:38:57 +4ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd) Checked 3 installs across 4 packages (no changes) [1.00ms] stderr= done ``` </details> ### Plugins _No response_ ### OpenCode version 1.1.30 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System openSUSE Tumbleweed ### Terminal Konsole and Alacritty
yindo added the opentuibug labels 2026-02-16 18:06:13 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 21, 2026):

This issue might be a duplicate of or related to existing issues. Please check:

  • #6080: OpenCode TUI Hangs on Fedora Linux (npm & bun & standalone) - Similar symptoms of TUI hanging/freezing on startup
  • #6119: [Bug] TUI fails to render with raw ANSI output and critical memory leak on startup - Related display/initialization issues
  • #8538: Session lookup fails with NotFoundError when PTY spawned from non-git directory context - Git-related initialization issues
  • #9059: High CPU Utilization Due To Repeated Git Process Invocations - Potential performance issue with .git folder processing

The symptoms of 'displays nothing' and inability to close the terminal cleanly are particularly similar to #6080 and #6119. Additionally, if there's an infinite loop or performance issue related to git processing, #9059 could be relevant.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 21, 2026): This issue might be a duplicate of or related to existing issues. Please check: - #6080: OpenCode TUI Hangs on Fedora Linux (npm & bun & standalone) - Similar symptoms of TUI hanging/freezing on startup - #6119: [Bug] TUI fails to render with raw ANSI output and critical memory leak on startup - Related display/initialization issues - #8538: Session lookup fails with NotFoundError when PTY spawned from non-git directory context - Git-related initialization issues - #9059: High CPU Utilization Due To Repeated Git Process Invocations - Potential performance issue with .git folder processing The symptoms of 'displays nothing' and inability to close the terminal cleanly are particularly similar to #6080 and #6119. Additionally, if there's an infinite loop or performance issue related to git processing, #9059 could be relevant. Feel free to ignore if none of these address your specific case.
Author
Owner

@DenysMb commented on GitHub (Jan 21, 2026):

If I try to launch opencode web or opencode serve from the project folder, it doesn't work. But, I can run these commands from other folders and after that load the problematic folder and it works fine through the UI.

@DenysMb commented on GitHub (Jan 21, 2026): If I try to launch `opencode web` or `opencode serve` from the project folder, it doesn't work. But, I can run these commands from other folders and after that load the problematic folder and it works fine through the UI.
Author
Owner

@ZacharyJia commented on GitHub (Jan 22, 2026):

same problem here, but for me, any folder with a .git doesn't work

@ZacharyJia commented on GitHub (Jan 22, 2026): same problem here, but for me, any folder with a `.git` doesn't work
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7115