[PR #5539] fix: prevent console output from corrupting TUI #11463

Closed
opened 2026-02-16 18:16:18 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5539

State: closed
Merged: No


Summary

  • Remove console.log calls in clipboard detection that fire on first clipboard use
  • Replace console.error with Log.Default.error in worker.ts and index.ts error handlers
  • Change stderr: "inherit" to stderr: "ignore" in spawn.ts to prevent child process errors from corrupting parent TUI

Problem

Any raw console output during TUI operation corrupts the display because the TUI expects exclusive control of terminal output. The clipboard detection was logging on first use (affecting all Linux/macOS users), and error handlers were using console.error instead of the log system.

Testing

Added regression tests for each fix that verify no console output occurs in these code paths.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5539 **State:** closed **Merged:** No --- ## Summary - Remove `console.log` calls in clipboard detection that fire on first clipboard use - Replace `console.error` with `Log.Default.error` in worker.ts and index.ts error handlers - Change `stderr: "inherit"` to `stderr: "ignore"` in spawn.ts to prevent child process errors from corrupting parent TUI ## Problem Any raw console output during TUI operation corrupts the display because the TUI expects exclusive control of terminal output. The clipboard detection was logging on first use (affecting all Linux/macOS users), and error handlers were using `console.error` instead of the log system. ## Testing Added regression tests for each fix that verify no console output occurs in these code paths.
yindo added the pull-request label 2026-02-16 18:16:18 -05:00
yindo closed this issue 2026-02-16 18:16:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11463