Repository navigation
[BUG] TUI cannot send messages when launched in any git repository directory (v1.3.2) #19193
Description
Description
When opencode v1.3.2 TUI is launched inside any git repository directory, messages cannot be sent. The input field accepts text, but pressing Enter/Submit does nothing ? the message never gets processed. The same opencode instance works perfectly when launched from a non-git directory (e.g., ~/).
Plugins
No response
OpenCode version
1.3.2 (latest, confirmed via opencode upgrade)
Steps to reproduce
cdinto any git repository directory (existing or freshlygit init'd)- Run
opencode - Type a message and press Enter
- Result: Nothing happens. Message is not sent or processed.
Workaround: Runopencodefrom a non-git directory (e.g.,~). It works correctly there.
Expected Behavior
Messages should be sent and processed regardless of whether the working directory is a git repository.
Environment
- opencode version: 1.3.2 (latest, confirmed via
opencode upgrade) - OS: Red Hat Enterprise Linux 9.2 (Plow)
- Kernel: Linux 5.14.0-284.25.1.el9_2.x86_64
- Architecture: x86_64
- Git version: 2.39.2.3
- Desktop: KDE (affects XDG config paths)
- Installation method: curl install script
Diagnostic Details
Log comparison: Non-git directory (works) vs Git directory (broken)
Working case (~/, non-git, projectID=global) ? log excerpt:
service=default directory=/home/user creating instance
service=project directory=/home/user fromDirectory
...
service=provider init
service=provider providerID=github-copilot found
service=provider providerID=opencode found
After sending a message, the full pipeline runs: skill init ? provider init ? tool.registry ? session.processor.
Broken case (~/ronin_mcp_tools/, git repo) ? log excerpt:
service=default directory=/home/user/ronin_mcp_tools creating instance
service=project directory=/home/user/ronin_mcp_tools fromDirectory
...
service=provider init
service=vcs branch=ronin_mcp_tools initialized
service=bus type=file.watcher.updated subscribing
The log ends here. After sending a message (POST completes with status 200), the processing pipeline (skill init ? provider init ? tool.registry ? session.processor) never starts.
Key differences in git directories
service=file.watcher initandservice=vcs branch=<branch> initializedappear only in git directoriesservice=bus type=file.watcher.updated subscribingis the last log entry in broken sessionspstreeconfirms no MCP child processes are spawned (MCP init is part of the stalled pipeline)- Session permissions remain at the initial
denystate becausetool.registrynever runs to override them
Verified this is NOT caused by:
- Config file issues (reproduced with empty
{}opencode.json) - Specific git repos (reproduced in
git initfresh directories) - MCP server configuration (reproduced with no MCP config at all)
- Network issues (non-git directory works perfectly on the same machine)
Additional Context
opencode debug configshows correct configuration in both casesopencode mcp listworks correctly when run from git directories- Only the TUI message sending is affected; CLI subcommands work fine
- The
file.watcherandvcsservices that initialize in git directories may be related to the pipeline stall
Screenshot and/or share link
No response
Operating System
Red Hat Enterprise Linux 9.2 (Plow)
Terminal
No response
Activity
github-actions commentedon Mar 26, 2026
This issue might be a duplicate of existing issues. Please check:
service=vcs branch=... initializedandservice=bus type=file.watcher.updated subscribing, works from non-git dir)If your issue is the same, please consider commenting there instead to consolidate the discussion.
dillontkh commentedon Apr 15, 2026
encountering this in 1.4.3 as well
totally unusable
github-actions commentedon Jul 5, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
artur-matkowski commentedon Aug 14, 2026
just hit it on 1.18.18
arthurp commentedon Aug 27, 2026
I think I have hit this as well. #23219 is also getting new activity.
The following is a workaround, but I suspect it would fail for large git directories.
Log (expand to see)
$ opencode --print-logs run "hello"
timestamp=2026-08-27T04:44:44.135Z level=INFO run=641a41df message="creating instance" directory=/host/parallel-tree-navigator
timestamp=2026-08-27T04:44:44.136Z level=INFO run=641a41df message=fromDirectory directory=/host/parallel-tree-navigator
timestamp=2026-08-27T04:44:44.180Z level=INFO run=641a41df message=bootstrapping directory=/host/parallel-tree-navigator
timestamp=2026-08-27T04:44:44.185Z level=INFO run=641a41df message=loading path=/home/amp/.config/opencode/config.json
timestamp=2026-08-27T04:44:44.186Z level=INFO run=641a41df message=loading path=/home/amp/.config/opencode/opencode.json
timestamp=2026-08-27T04:44:44.190Z level=INFO run=641a41df message=loading path=/home/amp/.config/opencode/opencode.jsonc
timestamp=2026-08-27T04:44:44.251Z level=INFO run=641a41df message="enabled LSP servers" serverIds="zls, yaml-ls, vue, typescript, tinymist, texlab, terraform, svelte, sourcekit-lsp, rust, ruby-lsp, razor, pyright, prisma, php intelephense, oxlint, ocaml-lsp, nixd, lua-ls, kotlin-ls, julials, jdtls, haskell-language-server, gopls, gleam, fsharp, elixir-ls, eslint, dockerfile, deno, dart, clojure-lsp, clangd, csharp, biome, bash, astro"
timestamp=2026-08-27T04:44:44.252Z level=INFO run=641a41df message="all formatters are disabled"
timestamp=2026-08-27T04:44:44.252Z level=INFO run=641a41df message=init
timestamp=2026-08-27T04:44:44.356Z level=INFO run=641a41df message=created id=ses_fbe77203bffef6nk2V0VIMT02Y slug=brave-river version=1.18.23 projectID=ed0f7b673e340c5f944f7c0357eb6359984d6a31 directory=/host/parallel-tree-navigator path="" workspaceID=undefined parentID=undefined title="New session - 2026-08-27T04:44:44.356Z" agent=undefined model=undefined metadata=undefined permission="[{"permission":"question","pattern":"","action":"deny"},{"permission":"plan_enter","pattern":"","action":"deny"},{"permission":"plan_exit","pattern":"*","action":"deny"}]" cost=0 tokens.input=0 tokens.output=0 tokens.reasoning=0 tokens.cache.read=0 tokens.cache.write=0 time.created=1787805884356 time.updated=1787805884356
timestamp=2026-08-27T04:44:44.368Z level=INFO run=641a41df message="event connected"
timestamp=2026-08-27T04:44:44.713Z level=INFO run=641a41df message=loop session.id=ses_fbe77203bffef6nk2V0VIMT02Y step=0
timestamp=2026-08-27T04:44:44.740Z level=INFO run=641a41df message=stream providerID=openrouter modelID=google/gemini-3.7-flash session.id=ses_fbe77203bffef6nk2V0VIMT02Y small=true agent=title mode=primary
timestamp=2026-08-27T04:44:44.763Z level=INFO run=641a41df message="llm runtime selected" llm.runtime=ai-sdk llm.provider=openrouter llm.model=google/gemini-3.7-flash
timestamp=2026-08-27T04:44:44.774Z level=ERROR run=641a41df message="stream error" providerID=openrouter modelID=google/gemini-3.7-flash session.id=ses_fbe77203bffef6nk2V0VIMT02Y small=true agent=title mode=primary error.error="AI_LoadAPIKeyError: OpenRouter API key is missing. Pass it using the 'apiKey' parameter or the OPENROUTER_API_KEY environment variable."
timestamp=2026-08-27T04:44:44.817Z level=INFO run=641a41df message=initialized
timestamp=2026-08-27T04:44:44.840Z level=INFO run=641a41df message=tracking hash=3c984aebe8fbe1a5b3ec0b801da69335ac1a65f4 cwd=/host/parallel-tree-navigator git=/home/amp/.local/share/opencode/snapshot/ed0f7b673e340c5f944f7c0357eb6359984d6a31/0f664cc9e9e91bd216063967d8beccf30a6bce21
timestamp=2026-08-27T04:44:44.846Z level=INFO run=641a41df message="shell tool using shell" shell=/usr/bin/bash
timestamp=2026-08-27T04:44:44.853Z level=INFO run=641a41df message=init count=1
timestamp=2026-08-27T04:44:44.935Z level=INFO run=641a41df message="watcher backend" directory=/host/parallel-tree-navigator platform=linux backend=inotify
timestamp=2026-08-27T04:44:44.941Z level=INFO run=641a41df message="project copy refresh started" projectID=ed0f7b673e340c5f944f7c0357eb6359984d6a31
(PS: #41096 removes a special case for
.git. I don't understand the code, so maybe this is nothing, but I thought I would mention.)