{"record":{"id":"2a954fff7c0e89ac","repo":"nikivdev/code","slug":"clipboard-command-exited-with-status-2a954f","errorCode":null,"errorMessage":"clipboard command exited with status {}","messagePattern":"clipboard command exited with status (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/failure.rs","lineNumber":785,"sourceCode":"            .spawn();\n\n        let mut child = match result {\n            Ok(child) => child,\n            Err(_) => Command::new(\"xsel\")\n                .arg(\"--clipboard\")\n                .arg(\"--input\")\n                .stdin(Stdio::piped())\n                .spawn()\n                .context(\"failed to spawn xclip or xsel\")?,\n        };\n\n        if let Some(stdin) = child.stdin.as_mut() {\n            stdin.write_all(text.as_bytes())?;\n        }\n\n        let status = child.wait()?;\n        if !status.success() {\n            bail!(\"clipboard command exited with status {}\", status);\n        }\n    }\n\n    #[cfg(not(any(target_os = \"macos\", target_os = \"linux\")))]\n    {\n        bail!(\"clipboard not supported on this platform\");\n    }\n\n    Ok(true)\n}\n\n#[cfg(test)]\nmod tests {\n    use super::{\n        FailureCopyFormat, FailureEntry, FailurePromptTool, FailureRecord, compact_output_tail,\n        render_ai_prompt, render_excerpt, render_prompt, repo_failure_dir, repo_failure_filename,\n        slug_component, unique_history_path,\n    };","sourceCodeStart":767,"sourceCodeEnd":803,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/failure.rs#L767-L803","documentation":"Error \"clipboard command exited with status {}\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/failure.rs:785 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}