Skip to content

[Bug]: terminal in non-functional state when going back to threads, message: Expected value greater than or equal [...] at ["cols"] #2270

Closed

Description

@zayenz

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

Several times, when going back to a thread the terminal just has an error in it, saying Expected value greater than or equal [...] at ["cols"].

Closing and opening the terminal or adding a new tab seems to work to get it back.

Expected behavior

Terminal should stay terminal.

Actual behavior

Here is a screen-shot of the terminal.

Image

Impact

Minor bug or occasional failure

Version or commit

0.20

Environment

macOs 15.6

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

Opening and closing the terminal.

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Apr 21, 2026
  2. paulbrav commented on Apr 25, 2026

    @paulbrav

    I have a related issue on 0.21, in short the termal does not work if I open it on a large monitor

    [Terminal] Wide terminal pane fails to open when calculated cols exceed schema cap

    T3 Code terminal fails to open in a wide window because the frontend sends
    cols: 499, while the terminal RPC schema rejects values greater than 400.

    Error:
    [terminal] Expected a value less than or equal to 400, got 499
    at ["cols"]

    Expected:
    The terminal should open normally in wide windows, either by supporting the
    calculated width or clamping dimensions before calling terminal.open/resize.

    Actual:
    The terminal displays a validation error and does not start.

    Affected code:

    • packages/contracts/src/terminal.ts: TerminalColsSchema caps cols at 400
    • apps/web/src/components/ThreadTerminalDrawer.tsx: TerminalViewport sends xterm cols directly after fitAddon.fit()

    Workaround:
    Narrow the T3 Code window/pane or zoom in until the terminal calculates <= 400 cols.

    Image
  3. juliusmarminge commented on Jun 20, 2026

    @juliusmarminge
    Member

    Terminal dimension schemas now accept ultrawide values up to 1000 columns and include coverage for 423-column terminals, fixing the old 400-column failure.

    This was closed as part of a large repo-wide maintenance sweep. If you think it's still relevant, please reopen.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions