-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows
Description
Description
The terminal output becomes garbled in two different situations:
- After Opencode has been running for a period of time, even without any interruption
- When pressing Ctrl+C to interrupt the process
In both cases, the terminal starts printing raw ANSI escape sequences, and the screen becomes unreadable.
Steps to reproduce
Case 1: After running for a while
- Run Opencode in a Windows terminal
- Let it run for some time during normal operation
- Observe that the terminal output gradually becomes garbled
Case 2: After pressing Ctrl+C
- Run Opencode in a Windows terminal
- Press Ctrl+C while it is running
- Observe that the terminal output immediately becomes garbled
Expected behavior
The terminal output should remain readable during long-running sessions,
and the terminal state should be properly restored after Ctrl+C.
Actual behavior
The terminal enters a corrupted state and continues printing raw ANSI escape codes.
Environment
- OS: Windows
- Terminal: Windows Terminal (or cmd / PowerShell)
- Opencode version: (please fill in)
- Model / Agent: GPT-5.3 Codex / Sisyphus
Additional notes
This appears to be related to terminal state management.
The terminal may be left in raw mode or not properly reset,
both during long-running execution and after handling SIGINT.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows