{"record":{"id":"b9cd5ff1e23f351f","repo":"atuinsh/atuin","slug":"preview-width-is-nonzero","errorCode":null,"errorMessage":"PREVIEW_WIDTH is nonzero","messagePattern":"PREVIEW_WIDTH is nonzero","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-ai/src/tools/mod.rs","lineNumber":949,"sourceCode":"        Ok(status) => status.code(),\n        Err(e) => {\n            if interrupted {\n                None\n            } else {\n                return ToolOutcome::Error(format!(\"Failed to wait for command: {e}\"));\n            }\n        }\n    };\n\n    let duration = start.elapsed();\n\n    // Send final screen state\n    let final_lines = vt100_screen_lines(parser.screen());\n    let _ = output_tx.send(final_lines).await;\n\n    // Strip ANSI escape sequences for clean LLM output by running\n    // the raw bytes through a VT100 parser and extracting plain text.\n    let cols = NonZeroU16::new(PREVIEW_WIDTH).expect(\"PREVIEW_WIDTH is nonzero\");\n    let stdout_text = ansi::to_plain_text(&full_stdout, cols);\n    let stderr_text = ansi::to_plain_text(&full_stderr, cols);\n\n    ToolOutcome::Structured {\n        stdout: stdout_text,\n        stderr: stderr_text,\n        exit_code,\n        duration_ms: duration.as_millis() as u64,\n        interrupted,\n    }\n}\n\n#[derive(Debug, Clone)]\npub(crate) struct AtuinHistoryToolCall {\n    pub filter_modes: Vec<HistorySearchFilterMode>,\n    pub query: String,\n    pub limit: i64,\n    pub only_failed: bool,","sourceCodeStart":931,"sourceCodeEnd":967,"githubUrl":"https://github.com/atuinsh/atuin/blob/15fe1318f1df51de604262eb50734c9883d48e7b/crates/atuin-ai/src/tools/mod.rs#L931-L967","documentation":"Error \"PREVIEW_WIDTH is nonzero\" thrown in atuinsh/atuin.","triggerScenarios":"Fires when the preview layout invariant is violated because PREVIEW_WIDTH is nonzero where zero was required.","commonSituations":"See trigger scenarios.","solutions":["Unset PREVIEW_WIDTH or set it to 0 before running this command."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"15fe1318f1df51de604262eb50734c9883d48e7b","analyzedAt":"2026-08-19T08:56:57.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}