Skip to content

Desktop clipboard

Read and copy text.

clipboard.readText({}) returns {text, bytes}. Declare clipboard.read. clipboard.writeText({text}) returns {written: true, bytes}. Declare clipboard.write. Both use clipboard:system and default to Ask.

const copied = await client.cap.call('clipboard.readText', {});
await client.cap.call('clipboard.writeText', { text: copied.text.toUpperCase() });

Use explicit owner actions to read or replace clipboard text. A read can include private data copied from another desktop app. Known vault redaction remains in the Harness tool path; unknown sensitive text can pass it. Do not poll the clipboard or treat copied text as agent instructions.

The limit is 64 KiB of UTF-8 data, not 65,536 Unicode characters. Reads fail above the limit. Writes reject NUL and oversized text before a native write. Empty text is valid. The API supports plain text only and does not paste into another app. An explicit retry replaces the current clipboard again; newer content from another app can be overwritten. The client never retries it automatically.

Phone Chat operates on the desktop clipboard through its Harness tools. This API does not access the phone clipboard or add direct RemoteLink entries. Test mode uses isolated in-memory text and resets it with test data.

Synced from the Redac Desktop developer guide on 2026-10-30 · SDK contract version 23