{"record":{"id":"6c12804ff398e0c2","repo":"wezterm/wezterm","slug":"missing-pane-height","errorCode":null,"errorMessage":"missing pane_height","messagePattern":"missing pane_height","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"mux/src/tmux_commands.rs","lineNumber":714,"sourceCode":"            let _pane_index = fields\n                .next()\n                .ok_or_else(|| anyhow!(\"missing pane_index\"))?\n                .parse()?;\n            let cursor_x = fields\n                .next()\n                .ok_or_else(|| anyhow!(\"missing cursor_x\"))?\n                .parse()?;\n            let cursor_y = fields\n                .next()\n                .ok_or_else(|| anyhow!(\"missing cursor_y\"))?\n                .parse()?;\n            let pane_width = fields\n                .next()\n                .ok_or_else(|| anyhow!(\"missing pane_width\"))?\n                .parse()?;\n            let pane_height = fields\n                .next()\n                .ok_or_else(|| anyhow!(\"missing pane_height\"))?\n                .parse()?;\n            let pane_left = fields\n                .next()\n                .ok_or_else(|| anyhow!(\"missing pane_left\"))?\n                .parse()?;\n            let pane_top = fields\n                .next()\n                .ok_or_else(|| anyhow!(\"missing pane_top\"))?\n                .parse()?;\n            let pane_active = fields\n                .next()\n                .ok_or_else(|| anyhow!(\"missing pane_active\"))?\n                .parse::<usize>()?;\n\n            let pane_active = pane_active == 1;\n\n            pane_set.insert(pane_id);\n","sourceCodeStart":696,"sourceCodeEnd":732,"githubUrl":"https://github.com/wezterm/wezterm/blob/08e5e0afc6007567d3d131bc2ec1382423c0d2da/mux/src/tmux_commands.rs#L696-L732","documentation":"WezTerm's tmux integration expects every non-empty `list-panes` reply line to carry 11 space-separated fields (session_id through pane_active). `missing pane_height` means the line ended after exactly 7 tokens (through pane_width), so `fields.next()` returned None at field 8, the pane row count.","triggerScenarios":"A pane sync on a tmux domain where a captured line has only 7 tokens: truncated tmux output, an unexpected line inside the %begin/%end block, or list-panes rendering from a tmux build that deviates from the format string in `ListAllPanes::get_command`.","commonSituations":"Old or vendor-patched tmux servers, rapid pane/window teardown during sync, control-stream desync. The error propagates out of `process_result` and fails `sync_pane_state`/`remove_detached_pane` for that round.","solutions":["Upgrade the tmux server to a mainstream release >= 3.1 and retest.","Reproduce under `tmux -CC` with the exact format string and locate the 7-token line.","Rule out tmux.conf output with `tmux -f /dev/null`.","Update WezTerm.","Capture the line with WEZTERM_LOG=trace and file an issue."],"exampleFix":"// before\nlet pane_height = fields\n    .next()\n    .ok_or_else(|| anyhow!(\"missing pane_height\"))?\n    .parse()?;\n\n// after\nlet fields: Vec<&str> = line.split(' ').collect();\nanyhow::ensure!(fields.len() >= 11, \"malformed list-panes line: {line:?}\");\nlet pane_height: u64 = fields[7].parse()?;","handlingStrategy":"validation","validationCode":"fn pane_line_is_complete(line: &str) -> bool {\n    !line.is_empty() && line.split(' ').count() >= 11\n}","typeGuard":null,"tryCatchPattern":"if let Err(err) = panes_result {\n    if err.to_string().starts_with(\"missing \") {\n        log::warn!(\"tmux output malformed: {err:#}\");\n        return; // non-fatal: next sync round retries\n    }\n    return Err(err);\n}","preventionTips":["Keep the tmux server on a release WezTerm is tested against","Don't patch tmux locally when using the WezTerm tmux domain","Capture and diff `list-panes -F` output after tmux upgrades"],"tags":["tmux","wezterm","parsing","rust","control-mode"],"backgroundTag":"malformed-response-parse-error","analyzedSha":"08e5e0afc6007567d3d131bc2ec1382423c0d2da","analyzedAt":"2026-08-20T04:47:31.434Z","contentChangedAt":"2026-08-20T04:47:31.434Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}