Skip to content

TUI: library console output corrupts alternate screen display #48520

Closed as not planned

Description

@thomas-bw

Description

Any console.* output written by library dependencies (Ajv compiling third-party MCP schemas, plugin dependencies, etc.) goes straight to the terminal and lands inside the TUI's alternate screen, corrupting the display with raw warning lines.

#31002 tracks one specific instance (Ajv's unknown format "uint64" ignored), fixed at the source in #48331. This issue tracks the general class of bug: the TUI should be resilient against stray console output from any dependency, not just Ajv.

Plugins

No response

OpenCode version

1.18.30

Steps to reproduce

  1. Configure an MCP server whose tool schemas contain non-standard format values like uint32/uint64 (e.g. Rust/schemars)
  2. Start opencode (TUI)
  3. Ajv warnings appear as raw lines overwriting the TUI display

Screenshot and/or share link

grafik

Operating System

Ubuntu 24

Terminal

Bash

Activity

  1. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct from these (e.g. the general-class tracking angle you describe vs. a specific instance), please add a note clarifying how it differs so maintainers can keep them appropriately linked.

  2. thomas-bw commented on Sep 11, 2026

    @thomas-bw
    Author

    This issue is distinct from all three. It intentionally tracks the general class of "any console.* output from library dependencies corrupts the TUI's alternate screen", not a specific instance:

    This issue is already linked to its fix: #48517 installs a ConsoleGuard in every TUI entrypoint (tui, attach, run) and the server worker, redirecting console.debug/info/log/warn/error into the opencode log file while respecting OPENCODE_LOG_LEVEL. Non-TUI entrypoints keep normal console behavior.

  3. Rome-NotBeepBoop commented on Sep 28, 2026

    @Rome-NotBeepBoop

    Still happening for me on macOS with OpenCode 1.18.32 and cua-driver 0.30.2.

    I'm using cua-driver as a normal local stdio MCP with:

    cua-driver mcp

    When OpenCode starts, it prints a ton of these:

    unknown format "uint32" ignored in schema ...
    unknown format "uint64" ignored in schema ...
    

    They end up getting printed directly over the TUI and make the interface pretty hard to use.
    The MCP itself still seems to work fine, so it looks like it's just the warning output messing up the TUI.

    Also checked and cua-driver 0.30.2 is currently the latest version.
    Believe it or not, the image attached below is OpenCode in Ghostty 😭.

    Image
  4. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions