{"record":{"id":"92ec549136b3b1e9","repo":"earendil-works/pi","slug":"failed-to-copy-to-clipboard","errorCode":null,"errorMessage":"Failed to copy to clipboard","messagePattern":"Failed to copy to clipboard","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/utils/clipboard.ts","lineNumber":173,"sourceCode":"\t\t\t\t\t\t}\n\t\t\t\t\t} else if (hasX11Display) {\n\t\t\t\t\t\tcopyToX11Clipboard(options);\n\t\t\t\t\t\tcopied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// Fall through to OSC 52 fallback.\n\t\t}\n\t}\n\n\tif (remote || !copied) {\n\t\tconst osc52Copied = emitOsc52(text);\n\t\tcopied = copied || osc52Copied;\n\t}\n\n\tif (!copied) {\n\t\tthrow new Error(\"Failed to copy to clipboard\");\n\t}\n}\n","sourceCodeStart":155,"sourceCodeEnd":176,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/utils/clipboard.ts#L155-L176","documentation":"Thrown by copyToClipboard when every copy strategy failed: platform clipboard tools errored (caught and fallen through) and the OSC 52 terminal-escape fallback also did not succeed. It is the final guard after all fallbacks were exhausted.","triggerScenarios":"Thrown at packages/coding-agent/src/utils/clipboard.ts:173 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install a platform clipboard utility (pbcopy, wl-copy, xclip, or xsel)","Use a terminal that supports OSC 52 clipboard sequences","On SSH/remote sessions, ensure the terminal emulator handles OSC 52"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}