Expand description
A test build that never shows a window on a real display.
A tester starts an isolated build with AGENTMUX_TEST_OFFSCREEN=1. Every window the host
creates then goes to ORIGIN, far above every display, and nothing saves that place as the
person’s window position. Before this, the window opened on screen and a separate script
raced to move it, and three times (2026-11-15) a tester’s window showed on a shared screen.
Only a dev or local build honours it (build_kind): a published release
ignores the variable, so one inherited from a test instance’s shell cannot hide a person’s
windows. The decision is the binary’s, never the variable’s alone.
Windows and Linux/X11 place a window anywhere. Wayland cannot place a window at all, so there the flag does nothing and a tester must use X11 (or XWayland) for a test build.
macOS cannot park a window: AppKit puts a shown window onto a display. There no window is ever
shown at all (test_offscreen_macos): the process blocks every way to order one in, refuses to
start if it cannot, and stops itself if one is on the on-screen list anyway.
Constants§
- AUDIO_
OFF_ MARK - The phrase
start_linecarries when audio is off, whichscripts/offscreen-check.shlooks for in a binary: a build from before this one honours the off-screen flag but plays sound. - ENV
- The environment variable a launch sets.
- ORIGIN
- Where a window goes: far above every display, with its left edge at 0. Not the pool’s corner
(-32000, -32000): the host reads a window whose left edge is under -20000 as a spare pool window
(
OFFSCREEN_POOL_THRESHOLD_X), counts it as closed, and ends the app when it is the only one. - PARKED_
BELOW_ X - A spare pool window waits parked with its left edge under this (the host’s
OFFSCREEN_POOL_THRESHOLD_X): it is already off-screen and stays there until it is promoted. - SILENT_
SWITCHES - The Chromium switches that keep a test build silent. A test run is driven on a machine a person
works at, and an agent sound (turn done, waiting) through that person’s speakers is as much an
intrusion as a window on their screen.
mute-audiozeroes every sample anddisable-audio-outputswaps the audio service’s output for a fake one, so no device is opened; Chromium forwards both to the audio service process. Neither depends on the app’s sound setting, so a build that has sounds on (the default) is silent anyway, in the app’s own sounds and in any page a pane loads.
Functions§
- active
- True when this process creates every window off-screen. Read once.
- begin
- The start of a process: when it runs off-screen it first makes sure it can (on macOS, that no
window will ever be ordered in), and refuses (one line on stderr, exit status 2, nothing started)
when it cannot. It then logs
start_lineif there is one. - initial_
rect - The rect a window is created at when this process is off-screen,
Nonewhen it is not: CEF places a window whose initial bounds are empty at (0, 0), so the window must say where it starts.boundsare the ones the window was asked for, if any (a spare pool window keeps its parking place). - macos_
activation_ policy - The macOS activation policy the host sets: a normal Dock app, or an accessory app in test window mode (no Dock tile, no menu bar, never activated by itself), so a test run leaves no icon in the person’s Dock and cannot take the keyboard from their frontmost app.
- place
(x, y)for a window that is off-screen, orposwhen this process is not.- place_
rect - A window rect
(x, y, width, height)with its origin moved off-screen when this process is. - requested_
by - Whether a build of this
kindstarted withvalueinENVruns off-screen. - silent_
switches - The switches the host adds to its command line:
SILENT_SWITCHESin test window mode, none otherwise. - start_
line - One log line for the start of a process that says what the variable did, so a tester can
tell a build that ignored it from one that honoured it.
Nonewhen it was not set.