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
macOS: Terminal becomes unusable after opencode exits ("dead terminal") #7861
When running opencode on macOS and exiting (Ctrl+C, closing terminal, or normal exit), the terminal is left in an unusable state with scrambled output, requiring users to manually reset it with reset command or reopen terminal.
Expected Behavior:
Terminal should be restored to a usable state when opencode exits.
Actual Behavior:
Terminal is left in a corrupted state with:
Scrambled text output
Unresponsive input
Cursor positioning issues
Requires manual reset command
Environment
OS: macOS (any version)
Terminal: Terminal.app, iTerm2, ...
opencode version: [current]
Additional Context
This appears to be related to terminal escape sequences and alternate screen buffer management not being properly cleaned up on exit.
These issues describe very similar terminal corruption/scrambling when exiting opencode. While those focus on Windows and specific Ctrl+C handling, they may share the same root cause related to terminal escape sequence cleanup on exit.
Feel free to ignore if your case is specifically different from these.
Activity
github-actions commentedon Jan 11, 2026
This issue might be a duplicate of existing issues. Please check:
These issues describe very similar terminal corruption/scrambling when exiting opencode. While those focus on Windows and specific Ctrl+C handling, they may share the same root cause related to terminal escape sequence cleanup on exit.
Feel free to ignore if your case is specifically different from these.
RandyMcMillan commentedon Jan 11, 2026
#7861 (comment)
https://github.com/anomalyco/opencode/pull/7860/files#r2680287550
kommander commentedon Jan 12, 2026
Is that happening when exiting with ctrl+c from the error boundary screen or just always? This only has been an issue on windows so far.
RandyMcMillan commentedon Jan 12, 2026
I will attempt to do a deeper investigation into open-tui. Maybe the appropriate fix needs to be there.
I am not setup to debug in Windows.
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
RandyMcMillan commentedon Mar 26, 2026
i will recheck - it may have been addressed...
thanks