Skip to content

No response to user input #3846

Closed
Closed

Description

@jgordijn

Description

I’m trying to use open code more frequently because I really appreciate the work you put into it!

However, I've encountered an issue during my sessions: sometimes the user interface appears to be stuck and becomes unresponsive. Sometimes it is stuck on a prompt and when I press "enter", nothing seems to happen. In some occasions I just need to wait 5-10 seconds and it continues, but other times it will not do anything and I need to kill the process. I will not even listen to <ESC>, <CTRL>-C. <CTRL>-Z. So it is really stuck.

I can see the progress indicator moving over the model, so I know it’s not completely frozen.

OpenCode version

1.0.15

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Mac

Terminal

Ghostty

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 3, 2025
  2. github-actions commented on Nov 3, 2025

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  3. jgordijn commented on Nov 3, 2025

    @jgordijn
    Author

    I got it to listen to <CTRL>-p, but I cannot really do much as it seems still unresponsive

  4. self-assigned this
    on Nov 4, 2025
  5. thdxr commented on Nov 4, 2025

    @thdxr
    Member

    can you produce a video?

  6. jgordijn commented on Nov 4, 2025

    @jgordijn
    Author

    Here is a screen recording. During this recording I pressed d and <ESC>, but it does not respond. You see that when I press <CTRL>-p, it does react to that.

    no_response.mov

    The second video is the same session. Theme switching get's the session stuck/really slow

    theme_switcher.mov
  7. jgordijn commented on Nov 4, 2025

    @jgordijn
    Author

    I noticed that I am able to create a new session. This new session is working, so it seems to be related to the specific session

  8. changed the title [-]No repsonse to user input[/-] [+]No response to user input[/+] on Nov 4, 2025
  9. marklise commented on Dec 5, 2025

    @marklise

    Similar Issue - Permission Loop Causing Input Unresponsiveness

    I encountered a very similar issue where the input box became completely unresponsive.

    Symptoms:

    • Input field won't accept any text input
    • Tab key works (can switch between plan/build modes)
    • Process appears running but UI is stuck
    • Eventually need to kill the process

    Environment:

    • OpenCode Version: 1.0.134
    • OS: Linux (NixOS)
    • Terminal: xterm-256color
    • Display: Wayland

    Technical Details:

    Process State:

    • Main process: PID 16760, state S (sleeping on do_epoll_wait)
    • 20 threads, 478MB RSS
    • Very high voluntary context switches (1,350,043) indicating excessive waiting
    • CPU time: 15 minutes accumulated
    • YAML language server subprocess also running

    Root Cause Found in Logs:

    Analyzing ~/.local/share/opencode/log/ revealed a permission retry loop:

    1. At 2025-12-05T22:47:28, user granted permission per_af060bdd2001LMBYDg2Bbsjuwk with response=once
    2. 90 seconds later at 2025-12-05T22:48:58, the same permission was requested again
    3. Permission was rejected, but kept being re-requested repeatedly
    4. Loop continued for over 5 minutes with requests at increasing intervals
    5. UI input became completely unresponsive during this loop

    Log excerpt showing the loop:

    INFO  2025-12-05T22:47:28 service=permission permissionID=per_af060bdd2001LMBYDg2Bbsjuwk response=once response
    ...
    INFO  2025-12-05T22:48:58 service=permission permissionID=per_af060bdd2001LMBYDg2Bbsjuwk response=reject response
    INFO  2025-12-05T22:48:59 service=permission permissionID=per_af060bdd2001LMBYDg2Bbsjuwk response=reject response
    INFO  2025-12-05T22:49:01 service=permission permissionID=per_af060bdd2001LMBYDg2Bbsjuwk response=reject response
    ... (continues repeatedly)
    

    Theory:

    It appears that when a permission is granted as "once", there's a bug where:

    1. The permission gets re-requested after some condition/timeout
    2. The UI tries to prompt for the same permission again
    3. It gets auto-rejected (since it was already answered)
    4. This creates a retry loop that blocks the input system
    5. The input field becomes unresponsive even though the process isn't fully hung

    This matches the symptoms reported here where the UI becomes unresponsive but some functions (like Ctrl-P in the original report, tab switching in my case) still work, suggesting the main event loop is running but the input handling is blocked waiting on permission resolution.

    Suggestion:

    The permission system should either:

    • Not re-request permissions that were already granted as "once" within the same session
    • Have a maximum retry limit and fail gracefully
    • Not block the input system while waiting for permission responses
  10. marklise commented on Dec 6, 2025

    @marklise

    Additional notes, I think it's very likely my previous comment outlines the issue as when I finally kill the process, restart opencode and bring the session back, it actually did work in behind the scenes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions