{"record":{"id":"c6d68d32fb6d0e64","repo":"kovidgoyal/kitty","slug":"ebusy","errorCode":"EBUSY","errorMessage":"a temporary error occurred, try again later.","messagePattern":"a temporary error occurred, try again later\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kittens/clipboard/read.go","lineNumber":242,"sourceCode":"\t\tans.WriteString(\";\")\n\t\tans.WriteString(enc_payload)\n\t}\n\tans.WriteString(\"\\x1b\\\\\")\n\treturn ans.String()\n}\n\nfunc encode(metadata map[string]string, payload string) string {\n\treturn Encode_bytes(metadata, utils.UnsafeStringToBytes(payload))\n}\n\nfunc error_from_status(status string) error {\n\tswitch status {\n\tcase \"ENOSYS\":\n\t\treturn fmt.Errorf(\"no primary selection available on this system\")\n\tcase \"EPERM\":\n\t\treturn fmt.Errorf(\"permission denied\")\n\tcase \"EBUSY\":\n\t\treturn fmt.Errorf(\"a temporary error occurred, try again later.\")\n\tdefault:\n\t\treturn fmt.Errorf(\"%s\", status)\n\t}\n}\n\nfunc parse_escape_code(etype loop.EscapeCodeType, data []byte) (metadata map[string]string, payload []byte, err error) {\n\tif etype != loop.OSC || !bytes.HasPrefix(data, utils.UnsafeStringToBytes(OSC_NUMBER+\";\")) {\n\t\treturn\n\t}\n\tparts := bytes.SplitN(data, utils.UnsafeStringToBytes(\";\"), 3)\n\tmetadata = make(map[string]string)\n\tif len(parts) > 2 && len(parts[2]) > 0 {\n\t\tpayload, err = base64.StdEncoding.DecodeString(utils.UnsafeBytesToString(parts[2]))\n\t\tif err != nil {\n\t\t\terr = fmt.Errorf(\"Received OSC %s packet from terminal with invalid base64 encoded payload\", OSC_NUMBER)\n\t\t\treturn\n\t\t}\n\t}","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/clipboard/read.go#L224-L260","documentation":"The remote clipboard peer returned status EBUSY, mapped to 'a temporary error occurred, try again later.' The selection owner is currently mid-transfer or otherwise unable to serve the request right now.","triggerScenarios":"Querying the clipboard while the current owner is still converting/pasting data from the previous request; concurrent clipboard reads racing each other; the owning application temporarily blocking on its own conversion.","commonSituations":"Scripts polling the clipboard in tight loops; multiple kittens or tools reading simultaneously; large payloads still being transferred when a new request arrives.","solutions":["Retry after a short delay (this status is explicitly transient)","Add backoff to clipboard polling scripts (e.g. sleep 0.1–1s between attempts)","Avoid issuing overlapping reads; serialize clipboard access in your tooling"],"exampleFix":"# before\nfor i in $(seq 20); do kitten clipboard get out.txt && break; done\n# after\nfor i in $(seq 20); do kitten clipboard get out.txt && break; sleep 0.5; done","handlingStrategy":"retry","validationCode":"null","typeGuard":null,"tryCatchPattern":"until kitten clipboard get f 2>/dev/null; do sleep 0.5; done  # EBUSY is transient","preventionTips":["Treat EBUSY as retryable with backoff","Serialize clipboard access across scripts"],"tags":["kitty","clipboard","ebusy","transient","retry"],"backgroundTag":"resource-busy-retry","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}