Skip to content

terminal stuck after passing non-existent session ID to opencode -s #23981

Closed

Description

@salman0ansari

Description

When starting OpenCode with the -s flag and passing an arbitrary/invalid string as the session name (instead of a valid session ID), the application crashes and the terminal becomes completely unresponsive ctrl+C and all other interrupt signals are ignored, forcing a hard terminal kill.

Expected Behavior

OpenCode should either:

  • Show a clear error message like Error: "test" is not a valid session ID and exit cleanly, OR
  • Treat it as a new session name and start normally

Actual Behavior

  • Application crashes on launch
  • Terminal becomes completely frozen/unresponsive
  • No signal (SIGINT, SIGTERM, etc.) is accepted
  • Only way to recover is closing the terminal window entirely

Environment

                     ./o.                   apex@skynet
                   ./sssso-                 -----------
                 `:osssssss+-               OS: EndeavourOS x86_64
               `:+sssssssssso/.             Host: B550M DS3H AC (-CF)
             `-/ossssssssssssso/.           Kernel: Linux 6.12.44-1-lts
           `-/+sssssssssssssssso+:`         Uptime: 3 hours, 40 mins
         `-:/+sssssssssssssssssso+/.        Packages: 1298 (pacman)
       `.://osssssssssssssssssssso++-       Shell: zsh 5.9
      .://+ssssssssssssssssssssssso++:      Display (G24F 2): 1920x1080 @ 0.91x in 23", 120 Hz [External]
    .:///ossssssssssssssssssssssssso++:     DE: Xfce4 4.20
  `:////ssssssssssssssssssssssssssso+++.    WM: Xfwm4 (X11)
`-////+ssssssssssssssssssssssssssso++++-    WM Theme: Arc-Dark
 `..-+oosssssssssssssssssssssssso+++++/`    Theme: Arc-Dark [GTK2/3/4]
   ./++++++++++++++++++++++++++++++/:.      Icons: Qogir-Dark [GTK2/3/4]
  `:::::::::::::::::::::::::------``        Font: Open Sans (11pt) [GTK2/3/4]
                                            Cursor: Qogir-dark
                                            Terminal: xfce4-terminal 1.1.5
                                            Terminal Font: JetBrains Mono (10pt)
                                            CPU: AMD Ryzen 5 5600X (12) @ 4.65 GHz
                                            GPU: NVIDIA GeForce RTX 3060 Ti GDDR6X [Discrete]
                                            Memory: 8.77 GiB / 15.52 GiB (57%)

Additional Context

  • This is reproducible with any non-existent/invalid session string passed to -s
  • The issue does NOT occur when passing a valid session ID

Plugins

No response

OpenCode version

1.14.19

Steps to reproduce

  1. Open a terminal
  2. Run: opencode -s test
  3. OpenCode crashes
  4. Terminal is now stuck — Ctrl+C, Ctrl+Z, Ctrl+\ all ignored

Screenshot and/or share link

No response

Operating System

EndeavourOS x86_64

Terminal

xfce4-terminal 1.1.5

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 23, 2026
  2. github-actions commented on Apr 23, 2026

    @github-actions
    Contributor

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

  3. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. Arjith8 commented on May 4, 2026

    @Arjith8

    Seems to be fixed, tested on Fedora linux

    Image
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