Wrong TUI leaks into session
OpenAI Developer Community
May 26, 2026
Possible technical cause of the “wrong TUI leaks into session” bug:
- PTY/shared terminal sessions not fully isolated
- stdout/stderr streams multiplexed incorrectly
- incorrect reuse of session_id or websocket state
- race conditions during session attach/detach
- cached UI state not reset when switching agent/session
- possible cross-talk between TUI renderer and backend event bus
Things worth checking:
- strict per-PTY isolation
- full cleanup on disconnect
- renderer state invalidation
- strong binding between user/session/terminal
- locking around concurrent streams
- separate namespaces for TUI state
This looks more like a session orchestration issue than an AI model issue itself.
Discussion in the ATmosphere