Skip to content

Desktop crashes repeatedly with NotFoundError after task completion (non-git directory, 1.2GB DB) #26122

Closed as not planned

Description

@yhl10000

Description

OpenCode Desktop crashes repeatedly with service=server error=NotFoundError failed after task completion. The CLI backend (opencode.exe) remains unaffected — only the Desktop (Electron) GUI crashes and auto-restarts.

Pattern: Task completes → Desktop crashes → restarts → crashes again within 3-6 seconds → eventually stabilizes after a few cycles.

Today alone the Desktop has restarted 8+ times following this pattern.

Environment

  • OpenCode Desktop: Latest (installed 2026-05-07, anomalyco/opencode via electron-updater)
  • CLI: opencode.exe from ~/.opencode/bin/
  • OS: Windows 11
  • Working directory: D:\yhl10000 (NOT a git repository)
  • Database size: opencode.db = 1.2 GB + WAL 6.3 MB
  • DB location: C:\Users\hoyu\.local\share\opencode\opencode.db
  • DB created: 2026-02-24 (3 months of accumulated session data)

Error Logs

Every crash log (~/.local/share/opencode/log/) ends identically:

ERROR 2026-05-07T04:19:15 +3105ms service=server error=NotFoundError failed
ERROR 2026-05-07T04:19:15 +9ms service=server error=NotFoundError failed
ERROR 2026-05-07T04:19:16 +353ms service=server error=NotFoundError failed
(log ends = process exits)

Additional errors seen on startup:

ERROR service=plugin.copilot error=The operation was aborted due to timeout failed to fetch copilot models
ERROR service=mcp clientName=azure_mcp error=MCP error -32601: Method 'prompts/list' is not available. failed to get prompts

Steps to Reproduce

  1. Run OpenCode Desktop in a non-git directory (no .git folder)
  2. Accumulate a large session database (1+ GB over weeks of usage)
  3. Execute a task that produces substantial output (e.g., file generation, multi-tool operations)
  4. Task completes → Desktop crashes
  5. Desktop auto-restarts but crashes again within seconds (NotFoundError on session restore)
  6. After 2-3 restart cycles, eventually stabilizes

Root Cause Analysis

Based on log analysis:

  • The NotFoundError occurs during Desktop's service=server request handling
  • It appears the Desktop tries to restore/reload the last session after restart
  • Since the working directory is NOT a git repo, projectID resolves to "global"
  • The session may have been stored under a different project scope, or the 1.2GB DB causes lookup failures
  • The error is unhandled — it crashes the app instead of gracefully recovering

Key Observations

Signal Data
DB size 1.2 GB (created 3 months ago, continuously growing)
WAL size 6.3 MB
Crash log size ~75 KB each (only startup + duplicate skill warnings + NotFoundError)
CLI backend Survives all crashes (PID stable from yesterday)
Desktop lifetime 3-30 seconds per cycle during crash loop
Working directory Non-git (D:\yhl10000)

Expected Behavior

  1. NotFoundError should be caught gracefully — clear stale session reference and recover to project view
  2. Desktop should not crash-loop when session restore fails
  3. Large databases (1GB+) should not cause session lookup failures

Related Issues

Plugins

{
  "plugin": [
    "opencode-antigravity-auth",
    "oh-my-openagent@3.17.14",
    "opencode-openai-codex-auth"
  ]
}

OpenCode version

Latest (2026-05-07 build)

Operating System

Windows 11

Terminal

OpenCode Desktop (Electron + WebView2)

Activity

  1. github-actions commented on May 7, 2026

    @github-actions
    Contributor

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

  2. github-actions commented on Jul 8, 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.

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