[OpenCode 2] "Internal service failure" crashes mid-work; failed turn never settles and chat stays locked on "active ACP prompt"

Author: Toxx-devCreated Sep 30, 2026Updated Sep 30, 2026
Labelsbug

Summary

On Windows with Copilot 4.0.12 (bundled OpenCode 2.0.3), three agent chat sessions crashed with "Internal error: Internal service failure" within ~40 minutes of the update. After each crash the failed turn kept executing in the background for several minutes, then the chat stayed permanently locked - every new message returns "Internal error: Session already has an active ACP prompt: ". The #3359 recovery did not engage in any of the three cases (the failed turn never settles), and none of the affected chats recovered.

Environment

  • Copilot version: 4.0.12 (installed 2026-09-30 04:41 local; release "OpenCode 2 in your vault")
  • OpenCode engine: bundled 2.0.3 (plugin-managed at C:\Users\nikol.obsidian-copilot\opencode\2.0.3\bin\opencode.exe; previous engine 1.18.31 ran clean for hours the same night)
  • Active backend: opencode (Agent Mode; agent "copilot-build"; model deepseek/deepseek-flash per engine log)
  • OS: Windows 10.0.26200 (win32 x64)
  • Obsidian: 1.13.7
  • Shell: PowerShell 5.1 (agent tool shell); COMSPEC cmd.exe
  • Install/channel: opencode "channel=latest" (per its startup log)
  • Copilot Plus: not active (BYOK; isPlusUser false)
  • Active plugins: none found in opencode config locations; runtime diagnostics snapshot lists "-opencode.variant"

Reproduction

Observed 3x tonight; not yet reduced to a deterministic repro:

  1. Working vault (Obsidian open, ~30 notes), agent chat doing tool-heavy work (file reads, directory listings, shell commands, a web fetch).
  2. Crash A - 04:41 local: the first session after the update (opened 12 seconds after the update files landed) died during its opening checks (querying a Windows scheduled task + backup state files). Session: ses_f0e868126ffeBZChSFMrzkWs7l
  3. Crash B - ~05:10-05:16 local, ~20 min into a second session of continuous multi-step tool work: failure displayed while the turn kept running (shell outputs written 05:13/05:14/05:15; files written 05:15:57 and 05:16:13 - all after the error), then every prompt returned the ACP-prompt lock. Session: ses_f0e7c5ccdffe84eM2f6amcRZbd
  4. Crash C - 05:19 local: died within seconds of the session's first action (a vault-wide file search). Session: ses_f0e64a9efffeRalz8AKc0fZ0qI
  5. Base rate: the same vault ran a ~3-hour continuous session earlier that night on engine 1.18.31 with zero crashes; the crashes began with the first session after 2.0.3 activated.

Expected Behavior

Sessions do not crash during tool work. If the OpenCode private server dies, per #3359 the backend restarts after the failed turn settles and the next message reaches the replacement backend. Instead the turn hangs and the chat locks.

Actual Behavior

  • "Internal error: Internal service failure" - displayed mid-work; the failed turn continues executing in the background afterward (it wrote files for minutes).
  • "Internal error: Session already has an active ACP prompt: ses_..." - from then on every message in that chat fails with this; the chat never unlocks.

Additional Context

  • The failed turn never "settles" (it keeps running), so the #3359 restart condition can't trigger and the ACP prompt lock persists. This may be the core gap.
  • Engine log at %USERPROFILE%.local\share\opencode\log\opencode.log goes silent at 04:41:05 ("cli starting version=2.0.3"); subsequent engine activity is not logged there (DB writes only). Happy to capture a better log path if one exists for 2.0.3.
  • Existing issue search: only related items are #3359 (recovery, merged) and older reports #2898 / #2893 (different triggers).
  • Impact: this is a daily-driver setup; crashes interrupt work and leave chats permanently stuck. Conversation exports, shell logs, and a full timeline are available on request; happy to test a build with guidance.

Source: logancyang/obsidian-copilot