wezterm/wezterm · error · anyhow::Error
no size information available
Error message
no size information available
What it means
Thrown by the terminfo/size probing code in termwiz (caps/probed.rs). probe_size writes the XTWINOPS window-report queries (CSI 14 t / 16 t / 18 t) to the terminal and parses replies with the vt parser. It bails with 'no size information available' when the read loop ends and the parser never decoded a Window::ResizeWindowCells or ReportCellSizePixelsResponse report, leaving rows and cols at 0. The catch-all `done = true` arms at lines 220-230 also end the loop early on any unexpected reply, so a terminal that answers with something other than the expected CSI window reports produces the same error.
Source
Thrown at termwiz/src/caps/probed.rs:236
}
}
_ => {
done = true;
}
},
_ => {
done = true;
}
},
_ => {
done = true;
}
}
});
}
if size.rows == 0 && size.cols == 0 {
bail!("no size information available");
}
Ok(size)
}
}
View on GitHub (pinned to 3ff7522b96)
Solutions
- Run inside a modern xterm-compatible terminal (WezTerm, xterm, kitty, Windows Terminal via ConPTY) that answers CSI 14 t / 16 t / 18 t
- Set TERM to a full-featured entry such as xterm-256color instead of dumb, linux, or an unknown value
- If you only need cell dimensions, skip the probe and use Terminal::get_size_in_cells / UnixTty::get_size (ioctl TIOCGWINSZ), which do not depend on terminal replies
- When embedding termwiz, wrap probe_size in a timeout/retry so slow terminals get a chance to answer before you give up
- If you maintain the terminal emulator, implement XTWINOPS window reports (modes 14, 16, 18)
Example fix
// before
let size = probe_size(&mut read, &mut write, false).await?; // bails: no size information available
// after: fall back to the kernel-reported size when the terminal ignores XTWINOPS
let size = match probe_size(&mut read, &mut write, false).await {
Ok(size) => size,
Err(_) => {
let (cols, rows) = terminal.get_size_in_cells()?; // ioctl(TIOCGWINSZ)
Size { rows, cols, xpixel: 0, ypixel: 0 }
}
}; Defensive patterns
Strategy: fallback
Validate before calling
// before probing, make sure we are on a real terminal that can answer
if unsafe { libc::isatty(libc::STDOUT_FILENO) } != 1 {
return fallback_size(); // no tty => the probe cannot succeed
} Try / catch
let size = match probe_size(&mut read, &mut write, false).await {
Ok(size) => size,
Err(_) => {
// terminal ignores XTWINOPS; use ioctl(TIOCGWINSZ)
let (cols, rows) = terminal.get_size_in_cells()?;
Size { rows, cols, xpixel: 0, ypixel: 0 }
}
}; Prevention
- Test on terminals known to implement XTWINOPS (WezTerm, xterm, kitty, Windows Terminal) before shipping size-probe-dependent features
- Never rely on escape-sequence probing as the only size source; always pair it with an ioctl/env-var fallback
- Set TERM to a full terminfo entry in your app's documented supported environments
When it happens
Trigger: Calling TerminalCapabilities::probe_terminal / probe_size on a terminal that does not implement xterm window reporting: it ignores CSI 14/16/18 t, replies with an unrecognized sequence (which trips `done = true`), or replies after the read loop has already given up. ConPTY sessions that emit xtversion queries but no size report, plain `linux` console, `TERM=dumb`, and pipes instead of ptys all hit this.
Common situations: Running termwiz/wezterm-based TUI apps under CI where there is no real TTY; inside screen/tmux configurations that swallow window-report queries; over serial consoles; with TERM unset or set to a minimal terminfo entry; after a terminal emulator upgrade that changed which XTWINOPS modes it supports.
Related errors
- failed to ioctl(TIOCGWINSZ): {}
- failed to ioctl(TIOCSWINSZ): {:?}
- failed to read sigwinch pipe {}
- poll(2) error: {}
- failed to read input {}
AI-assisted analysis of wezterm/wezterm@3ff7522b96 (2026-08-20).
Data as JSON: /api/errors/0ca9309393e6f8a5.
Report an issue: GitHub.