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: durable event logging multiplies global events across every client #36446
Every TUI logs every durable event from the process-global event stream at INFO level. Because all clients write to the same log, event-heavy activity is multiplied by the number of connected TUIs, producing hundreds of duplicate log lines per second and rapid log growth.
Active plugins: ~/.config/opencode/plugins/share-with-team.ts, the local debug workspace plugin, and @warp-dot-dev/opencode-warp
Reproduction
Start several TUI clients against the same managed v2 daemon.
Run one tool-heavy session that emits reasoning, text, and tool lifecycle events.
Inspect ~/.local/share/opencode/log/opencode.log and group durable event lines by client run ID.
Expected Behavior
Normal INFO logging remains bounded and useful regardless of the number of connected TUI clients. Connection lifecycle events may remain at INFO, but dense per-event diagnostics should not be duplicated into the shared log by every client.
Actual Behavior
packages/tui/src/context/sdk.tsx logs every durable event with:
Each TUI consumes the process-global /api/event stream, so one server event is written once per connected client.
With ten concurrent TUIs:
The shared log reached 628.6 MB.
It grew at approximately 206 lines per second during observation.
The last 5,000 lines repeated the same event classes across ten client run IDs.
That sample included 667 session.tool.input.started, 652 session.tool.input.ended, 652 session.reasoning.ended, 651 session.tool.called, and 632 session.reasoning.started lines.
Additional Context
The live daemon had one expected SSE connection per TUI. This is client-side log multiplication, not duplicate subscriptions within one TUI.
Potential fixes include moving durable per-event logs to DEBUG, sampling them, or emitting event diagnostics once at the server. Connection and reconnection lifecycle logs should remain at INFO.
Activity
kitlangton commentedon Jul 12, 2026
Fixed by #36479, which moved dense per-durable-event diagnostics from INFO to DEBUG while keeping event-stream lifecycle logs at INFO.