Skip to content

[Desktop] New sessions created from sidebar never respond — prompt_async fails: FileSystem.realPath ENOENT on missing worktree dir (global/silent-knight) #49561

Closed as not planned

Description

@wzgcavtc

Summary

OpenCode Desktop (Windows 11): clicking the "+ New session" button in the sidebar creates a new chat window, but sending a message produces no assistant reply and no visible error in the UI. The CLI works fine on the same project/provider.

Environment

  • OS: Windows 11 Home (Chinese), build 26200, x64
  • OpenCode Desktop: 1.18.31 (%LOCALAPPDATA%\Programs\@opencode-aidesktop\OpenCode.exe)
  • Provider/model: opencode/big-pickle
  • Node: v24.17.0

Steps to reproduce

  1. Launch OpenCode Desktop
  2. Click "+ New session" in the sidebar (new chat window opens)
  3. Type a message and press Enter
  4. The user message renders, but the assistant never replies (no output, no spinner, no error)
  5. Repeating/sending more messages behaves the same

Actual behavior

  • Every request fails with prompt_async failed; the broken sessions get silently archived afterwards.
  • A full quit + relaunch does not fix it.

Root cause (from %USERPROFILE%\.local\share\opencode\log\opencode.log)

Every affected session logs the same error:

timestamp=2026-09-17T13:46:20.243Z level=ERROR run=afdd6996 message="prompt_async failed" sessionID=ses_f5061bbc4ffe5iahY9b6Zr7kxy cause="Cause([Die(PlatformError: NotFound: FileSystem.realPath (C:\\Users\\Lenovo\\.local\\share\\opencode\\worktree\\global\\silent-knight) (cause: Error: ENOENT: no such file or directory, lstat 'C:\\Users\\Lenovo\\.local\\share\\opencode\\worktree\\global\\silent-knight'))])"
  • C:\Users\Lenovo\.local\share\opencode\worktree\global exists but is empty — the silent-knight worktree dir is missing.
  • Log shows 11 FileSystem.realPath errors and 8 prompt_async failed across 3 sessions.
  • The project is a non-git folder (uses global workspace scope).

Possible relation

May relate to existing issues about the desktop sidecar being stuck / new sessions not replying: #36061, #37255, #41964.

Full log available at %USERPROFILE%\.local\share\opencode\log\opencode.log if maintainers need the complete excerpt.

Activity

  1. wzgcavtc commented on Sep 17, 2026

    @wzgcavtc
    Author

    Attaching the full error excerpt from the app log (%USERPROFILE%\.local\share\opencode\log\opencode.log): https://gist.github.com/wzgcavtc/9ac2bb060fa79cbc85fa50d5a2b6749f

    • 11 \FileSystem.realPath\ errors
    • 8 \prompt_async failed\ across 3 sessions
    • \worktree\global\ exists but is empty (no \silent-knight\ dir)
  2. github-actions commented on Sep 17, 2026

    @github-actions
    Contributor

    This issue might be related to existing issues that share the same FileSystem.realPath ENOENT / prompt_async failed pattern. Please check:

  3. gasyoun commented on Oct 1, 2026

    @gasyoun

    Additional data point — macOS flavor of the same silent no-op cluster (OpenCode Desktop 1.18.32, macOS 15.6.1, darwin):

    Failing call (from ~/.local/share/opencode/log/opencode.log):

    timestamp=2026-10-01T21:26:56.778Z level=ERROR run=6cba4dd2 message="prompt_async failed" sessionID=ses_f06a351cdffefabEuEymtL1XFJ cause="Cause([Die(PlatformError: NotFound: FileSystem.realPath (/Users/mac/D) (cause: Error: ENOENT: no such file or directory, lstat '/Users/mac/D'))])"
    timestamp=2026-10-01T21:27:38.628Z level=ERROR run=6cba4dd2 message="prompt_async failed" sessionID=ses_f06a268f8ffen7PsEbWYWYvYz0 cause="Cause([Die(PlatformError: NotFound: FileSystem.realPath (/Users/mac/D) (cause: Error: ENOENT: no such file or directory, lstat '/Users/mac/D'))])"
    

    Same prompt_async failed → FileSystem.realPath ENOENT shape as the Windows report, but the missing path here was the session's project directory itself (/Users/mac/D), not a worktree slot — the UI silently no-oped every send, exactly as described (no spinner, no error, sessions archived).

    Recovery recipe that worked on this machine:

    1. Recreate the missing directory (mkdir -p /Users/mac/D).
    2. Fully quit and relaunch the app (the renderer kept poisoned pre-fix state until restart).

    After that, sends through the Desktop-spawned server (opencode serve --port 16131) are admitted again: POST /api/session/{id}/prompt → 200 SessionInputAdmitted, agent loop executes, zero new prompt_async failed entries. CLI control remained healthy throughout (opencode run -m zai-coding-plan/glm-5.3-flash → ok), matching the CLI-works-Desktop-noops symptom.

    UX asks this adds:

    • The Desktop should surface the realPath/prompt_async error in the chat UI instead of silently no-oping the send.
    • Sessions opened against home-directory roots also log failed to initialize fff: Can not run certain FFF features in a file system root or home directories on every boot.

    Separate config footgun seen while verifying (can masquerade as "Desktop is broken"): the project's default model opencode/fledge-alpha-free answers HTTP 403 FreeTierError: This model is not available in your country — sends then visibly error even though the send pipeline is healthy; explicit-model CLI calls work fine.

  4. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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