You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI crashes with 'undefined is not an object' when continuing session via -s flag #6887
TypeError: undefined is not an object (evaluating 'session().parentID')
Reproduction Steps
List sessions: opencode session (or via session_list API)
Pick a valid session ID
Run: opencode -s ses_4749abd4effe7hNsT4YSvK3ZgJ
TUI crashes immediately
Root Cause
The console shows the actual error before the crash:
[LOG] 'navigate' { type: 'session', sessionID: 'ses_4749abd4effe7hNsT4YSvK3ZgJ' }
[ERROR] Error: Unexpected end of JSON input
SyntaxError: Unexpected end of JSON input
at <parse> (:0)
at json (unknown)
at <anonymous> (../sdk/js/src/v2/gen/client/client.gen.ts:167:33)
The session.get API call returns an empty/malformed JSON response, causing JSON.parse to fail. The TUI then tries to render with session() === undefined, crashes on session().parentID access.
Expected Behavior
Should either:
Return valid JSON from the session.get API
Gracefully handle the error and show "Session not found" message
Environment
opencode version: 1.1.1
OS: macOS (darwin arm64)
Additional Context
The session DOES exist in the database (verified via session_info API which returns metadata correctly). The issue appears to be in the HTTP API layer or JSON serialization.
Activity
jeremyssocial commentedon Jan 5, 2026
Closing - this appears to be a local configuration/plugin issue, not a general bug. Apologies for the noise.