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 freezes for ~10 seconds periodically on WSL2 (regression in v1.0.129) #5361
OpenCode TUI freezes for 2-10 seconds periodically while typing or scrolling on WSL2. Input is buffered during the freeze and appears after it resolves. The issue does not occur on native Windows.
This issue might be a duplicate of existing issues. Please check:
Mac unresponsive, significant lag #5130: Mac unresponsive, significant lag - Shows similar TUI freezing/responsiveness problems in opentui, with input and progress bar freezing
I am on windows 11, I was so scared to open a issue but I have been trying to find solution, tried deleted and all the installation method but the issue still exist
In my case is worse... I just learned that I can disable auto update because the latest version is not usable... if the is something that you need specific to be able to debug the issue, I can assist.
Experienced the same issue so I did a little digging -- the systemd clue was a good one @alhnesn. I think it's specifically systemd-journald rotating logs and causing a freeze when systemd-timesyncd is doing clock adjustments. Something is going on with the WSL time sync, I can see in my local logs there's lots of instances of systemd-journald[50]: Time jumped backwards, rotating. that seem to align with the cadence of freezes in the opencode tui. Pretty much exactly this issue: microsoft/WSL#11790
By running sudo systemctl stop systemd-timesyncd and then watching the systemd-journald logs, the journald rotations stopped... and so did the freezes in OpenCode.
I have no idea where this actually puts us in terms of a solution though outside of temporarily disabling timesyncd.
The time syncing was broken on my WSL on windows 11 too. I disabled the service and told wsl to use windows to sync.
You can configure it to poll much less frequently rather than disabling it entirely (WSL2 time drift is a real problem if you leave it off too long):
Edit the config:
sudo mkdir -p /etc/systemd/timesyncd.conf.d
sudo vim /etc/systemd/timesyncd.conf.d/poll-interval.conf
This sets the minimum poll to 1 hour and max to 24 hours (defaults are 32 seconds min, 34 minutes max).
Then restart the service:
sudo systemctl restart systemd-timesyncd
Alternative approach — use Windows time instead:
Since WSL2 can sync from Windows, you can disable the service entirely and rely on Windows time sync. Add to /etc/wsl.conf:
[interop]enabled = true
[boot]systemd = true
Then just leave systemd-timesyncd disabled sudo systemctl disable systemd-timesyncd . Windows will keep the clock reasonable.
Check current status:
bashtimedatectl status
timedatectl timesync-status
Reacted by piljoong-jeong
Reacted by HabeasPorpoise, Alexandre Dubois and Yanni E.
I've asked claude opus for some tips, I've had the same issues with claude code so in my case it's not specific to OpenCode. I've disabled resource saver to see if that helps, but I'm going to continue tomorrow and see if that helped.
Most Likely Causes & Fixes
Docker Desktop (if installed)
This is a very common cause. Docker's Resource Saver mode conflicts with WSL 2.5.1+ (cgroupv2).
Or close Docker Desktop entirely to test if it's the cause.
Restart LxssManager Service
From Windows (Run as Admin PowerShell):
Restart-Service LxssManager
Or: Open services.msc → Find "LxssManager" → Restart it. Also set it to Automatic startup.
Experienced the same issue so I did a little digging -- the systemd clue was a good one @alhnesn. I think it's specifically systemd-journald rotating logs and causing a freeze when systemd-timesyncd is doing clock adjustments. Something is going on with the WSL time sync, I can see in my local logs there's lots of instances of systemd-journald[50]: Time jumped backwards, rotating. that seem to align with the cadence of freezes in the opencode tui. Pretty much exactly this issue: microsoft/WSL#11790
By running sudo systemctl stop systemd-timesyncd and then watching the systemd-journald logs, the journald rotations stopped... and so did the freezes in OpenCode.
I have no idea where this actually puts us in terms of a solution though outside of temporarily disabling timesyncd.
The time syncing was broken on my WSL on windows 11 too. I disabled the service and told wsl to use windows to sync.
You can configure it to poll much less frequently rather than disabling it entirely (WSL2 time drift is a real problem if you leave it off too long): Edit the config:
sudo mkdir -p /etc/systemd/timesyncd.conf.d
sudo vim /etc/systemd/timesyncd.conf.d/poll-interval.conf
Add:
[Time]
PollIntervalMinSec=3600
PollIntervalMaxSec=86400
This sets the minimum poll to 1 hour and max to 24 hours (defaults are 32 seconds min, 34 minutes max). Then restart the service:
sudo systemctl restart systemd-timesyncd
Alternative approach — use Windows time instead: Since WSL2 can sync from Windows, you can disable the service entirely and rely on Windows time sync. Add to /etc/wsl.conf:
[interop]
enabled = true
[boot]
systemd = true
Then just leave systemd-timesyncd disabled sudo systemctl disable systemd-timesyncd . Windows will keep the clock reasonable. Check current status: bashtimedatectl status timedatectl timesync-status
Completely cured the annoying freezing in Windows 10 22H2 WSL2 Ubuntu 22/24 Opencode v1.1.15 for me. At first I thought it was some agents that I had loused up with the opencode.json but quickly realized it was more than that. How were the dots connected between systemd-timesyncd and this weird issue is what I am dying to know, that is next level troubleshooting I realize :)
systemd-timesyncd MUST be disabled under WSL, this is a fault in the distribution to have it enabled by default (standard Linux behaviour). timesyncd is battling constantly vs HyperV timesync (which is the correct and intended mechanic)
Reason:
when using WSL, HyperV does the timesync with the host
when timesyncd is active, it will sync the time different than the Windows host does, result: time is slightly ahead
this causes HyperV to hard reset the time back a few seconds into the past
result: timestamps are corrupted for a short time
JS apps like opencode will freeze due to timeout handling
example:
App is waiting for next frame, e.g. "now +100ms"
HyperV resets the time backwards -> suddenly the "now" is a e.g. lets say 3 seconds in the past
a 100ms wait turns into 3100ms -> app freezes
Reacted by Clint Baxley, Alihan Esen, Lauri Laidna, Sorra, Steven T. Cramer, BBussWWM, leastwanted and Joey
Disabling systemd in WSL2 is a workaround that fixes the freezing.
Workaround
Edit /etc/wsl.conf:
[boot]
systemd=false
Then restart WSL from PowerShell:
wsl --shutdown
Evidence
Scenario Result
Main Ubuntu with systemd enabled Freezes on v1.0.129+
Another WSL2 distro with systemd disabled No freezing
Main Ubuntu with systemd disabled No freezing
Also worth noting: when both distros are open simultaneously, the systemd-enabled distro causes the other distro to freeze as well.
I'm having a similar problem, but it only occurs when I open a project folder where I've previously used OpenCode (running opencode with no response from the terminal). In all other scenarios, OpenCode runs fine. I'm not sure what the issue is; I've tried various fixes for similar problems, but my situation seems to be different. Would anyone have any insights to why this happens?
WSL version: 2.6.1.0
Kernel version: 6.6.87.2-1
WSLg version: 1.0.66
Windows version: 10.0.26100.7840
Open code 1.1.60
Opened upstream tracking issue in OpenTUI for the WSL frame-stall root cause: anomalyco/opentui#775. The proposed fix is to use monotonic timing (performance.now) and immediate-based deadline scheduling in renderer frame timing.
I’m also seeing this when running OpenCode inside WSL on Windows.
The main symptom on my side is that the input box becomes unresponsive or noticeably delayed while typing. Sometimes keystrokes do not appear immediately and then show up after a pause, which makes the interface feel unreliable for normal use.
From the user side, this feels less like a model/network problem and more like the TUI/input layer is intermittently freezing or buffering input in WSL.
If helpful, I can also provide more environment details (OpenCode version, WSL distro/version, terminal app, and whether it reproduces consistently).
I originally thought that this bug only impacted the OpenTUI interface.
But from my testing OpenCode web is also impacted.
Response times for simple prompts that would typically take seconds, often take minutes.
I haven't fully confirmed this, but it seemed like it was wasting tokens with more requests.
It could be dangerous, even if you were on the cusp, as you would likely not even notice you are spending x% more unneeded tokens.
The fix provided above fixed OpenCode web for me. #5361 (comment)
It is also worth noting that if anomalyco/opentui#775 made it into release, it did not fix the issue.
The last version I tested on was v1.3.8.
Activity
github-actions commentedon Dec 11, 2025
This issue might be a duplicate of existing issues. Please check:
opencode runand TUI exits hang on v0.15+ #3213: Bug:opencode runand TUI exits hang on v0.15+ - Earlier WSL2-specific hang/freeze regression with similar symptomsoption+ left arrow key on MacBook with high CPU usage #2688: Opencode freezes when pressingoption+ left arrow key on MacBook - Keyboard input triggering TUI freezes with similar symptom patternsFeel free to ignore if none of these address your specific case.
rekram1-node commentedon Dec 11, 2025
@kommander maybe related to ur changes?
kommander commentedon Dec 11, 2025
I'll check
kommander commentedon Dec 12, 2025
@alhnesn are you on windows 10 by any chance? I can't reproduce reliably on win11.
simanga-dev commentedon Dec 12, 2025
I am on windows 11, I was so scared to open a issue but I have been trying to find solution, tried deleted and all the installation method but the issue still exist
simanga-dev commentedon Dec 12, 2025
kommander commentedon Dec 12, 2025
No need to be scared. I heard of similar issues on win10 that's why I ask. I am trying to debug, but can't really reproduce it on my system.
simanga-dev commentedon Dec 12, 2025
In my case is worse... I just learned that I can disable auto update because the latest version is not usable... if the is something that you need specific to be able to debug the issue, I can assist.
kommander commentedon Dec 12, 2025
1.0.127 works well? I am trying to dig through the commits but didn't find anything yet that could affect it really.
CountElqyd commentedon Dec 12, 2025
I tested v1.0.127 on wsl2 ubuntu.. seems too work well too. Freezing issues for on wsl2 started on v1.0.129 and above.
simanga-dev commentedon Dec 12, 2025
Similar behaviour > I tested v1.0.127 on wsl2 ubuntu.. seems too work well too. Freezing issues for on wsl2 started on v1.0.129 and above.
alhnesn commentedon Dec 12, 2025
I am on Windows 11:
Also v1.0.127 works well and I am currently using v1.0.128 without any problems.
8 remaining items
cbaxley commentedon Jan 4, 2026
The time syncing was broken on my WSL on windows 11 too. I disabled the service and told wsl to use windows to sync.
You can configure it to poll much less frequently rather than disabling it entirely (WSL2 time drift is a real problem if you leave it off too long):
Edit the config:
Add:
This sets the minimum poll to 1 hour and max to 24 hours (defaults are 32 seconds min, 34 minutes max).
Then restart the service:
Alternative approach — use Windows time instead:
Since WSL2 can sync from Windows, you can disable the service entirely and rely on Windows time sync. Add to /etc/wsl.conf:
Then just leave systemd-timesyncd disabled
sudo systemctl disable systemd-timesyncd. Windows will keep the clock reasonable.Check current status:
bashtimedatectl status
timedatectl timesync-status
imqqmi commentedon Jan 9, 2026
I've asked claude opus for some tips, I've had the same issues with claude code so in my case it's not specific to OpenCode. I've disabled resource saver to see if that helps, but I'm going to continue tomorrow and see if that helped.
Most Likely Causes & Fixes
This is a very common cause. Docker's Resource Saver mode conflicts with WSL 2.5.1+ (cgroupv2).
Fix: Disable Resource Saver in Docker Desktop:
Or close Docker Desktop entirely to test if it's the cause.
From Windows (Run as Admin PowerShell):
Restart-Service LxssManager
Or: Open services.msc → Find "LxssManager" → Restart it. Also set it to Automatic startup.
From PowerShell
taskkill /f /im wslservice.exe
wsl --shutdown
wsl
Create %UserProfile%.wslconfig with:
[wsl2]
memory=8GB
swap=4GB
localhostForwarding=true
When it happens: Press Ctrl+C, then Ctrl+/- (zoom in/out) - this sometimes unsticks it.
Do you have Docker Desktop installed? That's the most common culprit for this exact symptom pattern.
Sources:
HabeasPorpoise commentedon Jan 14, 2026
Completely cured the annoying freezing in Windows 10 22H2 WSL2 Ubuntu 22/24 Opencode v1.1.15 for me. At first I thought it was some agents that I had loused up with the opencode.json but quickly realized it was more than that. How were the dots connected between systemd-timesyncd and this weird issue is what I am dying to know, that is next level troubleshooting I realize :)
StevenTCramer commentedon Jan 14, 2026
did the trick for me. Opus assures me that this is ok to leave disabled.
pschiel commentedon Jan 22, 2026
systemd-timesyncd MUST be disabled under WSL, this is a fault in the distribution to have it enabled by default (standard Linux behaviour). timesyncd is battling constantly vs HyperV timesync (which is the correct and intended mechanic)
Reason:
example:
ieiradouglas commentedon Jan 28, 2026
As our friend said, running the command
sudo systemctl stop systemd-timesyncdresolved the Opencode crashing problem.tontide1 commentedon Jan 29, 2026
thank you sir ! you helped me a lot
BruceManuelwayne commentedon Feb 12, 2026
I'm having a similar problem, but it only occurs when I open a project folder where I've previously used OpenCode (running opencode with no response from the terminal). In all other scenarios, OpenCode runs fine. I'm not sure what the issue is; I've tried various fixes for similar problems, but my situation seems to be different. Would anyone have any insights to why this happens?
WSL version: 2.6.1.0
Kernel version: 6.6.87.2-1
WSLg version: 1.0.66
Windows version: 10.0.26100.7840
Open code 1.1.60
turazashvili commentedon Mar 4, 2026
Opened upstream tracking issue in OpenTUI for the WSL frame-stall root cause: anomalyco/opentui#775. The proposed fix is to use monotonic timing (performance.now) and immediate-based deadline scheduling in renderer frame timing.
yongkang-yang commentedon Mar 14, 2026
I’m also seeing this when running OpenCode inside WSL on Windows.
The main symptom on my side is that the input box becomes unresponsive or noticeably delayed while typing. Sometimes keystrokes do not appear immediately and then show up after a pause, which makes the interface feel unreliable for normal use.
From the user side, this feels less like a model/network problem and more like the TUI/input layer is intermittently freezing or buffering input in WSL.
If helpful, I can also provide more environment details (OpenCode version, WSL distro/version, terminal app, and whether it reproduces consistently).
Warfront1 commentedon Apr 2, 2026
I originally thought that this bug only impacted the OpenTUI interface.
But from my testing OpenCode web is also impacted.
Response times for simple prompts that would typically take seconds, often take minutes.
I haven't fully confirmed this, but it seemed like it was wasting tokens with more requests.
It could be dangerous, even if you were on the cusp, as you would likely not even notice you are spending x% more unneeded tokens.
The fix provided above fixed OpenCode web for me.
#5361 (comment)
It is also worth noting that if anomalyco/opentui#775 made it into release, it did not fix the issue.
The last version I tested on was v1.3.8.
github-actions commentedon Jul 3, 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.