Skip to content

computer-use: Screenshot calls appear to leak X11 client connections until Xvfb hits Maximum number of clients. #5047

Description

@homanp

Description

Daytona Computer Use appears to leak X11 clients during screenshot usage.

We start Computer Use successfully and initial health checks pass:

  • /computeruse/status
  • /computeruse/display/info
  • /computeruse/display/windows
  • /computeruse/a11y/tree
  • /computeruse/screenshot

After repeated agent verification steps that call /computeruse/screenshot?showCursor=true, the screenshot API begins failing with X11 client exhaustion symptoms, e.g. X protocol errors like “Maximum number of clients reached” and/or Toolbox responses like “connection is shut down”.

This looks like screenshot/display/a11y calls may open X11 client connections and not close them reliably, or close them too slowly under repeated calls. Once Xvfb hits its max client count, further screenshot capture is broken for the sandbox even though the Computer Use processes still appear running.

Expected:

Repeated screenshot calls should not monotonically increase X11 client count or eventually exhaust Xvfb clients.

Steps to reproduce:

  1. Start a Daytona sandbox with Computer Use.
  2. Start Computer Use.
  3. Repeatedly call:
    GET /computeruse/screenshot?showCursor=true
  4. Observe Xvfb/X11 client count and open FDs for the Computer Use process.
  5. Eventually screenshot calls fail with X client exhaustion / connection shutdown.

Impact:

Agents need screenshots for visual verification. Once the screenshot endpoint exhausts X clients, the whole desktop verification flow becomes unusable and subsequent findings are blocked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions