Skip to content
Draft, pre-release documentation

Kasm Session Runtime is one static Linux binary and needs no libraries from the image it runs in. From the session it needs an X display, and for some features a browser with its DevTools port open, the accessibility bus, or a model endpoint. This page lists the images, architectures and session settings it works with, and the settings that change its results.

The runtime works in two kinds of Kasm workspace image.

kasm-nix images (such as chrome:nix) Stock kasmweb/* images
How the binary gets there built into every image an addition from the SDK adds it
What starts it starts with the session, only when KASM_RUNTIME_SESSION_TOKEN is set the same, once the addition is applied
Framebuffer size 1024x768 with a model; otherwise VNC_RESOLUTION, 1280x720 by default. KASM_RUNTIME_SCREEN_SIZE sets it 1024x768; VNC_RESOLUTION is ignored. KASM_RUNTIME_SCREEN_SIZE, or the KVNC_DESKTOP_RESOLUTION_* variables, once the SDK addition is applied
Refusing viewer resizes with a model, unless VNC_FIXED_RESOLUTION=0; VNC_FIXED_RESOLUTION=1 without one the same, once the SDK addition is applied; KVNC_DESKTOP_ALLOW_RESIZE overrides it
Sidebar on with a session token; KASM_RUNTIME_SIDEBAR=off or =<name> the same, once the SDK addition is applied
Accessibility enabled for runtime sessions; current launchers expose Electron page trees at complete and use CDP for browsers the SDK addition enables the desktop accessibility switch for runtime sessions or ACCESSIBILITY_ENABLE=1; app-specific flags may still be needed

Without the session token, neither kind of image starts the runtime, and the session has no runtime process and no listener. Everything the SDK addition adds is off until an environment variable turns it on, so an image built with it behaves like the stock image by default. Enable the runtime on a workspace walks through both.

Kasm sets a session’s environment from the workspace’s Docker Run Config, or from the environment map of an API request_kasm call. Kasm keeps that map only for a caller using an API key.

An image carries the runtime release it was built with, and a session runs that release until the image is rebuilt. Newer features need a newer release. A running session reports its release in GET /v1/openapi.json (see HTTP API).

  • kasm-nix images pin one release per image build. A newer release reaches a workspace when the workspace uses a newer build of the image.
  • Stock images with the SDK addition get the release the stock image layer pins, unless the build selects another with the RUNTIME_* build arguments at the top of the Dockerfile. Rebuild the layer to move to a newer one.
  • An image you build yourself keeps whatever release it copied in. Take a newer binary from a release and rebuild.

Each release publishes linux/amd64 and linux/arm64 binaries, with a SHA256SUMS file, and one architecture-independent sidebar bundle. The stock-image build downloads the binary for its architecture and checks its SHA-256. A binary for the wrong architecture fails inside the container with exec format error.

Run agent sessions at a fixed 1024x768 and stop viewers from resizing them. A session with a model gets this without any setting, on current nix images and on stock images built with the SDK addition; every SDK example also sets it explicitly.

A pixel coordinate from a screenshot is valid only for that capture’s geometry. Declared window fractions are resolved against the current window, so they follow a move or resize, but may miss if the application rearranges its controls. A change in screen size can also affect baseline comparisons. The runtime records size changes in report.json as screen_resizes. Runs that need no coordinates, such as a scenario made only of cdp_* steps or an outside agent using dom.*, are not affected.

The runtime reads the real framebuffer size and records it in report.json as screen. Check it there when a run’s clicks look wrong.

These apply to a session without a model, and to images from before the default. KASM_RUNTIME_SCREEN_SIZE avoids the first three.

  • The nix images default to 1280x720. Set VNC_RESOLUTION=1024x768.
  • Stock images ignore VNC_RESOLUTION and stay at 1024x768 unless the KVNC_* variables are set.
  • Kasm’s API overwrites VNC_RESOLUTION with the request’s x_res and y_res, which default to 800 and 600. An orchestrator calling request_kasm must send x_res and y_res as well as the variable.
  • An attached viewer can resize the framebuffer mid-run unless resizing is refused (VNC_FIXED_RESOLUTION=1 on either kind of image, or KVNC_DESKTOP_ALLOW_RESIZE=false on stock ones).
  • A -AllowOverride in VNCOPTIONS replaces the image’s own list. Leave it out of VNCOPTIONS.

A person watching a fixed-size session should view it at exactly its size. See Known issues for what happens to their clicks otherwise.

The dom.* methods, the cdp_* scenario steps and the /cdp/<name>/ passthrough use the Chrome DevTools Protocol for Chromium-family browsers. The dom.* methods and the cdp_* steps use WebDriver BiDi for Firefox (below). The SDK examples use Chrome.

On a nix image, a session with a token needs nothing: every browser and Electron app starts with a debugging port of its own, on a profile directory of its own for a Chromium-family browser, and dom.targets and the /cdp/<name>/ passthrough address each by the name of its nix profile. The cdp_* scenario steps use the fixed endpoint on port 9222 instead, which is the default name.

For the fixed endpoint, and on every other image, the browser must be started with a debugging port on loopback, and on Chrome 136 and later with a --user-data-dir too:

Terminal window
APP_ARGS="--start-maximized --remote-debugging-port=9222 --remote-debugging-address=127.0.0.1 \
--remote-allow-origins=* --user-data-dir=/home/kasm-user/.config/chrome-cdp-profile"
  • Without --user-data-dir, Chrome 136 and later ignores --remote-debugging-port without any message, and every dom.* call fails to attach.
  • A browser on a fixed port is reached as default only, never by its own name: Chrome writes the port file the runtime reads by name only when it picks its own port. On a nix image, the port in APP_ARGS becomes default without further settings. Elsewhere, default is http://127.0.0.1:9222 unless KASM_RUNTIME_CDP_ENDPOINT says otherwise.
  • APP_ARGS replaces the image’s default arguments rather than adding to them, so repeat --start-maximized.
  • Chrome reads flags only when it first starts. Launching google-chrome again with new flags hands the URL to the running browser and drops the flags.
  • The runtime refuses a DevTools endpoint that is not on loopback unless KASM_RUNTIME_CDP_ALLOW_REMOTE=true.

Firefox is driven over WebDriver BiDi, which it serves on its debugging port with no driver. On a nix image, a Firefox started in a session with a token is listed in dom.targets as firefox, with protocol: bidi, and keeps the user’s own profile. On other images, start it with APP_ARGS="--remote-debugging-port=9222". It needs no other flag, and it then is default, with protocol: bidi. Four things differ from a Chromium browser:

  • There is no accessibility tree over BiDi, so dom.list_interactive, element handles and dom.click_described are unavailable. Use page and selector.
  • Firefox keeps one BiDi session, and the runtime holds it while it drives the browser. Another BiDi client cannot connect meanwhile, and the /cdp/<name>/ passthrough does not forward to Firefox.
  • Its first page, about:home, takes only dom.navigate.
  • While its debugging port is open, navigator.webdriver is true on every page, and no setting turns it off.

Native applications need no browser. They are driven through X11 input and, where the application publishes one, its accessibility tree over AT-SPI.

Over stdio, the runtime accepts initialize only with protocol version 2024-11-05. Over HTTP, the client’s Mcp-Protocol-Version header chooses: 2026-07-28 and later use the stateless protocol, and earlier versions use sessions. See MCP methods.

A model is optional. When you configure one, KASM_RUNTIME_VISION_ENDPOINT can be any server that speaks the OpenAI chat-completions format with images sent as base64 data URIs, local or hosted. Gemma 4 is a model that works well. With no endpoint set, a signed-in Claude Code agent in the workspace answers screen.judge, screen.ground and screen.ask on the same account; Codex and OpenCode do not. See Vision models and When you need a model.

The runtime starts Claude Code, Codex or OpenCode in a session when the image publishes that agent and the workspace enables it. A signed-in agent uses the workspace’s own provider credentials. Choosing an agent lists what each one supports.