stablyai/orca · error · RuntimeError

paste_text requires wl-copy, xclip, or xsel

Error message

paste_text requires wl-copy, xclip, or xsel

What it means

Raised by write_clipboard (runtime.py:1012) when none of wl-copy, xclip, or xsel is found on PATH. This is a hard dependency check — the runtime has no in-process clipboard implementation and shells out to one of these three tools. Reached only after the wl-copy branch and the xclip/xsel loop both miss.

Source

Thrown at native/computer-use-linux/runtime.py:1012

        return
    for command in (["xclip", "-selection", "clipboard"], ["xsel", "--clipboard", "--input"]):
        if not shutil.which(command[0]):
            continue
        process = subprocess.Popen(
            command,
            stdin=subprocess.PIPE,
            stdout=subprocess.DEVNULL,
            stderr=subprocess.DEVNULL,
            text=True,
        )
        if process.stdin is not None:
            process.stdin.write(value)
            process.stdin.close()
        time.sleep(CLIPBOARD_OWNER_SETTLE_SECONDS)
        if process.poll() not in (None, 0):
            raise RuntimeError(f"{command[0]} failed to set clipboard")
        return
    raise RuntimeError("paste_text requires wl-copy, xclip, or xsel")


def set_value(node, value):
    if node is not None and bool(attempt(node.is_editable_text, False)):
        editable = attempt(node.get_editable_text_iface)
        if editable is not None and attempt(lambda: Atspi.EditableText.set_text_contents(editable, str(value)), False):
            return True
    value_iface = attempt(node.get_value_iface) if node is not None else None
    if value_iface is not None:
        return bool(attempt(lambda: Atspi.Value.set_current_value(value_iface, float(value)), False))
    return False


def run_operation(operation):
    tool = operation.get("tool")
    include_screenshot = not bool(operation.get("noScreenshot"))
    if tool == "handshake":
        return {"ok": True, "capabilities": handshake_response()}

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Install one of: wl-clipboard (wl-copy), xclip, or xsel (apt install wl-clipboard / xclip / xsel).
  2. Prefer wl-clipboard on Wayland sessions and xclip/xsel on X11.
  3. If paste isn't needed, use type_text instead to avoid the clipboard dependency entirely.

Example fix

# before: no clipboard tool installed
# after (shell):
sudo apt install xclip  # or: wl-clipboard
Defensive patterns

Strategy: type-guard

Validate before calling

import shutil

def has_clipboard_tool():
    return any(shutil.which(t) for t in ("wl-copy", "xclip", "xsel"))

if not has_clipboard_tool():
    raise EnvironmentError("install wl-clipboard, xclip, or xsel for paste support")

Type guard

import shutil

def supports_paste() -> bool:
    return any(shutil.which(t) for t in ("wl-copy", "xclip", "xsel"))

Try / catch

try:
    run_operation(op)
except RuntimeError as e:
    if "requires wl-copy, xclip, or xsel" in str(e):
        op = {"tool": "type_text", "text": text}  # degrade to typing
        run_operation(op)
    else:
        raise

Prevention

When it happens

Trigger: paste_text or any write_clipboard caller runs on a host missing all three clipboard utilities. The error propagates out of paste_text, which is itself wrapped so the finally block still attempts to restore the (unreadable) prior clipboard.

Common situations: Minimal server/container images; a fresh WSL/headless install; CI environments; systems where the user uninstalled X11 tools.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/333f0f52bf59d952. Report an issue: GitHub.