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
[Bug] opencode session freezes after macOS lock screen while task remains “In Progress” #15431
When running a long task in opencode on macOS, if the system is locked for an extended period (e.g., about 1 hour), the session becomes unresponsive after unlocking. The task status still shows as “In Progress”, but the UI appears frozen and no further output is received.
The task does not complete, fail, or timeout visibly. The interface remains stuck indefinitely.
Expected Behavior
The task should either:
Continue running normally and stream results, or
Gracefully reconnect and resume output, or
Show a clear error if the connection was interrupted.
The session should not remain stuck in an indefinite “In Progress” state.
Actual Behavior
The session appears frozen after unlocking.
The task status still shows “In Progress”.
No new output is streamed.
The UI does not update.
There is no explicit error message.
Manual intervention (interrupt the task, or restarting the session) is required.
Plugins
plannotator
OpenCode version
1.2.15
Steps to reproduce
Start a long-running task in opencode (e.g., code generation, refactoring, test execution, or build-related task).
Lock the macOS screen.
Leave the device locked for approximately 1 hour.
Unlock the system and return to the opencode session.
Screenshot and/or share link
Operating System
macOS 15.5
Terminal
iterm2
Reacted by Pascal Küsgen, Jean-Francois Labbé, Nick DiZazzo, Jens Brulmans, caloric-defeat, Artur Webber, ha-ja and Yasin Weber
If your issue is distinct from those (e.g., the task status stays "In Progress" indefinitely rather than a UI rendering glitch), please note that distinction so maintainers can track it separately.
I experience this too, even using tools like amphetamine to stop sleep - I come back to a terminal and it's hung after locking the screen right where I left it during it's edits.
I have noticed, that if one manually locks the screen, this tends to happen. But when it locks itself after being idle or after a screensaver, it seems to be fine most of the time
@jbrulmans I've experienced the opposite behavior unfortunately
It's mostly related to sleep instead of screen lock
If I manually lock the screen, and have caffeinate -d -i -u running in some background, it runs fine. Everytime I forget to do that and it goes to sleep automatically, opencode will hang
The TUI animation will still work, but I need to interrupt execution, then send a continue, only then it restores to functioning. If I just send a continue before interrupting ongoing execution, that continue message will always be stuck on queued
Activity
github-actions commentedon Feb 28, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct from those (e.g., the task status stays "In Progress" indefinitely rather than a UI rendering glitch), please note that distinction so maintainers can track it separately.
ndizazzo commentedon Mar 21, 2026
I experience this too, even using tools like
amphetamineto stop sleep - I come back to a terminal and it's hung after locking the screen right where I left it during it's edits.jbrulmans commentedon Apr 7, 2026
I have noticed, that if one manually locks the screen, this tends to happen. But when it locks itself after being idle or after a screensaver, it seems to be fine most of the time
sankalpmukim commentedon May 24, 2026
@jbrulmans I've experienced the opposite behavior unfortunately
It's mostly related to sleep instead of screen lock
If I manually lock the screen, and have caffeinate -d -i -u running in some background, it runs fine. Everytime I forget to do that and it goes to sleep automatically, opencode will hang
The TUI animation will still work, but I need to interrupt execution, then send a
continue, only then it restores to functioning. If I just send acontinuebefore interrupting ongoing execution, that continue message will always be stuck on queuedTranthanh98 commentedon Jun 24, 2026
1. Open System settings -> search "Prevent automatic sleeping on power adapter when the display is off" -> turn on the option
2. run opencode in terminal by using
caffeinate -is opencodegithub-actions commentedon Aug 23, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.