Skip to content

Your session will resume automatically. #50215

Closed

Description

@Fgaoxing

Description

现在一直弹出Restarting service…
Your session will resume automatically.,只要打开然后做任何操作

Plugins

No response

OpenCode version

opencode v2.0.8

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

Linux Archlinux 7.2.6-arch2-1 #1 SMP PREEMPT_DYNAMIC Mon, 14 Sep 2026 22:41:30 +0000 x86_64 GNU/Linux

Terminal

KDE bash 5.3.15

Activity

  1. Fgaoxing commented on Sep 21, 2026

    @Fgaoxing
    Author
  2. piknockyou commented on Sep 30, 2026

    @piknockyou

    Had the same failure: the session title gets created, but no reply ever comes - only the server restarted while you were working notice, with event stream disconnected / stalled in the log.

    Root cause for me: a stray empty .git folder in my home folder. That hidden folder makes everything around it look like one big "git project" - so opencode treated my entire home folder as the project and scanned all of it for changes before each reply (541k files, ~26 seconds per scan, twice per message). That is longer than opencode's internal watchdog waits, so it assumes the service died, restarts it, and you get the loop.

    Quick check - run this in the folder where you start opencode:

    git rev-parse --show-toplevel

    • If it prints your home folder (or a big folder above the project you actually work in), that leftover .git is the problem. Delete that .git folder (accidents like this usually contain no commits, so nothing is lost - if unsure, just rename it to .git.bak). Then start opencode inside a normal project folder, and never run git init in your home folder. This removed the failure completely for me.
    • If it prints your real project folder, the folder is fine and the files inside are the problem. Run:
      git ls-files --others --exclude-standard | wc -l
      If that number is huge (100k+), opencode is choking on files that should have been skipped. List your big folders that don't belong to the project (node_modules/, target/, build/, caches, datasets) in a .gitignore file - one per line. As a last resort you can set "snapshot": false in your opencode config, which switches the scan off (but you also lose the undo feature).

    Deleting the stray ~/.git / %USERPROFILE%\.git was enough for me.

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

Metadata

Metadata

Assignees

No one assigned

    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