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
console.trace in fn.ts corrupts TUI display on schema validation failure #16841
The console.trace("schema validation failure stack trace:") added in PR #16401 (src/util/fn.ts:9) writes raw text to stderr, which corrupts the TUI display. The terminal becomes garbled and requires a window resize to force a repaint.
This fires from src/server/routes/session.ts:575 through the Hono validator chain. It happens intermittently during normal usage (subagent dispatches, session operations).
This is what it looks like:
Steps to Reproduce
Use OpenCode TUI with subagents/tasks
Wait for a schema validation mismatch between the Hono route validator and the fn() service-level validator (seems to happen on session routes)
TUI display becomes garbled -- stack trace text bleeds into the terminal
Resizing the window forces a repaint and restores the display
Expected Behavior
Schema validation failures should be logged through the structured Log system (respecting log levels) rather than raw console.trace() to stderr, which conflicts with the TUI's terminal control.
Replace console.trace() with the structured logger so it respects log levels and doesn't write raw text to the TUI-controlled terminal. The stack trace information is valuable for debugging but should go through the proper logging channel.
Activity
github-actions commentedon Mar 10, 2026
This issue might be a duplicate of existing issues. Please check:
If you believe these are distinct issues, feel free to let a maintainer know.
github-actions commentedon Jul 4, 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.