-
Notifications
You must be signed in to change notification settings - Fork 15k
Desktop app crashes in session UI with TypeError reading undefined.id after enabling opencode-pty #17945
Description
Description
While running work in parallel agents in OpenCode Desktop, one of the spawned agent branches encountered an image attachment/reference in the inherited task context and failed with:
ERROR: Cannot read "image.png" (this model does not support image input). Inform the user.
Immediately after that, the desktop app crashed in the session UI with the following frontend error:
TypeError: Cannot read properties of undefined (reading 'id')
at Object.fn (http://tauri.localhost/assets/session-Cz3nr7GB.js:16:91816)
at runComputation (http://tauri.localhost/assets/index-C02PVil6.js:1:6735)
at updateComputation (http://tauri.localhost/assets/index-C02PVil6.js:1:6483)
at runTop (http://tauri.localhost/assets/index-C02PVil6.js:1:7917)
at runQueue (http://tauri.localhost/assets/index-C02PVil6.js:1:8818)
at completeUpdates (http://tauri.localhost/assets/index-C02PVil6.js:1:8191)
at runUpdates (http://tauri.localhost/assets/index-C02PVil6.js:1:8108)
at batch (http://tauri.localhost/assets/index-C02PVil6.js:1:3650)
at flush (http://tauri.localhost/assets/index-BSjWd8pK.js:2322:44912)
This suggests the desktop frontend does not gracefully handle a parallel-agent task failure caused by unsupported image input, and some session-page derived state later becomes invalid/undefined during recomputation.
I reviewed the current dev source locally and this still looks like a frontend packages/app session-page state issue rather than a backend PTY/command execution failure. I have not source-mapped the exact bundle offset yet, so the items below are suspected source regions rather than a confirmed root cause:
packages/app/src/components/session/session-header.tsxpackages/app/src/pages/session/terminal-panel.tsxpackages/app/src/context/terminal.tsx
Most suspicious direct accesses found in review:
packages/app/src/components/session/session-header.tsx:333packages/app/src/components/session/session-header.tsx:368
Plugins
opencode-pty@latest
OpenCode version
1.2.27
Steps to reproduce
I do not have a minimal deterministic repro yet, but the crash happened in this sequence:
-
Run work that spawns parallel agents/tasks in OpenCode Desktop.
-
One spawned branch inherits or encounters an image input/reference (
image.png) from the active conversation/task context. -
That branch uses a model that does not support image input and reports:
ERROR: Cannot read "image.png" (this model does not support image input). Inform the user. -
After that branch fails, the desktop session UI crashes with the
Cannot read properties of undefined (reading 'id')frontend error above.
Additional context:
opencode-pty@latestwas enabled in the environment, but I do not have evidence that it is the root cause.- The more accurate trigger I observed is: parallel agent work + inherited image input + model without image support + subsequent desktop UI crash.
Screenshot and/or share link
No screenshot/share link available. I captured the error text directly.
Operating System
Windows 11 (NT 10.0.26100.0)
Terminal
OpenCode Desktop (Tauri)