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 blank screen in non-pure mode with external plugin; setRawMode failed with errno: 9 (macOS) #26217
opencode fails to render the TUI in non-pure mode when an external plugin is configured (oh-my-openagent / oh-my-opencode). The same machine/session works with opencode --pure.
Environment
OS: macOS (darwin 25.4.0)
Shell: zsh
Terminal: Ghostty (also reproduced in Cursor terminal)
Tested with/without plugin identifier rename compatibility (oh-my-openagent vs oh-my-opencode)
Added TUI/system theme setting
Cleared/repopulated plugin cache paths and reinstalled plugin packages
Verified OpenCode itself is functional via:
opencode --pure
opencode web
Why this seems like OpenCode TUI non-pure path
Under same machine and terminal, pure mode works but non-pure hits setRawMode ... errno: 9 after startup. That strongly suggests TTY/raw-mode handling breaks in external-plugin path (or plugin-host handoff), not a generic terminal incompatibility.
Request
Please advise if there is:
A known fix/workaround for setRawMode failed with errno: 9 in non-pure mode on macOS
Any debug flags to trace TTY fd state around raw mode setup
A recommended plugin-loading compatibility mode for this case
The issue body is completely empty — no template was used and no content was provided. Please use one of the required issue templates (Bug Report, Feature Request, or Question) and fill in all required fields, including a description of the problem, steps to reproduce, and your environment/system information.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
Adding full reproduction details here since the issue body is not persisting via CLI/API update on this repo.
Detailed Repro + Diagnostics
Environment
macOS darwin 25.4.0
zsh
Ghostty terminal (also reproduced in Cursor terminal)
OpenCode 1.14.30
Plugin Config
Tested both plugin identifiers in ~/.config/opencode/opencode.json:
oh-my-openagent
oh-my-opencode
Behavior
opencode => blank/unusable TUI in non-pure mode
opencode --pure => works
opencode web => works
Key Error
From ~/.local/share/opencode/log/2026-05-07T164750.log:
ERROR ... setRawMode failed with errno: 9 exception
ERROR ... error=setRawMode failed with errno: 9 process error
Attempted Fixes
Forced terminal type TERM=xterm-256color
Added system theme in OpenCode TUI config
Tested both plugin identifiers (rename compatibility)
Preinstalled plugin cache entries manually
Reproduced consistently: only non-pure path fails
Why this looks non-pure TUI/TTY specific
Same machine and terminal session:
pure mode stable
non-pure mode fails at raw-mode setup (errno 9)
Could you share recommended debug flags or a workaround for TTY/raw-mode initialization when external plugin loading is enabled?
Thanks for updating the issue! It now includes all the required information — environment details, clear reproduction steps, actual vs expected behavior, and relevant logs. Much appreciated!
Local reproduction evidence (v1.15.13, macOS Darwin)
Can confirm this bug with detailed local logs. Running OpenCode v1.15.13 on macOS (Darwin 25.4.0, zsh). Every crash session shows the same pattern: oh-my-openagent TUI plugin loads without a TUI entrypoint, then setRawMode fails within minutes.
Crash pattern in non-pure mode
Four crash events captured in ~/.local/share/opencode/log/, all following the identical sequence:
INFO service=tui.plugin path=oh-my-openagent retry=false loading tui plugin
WARN service=tui.plugin path=oh-my-openagent retry=false message=Plugin oh-my-openagent does not expose a tui entrypoint tui plugin has no entrypoint
... (1-8 minutes of normal operation) ...
ERROR service=default e=setRawMode failed with errno: 9 exception
ERROR service=default error=setRawMode failed with errno: 9 process error
ERROR service=default e=EIO: i/o error, write exception
INFO service=default worker shutting down
INFO service=default disposing all instances
Crash timeline:
#
TUI log
Start time
Crash time
Uptime
Followed by EIO
1
2026-06-01T224000
22:40:00
22:48:19
8m19s
Yes
2
2026-06-01T224821
22:48:21
22:49:59
1m38s
No
3
2026-06-01T225501
22:55:01
12:12:15 (next day)
~13h
Yes
Crashes #1 and #2 are a rapid double-crash — the first crash corrupts terminal state, and the second attempt fails within 94 seconds.
--pure mode: zero errors
Tested with opencode --pure — the TUI log confirms all external plugins are skipped:
INFO args=["--pure"]
INFO service=tui.plugin count=1 skipping external tui plugins in pure mode
INFO service=tui.plugin id=internal:home-footer loading internal tui plugin
... (internal plugins only, no oh-my-openagent) ...
The server log likewise shows:
INFO service=plugin count=5 skipping external plugins in pure mode
Result: zero setRawMode errors, zero EIO errors, stable session.
Root cause correlation
The oh-my-openagent plugin is loaded in every non-pure crash session but explicitly excluded in every stable --pure session. The "does not expose a tui entrypoint" warning appears immediately before the setRawMode failure in all three crash logs. This is consistent with the hypothesis that the plugin loading path in non-pure mode interferes with the TUI's TTY/raw-mode initialization.
Environment
OpenCode: v1.15.13
OS: macOS Darwin 25.4.0
Shell: zsh
Plugin: oh-my-openagent@latest in ~/.config/opencode/opencode.json
Activity
github-actions commentedon May 7, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
setRawMode failed errno: 9when permission prompt fires mid-stream #26200: TUI crashes withsetRawMode failed errno: 9when permission prompt fires mid-streamIf you believe this was flagged incorrectly, please let a maintainer know.
danisharora099 commentedon May 7, 2026
Adding full reproduction details here since the issue body is not persisting via CLI/API update on this repo.
Detailed Repro + Diagnostics
Environment
Plugin Config
Tested both plugin identifiers in ~/.config/opencode/opencode.json:
Behavior
Key Error
From ~/.local/share/opencode/log/2026-05-07T164750.log:
ERROR ... setRawMode failed with errno: 9 exception
ERROR ... error=setRawMode failed with errno: 9 process error
Attempted Fixes
Why this looks non-pure TUI/TTY specific
Same machine and terminal session:
Could you share recommended debug flags or a workaround for TTY/raw-mode initialization when external plugin loading is enabled?
github-actions commentedon May 7, 2026
Thanks for updating the issue! It now includes all the required information — environment details, clear reproduction steps, actual vs expected behavior, and relevant logs. Much appreciated!
wolkat commentedon Jun 2, 2026
Local reproduction evidence (v1.15.13, macOS Darwin)
Can confirm this bug with detailed local logs. Running OpenCode v1.15.13 on macOS (Darwin 25.4.0, zsh). Every crash session shows the same pattern:
oh-my-openagentTUI plugin loads without a TUI entrypoint, thensetRawModefails within minutes.Crash pattern in non-pure mode
Four crash events captured in
~/.local/share/opencode/log/, all following the identical sequence:Crash timeline:
2026-06-01T2240002026-06-01T2248212026-06-01T225501Crashes #1 and #2 are a rapid double-crash — the first crash corrupts terminal state, and the second attempt fails within 94 seconds.
--puremode: zero errorsTested with
opencode --pure— the TUI log confirms all external plugins are skipped:The server log likewise shows:
Result: zero
setRawModeerrors, zeroEIOerrors, stable session.Root cause correlation
The
oh-my-openagentplugin is loaded in every non-pure crash session but explicitly excluded in every stable--puresession. The"does not expose a tui entrypoint"warning appears immediately before thesetRawModefailure in all three crash logs. This is consistent with the hypothesis that the plugin loading path in non-pure mode interferes with the TUI's TTY/raw-mode initialization.Environment
oh-my-openagent@latestin~/.config/opencode/opencode.jsongithub-actions commentedon Aug 2, 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.