Skip to content

[BUG] TUI cannot send messages when launched in any git repository directory (v1.3.2) #19193

Closed as not planned

Description

@Ronin-wby

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

  1. cd into any git repository directory (existing or freshly git init'd)
  2. Run opencode
  3. Type a message and press Enter
  4. Result: Nothing happens. Message is not sent or processed.
    Workaround: Run opencode from 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

  1. service=file.watcher init and service=vcs branch=<branch> initialized appear only in git directories
  2. service=bus type=file.watcher.updated subscribing is the last log entry in broken sessions
  3. pstree confirms no MCP child processes are spawned (MCP init is part of the stalled pipeline)
  4. Session permissions remain at the initial deny state because tool.registry never runs to override them

Verified this is NOT caused by:

  • Config file issues (reproduced with empty {} opencode.json)
  • Specific git repos (reproduced in git init fresh 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 config shows correct configuration in both cases
  • opencode mcp list works correctly when run from git directories
  • Only the TUI message sending is affected; CLI subcommands work fine
  • The file.watcher and vcs services 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

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 26, 2026
  2. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

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

    If your issue is the same, please consider commenting there instead to consolidate the discussion.

  3. dillontkh commented on Apr 15, 2026

    @dillontkh

    encountering this in 1.4.3 as well
    totally unusable

  4. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  5. github-actions commented on Jul 5, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  6. artur-matkowski commented on Aug 14, 2026

    @artur-matkowski

    just hit it on 1.18.18

  7. arthurp commented on Aug 27, 2026

    @arthurp

    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.

    sysctl -w fs.inotify.max_user_instances=2048
    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

    build · google/gemini-3-pro-image-preview

    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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions