Repository navigation
This release covers the thirteen npm packages (@stim-cli/core, @stim-cli/cache, @stim-cli/cache-s3, @stim-cli/agent-driver, @stim-cli/agent-driver-agent-device, @stim-cli/metro, @stim-cli/expo-build-cache, stim, @stim-cli/ci, @stim-cli/transport, @stim-cli/transport-tailscale, @stim-cli/transport-local and @stim-cli/server). No package publishes for the first time in this release. The release was frozen at 968e31ced (#4974). #4979 landed between the freeze and the version commit and has an entry below. Every commit since v1.39.0 has an entry below. Stim Desktop 0.3.0 ships with this version at the same commit; it carries the Desktop changes listed under 1.38.0 and 1.39.0 as well as those below, because no Desktop release shipped with either. No Stim Host release ships with this version; packages/server/host is unchanged since host-v0.1.1. The phone app ships through its own workflow.
New
- The stim-daemon runs by default and stops idle workspaces on one clock. One
stim-daemonper Stim home, started bystart,ios,android,web,macosandrevive, ticks every minute while anything runs and every five minutes otherwise. A workspace with no activity foridle.minutes(default 15,0never) has its Metro stopped (the port stays reserved), its owned simulators and emulators shut down and its regenerable build outputs deleted: DerivedData, Gradle outputs, git-ignored in-tree build directories and the Metro store.stim revivebrings it back from the build cache. Activity is a Stim command, a Metro bundle or HMR request, an agent-device action, input forwarded by stim-server,stim device lock, or, on macOS, keyboard or mouse input in the Simulator, Device Hub or emulator window. Device and app logs no longer count. A workspace with a build, a live agent-device session or lease, or a live web share is never staged (Fixes #4845). New settingdaemon.mode(on,report,off; envSTIM_DAEMON); the daemon is off in CI and on Windows, where supervisors and command-time passes time the idle stop.stim statusandstim doctorshow the daemon. Fixes #4809 and #4823. (stim,@stim-cli/core,@stim-cli/server) 751e1f049 8004a36bf a6769283a - A pressure ladder frees disk and memory, and admission queues boots and builds. The daemon classifies the machine normal, high or critical each tick and, above normal, frees space from the longest-idle workspace first: idle stage, parked devices, shared caches, the dormant stage,
node_modulesand Pods of idle linked worktrees (critical only), then idle Gradle daemons, unpinned Gradle versions, temp leftovers and the worktree trash. A workspace idle foridle.dormantDays(default 3) goes dormant and its owned devices are deleted. Every boot and native build waits in a first-in-first-out queue under caps derived from cores and memory, and a waiting run prints its position.stim statusshows the level, its reasons, the ladder's actions and waiting runs.disk.criticalFreeGb(default 6) replacesmaintenance.criticalFreeDiskGb. Fixes #4816. (stim,@stim-cli/core) 1b795d107 stim gcpreviews and runs the ladder.stim gcshows each rung's sizes at the high and critical levels and each workspace's stage;stim gc --deleteruns the ladder at high whatever the machine measures, and--cache allat critical.stim status,stim doctor, Stim Desktop (Machine page and Maintenance settings) and the guides show the daemon. Fixes #4837. (stim,@stim-cli/core,@stim-cli/server; Desktop ships with 0.3.0) 4ea04d782- Cleanup measures what a copy-on-write
node_modulesor Pods tree really holds. A new helper reads APFS private sizes, sostatus --jsoncarriesdisk.nodeModulesPrivateBytes,gc --jsoncarriesbuildState.dirs[].privateBytes, plaingcprints1.6G (5M its own), and the ladder's critical rung deletes trees holding at least 256 MiB of their own bytes first and trees of unknown size after, and the dormant stage deletes only measured trees of at least 256 MiB. Clones below that stay. Fixes #4883. 4025a2134 stim gcreports other Stim homes and more disk. A home other than~/.stimlists itself once in a machine-level list, so the real home'sgcreports scratch homes and their owned simulators.gcalso reports Gradletransformsof versions no registered project pins and Xcode DerivedData whose workspace is gone, and the idle stage andgcclear.dd,android/**/.cxxand other in-tree xcodebuild output. Deleting an owned simulator removes its leftover launchd folder. Fixes #4901, #4898, #4897 and #4925. a94aa9f9a a64904eed 927211cff 0b902f358stim agent-device <args>drives the workspace's device through Stim. It runs the shared agent-device on the workspace's owned simulator, owned emulator, leased phone or hosted session with the right selectors and session name, revives an idle-stopped workspace first, refusesboot,shutdownandclose --shutdown(Stim owns the lifecycle) and any selector that is not the workspace's, and reports each agent action to stim-server so viewers see it. New command, an explicit product decision of 2026-11-03.stim guide agentroutes device interaction through it. Fixes #4875. (stim,@stim-cli/core,@stim-cli/server) 9aefb3e45- Web shares carry live presence and a second, view-only password.
stim share --controltakes--view-password [value], a second password that watches without controlling (--jsonaddsviewAuthandviewPassword); equal passwords and--no-passwordwith it refuse withSTIM_BAD_ARG. Viewers see each other's touches, the host's and the agent's gestures with the target element's outline, and may choose a name (defaultGuest N). One finger holds a device's pointer until itsup, so two viewers cannot interleave a gesture. A view session can enter the control password to upgrade.Host,AgentandGuest Nare reserved names. Fixes #4873 and #4941. (stim,@stim-cli/server,@stim-cli/core; Desktop's share sheet offers the view password) a98b165f7 0c892ef7e - Share viewers stream H.264. A browser that supports WebCodecs H.264 gets the device at up to 60 fps with keyframe-on-join and congestion backoff; other browsers and a link ending in
#jpegkeep JPEG at 10 fps. Hosted shares negotiate H.264 with the host. A hosted iOS share paced by aLaunchAgenthost now sends 60 fps instead of about 23. Fixes #4826 and #4920. (@stim-cli/server) 7d0056cb3 8cb88d087 - Share viewers and Stim clients can set and read the device clipboard, send two fingers and send arrow keys. New control-session methods
input.clipboard.set(at most 8192 UTF-8 bytes, optional paste) andinput.clipboard.getwork on iOS simulators, Android emulators and leased Android phones, locally and hosted; a web page, a native macOS app and a physical iPhone refuse them.input.touchtakes a second finger (x2,y2) for pinch and two-finger pan on iOS simulators and Android devices, andinput.keytakesleft,right,up,downandescapeon iOS and Android. The web viewer pastes and copies text, and Stim Desktop and the phone app paste and copy for devices they reach through stim-server. Clipboard text is never logged. Fixes #4922, #4923, #4924 and #4848; refs #4828. (@stim-cli/server,@stim-cli/core; Desktop ships with 0.3.0, the phone app through its own workflow) 74a9a2b98 c3b40f384 5e369a0e2 3cce873bb 98d0c61bf - Shares of hosted devices show the agent's actions and the other viewers. A new
device-host.presence.subscribecarries a hosted session's agent-device actions to its share viewers. Refs #4876. Fixes #4953. (stim,@stim-cli/server) a1d6c4497 - The share viewer matches Stim Desktop's device viewer. The page uses Desktop's top bar, canvas, button bar and colors (from
apps/mobile/src/design/tokens.ts), credits "Shared with Stim by App & Flow", never scrolls, shows the roster as a stacked avatar button that opens a People list where a viewer can rename themselves, and draws the rotate icons as a device with a curved arrow. The login page labels its password and optional name fields (#4979, 8ddfd6c77). The password field is a masked text field instead oftype=password, which is meant to stop browsers offering to save it (not verified in Chrome, Safari or Firefox; Firefox shows the typed characters). Fixes #4849, #4881, #4857, #4964, #4952, #4972 and #4854. (@stim-cli/server) 1a8536821 de033ac03 c15b2643a 76cb4df70 d98148ac6 968e31ced 8b7cd83e7 - Rotating a share turns a portrait-only app's picture too, and the viewer no longer offers rotate on a hosted Android share, which the host refuses. Fixes #4862. (
@stim-cli/server) 690860ea2 - A reverse-proxy share link shows a not-found page instead of the proxy's empty 502 when the share ended or the link is wrong. The installed stim-server service keeps its loopback share listener bound under proxy exposure with
share.publicUrlset, and answers a fixed 404 page for any request that is not a live share's;dist/share-viewer/not-running.htmlis a 503 page for the proxy to serve when Stim is down, with Caddy and nginx recipes instim guide share(not validated against a real proxy). Fixes #4957. (@stim-cli/server) 6e0ee4669 - Stim Desktop can stop one web share.
share.stoptakes an optionalid, advertised by theshare-stop-idhello feature;stim share stopstill ends every share of the workspace. Fixes #4847. (@stim-cli/server,@stim-cli/core; Desktop ships with 0.3.0) f643f0df8 iosSimulatorAppand--simulator-appacceptnone, which creates, boots and owns the simulator and opens no app. 6e4f99826stim iosslims a shut-down owned simulator as its first boot with SimSlim 0.10.0 or newer, instead of booting it stock and letting SimSlim shut it down and boot it again. Booting a new simulator measured 36.8 s against 56.0 s (median of six runs on a loaded machine). Fixes #4869. 5957079ebstim doctor --fixbrings a source checkout to a state worktrees can clone. It reinstalls stale dependencies, repairs broken Pods links and Pod version conflicts (pod install --clean-install, thenpod updateof only the named pods, never a tracked lockfile), and runs a missing prebuild, each step announced with its cost and confirmed in a terminal; without a terminal it prints the manual commands. A newsource-prebuild-record-ios|androidfinding reports a gitignoredios/orandroid/with no finished prebuild record. Doctor also notes a source checkout whose React Native prebuilt flavor differs from the build, andworktree warmsays that a left-outioscarry means Pods are installed privately and thatnpm cireplaces the carriednode_modulesclone. Fixes #4914, #4885, #4899 and #4900. 85b604523 91de105ac c145dfa31 2c9efe31astim sharerefuses at once on Windows withSTIM_SHARE_REFUSEDinstead of waiting 60 s for a server it cannot reach. Fixes #4935. 109089007- Every merge to
mainpublishes to the npmnextdist-tag, at most every five minutes, asX.(Y+1).0-next.<UTC commit time>.g<short sha>for all thirteen packages (npm install --global stim@next), and a merge that changesapps/desktoppublishes a notarized Stim Desktop prerelease on a Sparklenextchannel. Desktop's Settings > App > Updates > Get prerelease updates is off by default and on for a prerelease build. The Release workflow'snext-smokecheck no longer waits on npm's propagation delay. Fixes #4861, #4940 and #4902. (repository workflows; Desktop ships with 0.3.0) d5fe899d1 5ed4b6fe9 2ac16c2fc
Removed (breaking)
- The settings the resource model replaced are retired.
stim settings setrefuses each one and names its replacement, a config that still holds one keeps loading, and doctor andstim settingsflag the leftover. The table is under Migration notes. The environment variable of each retired setting is no longer read (STIM_MAINTENANCE,STIM_MAINTENANCE_DEVICE_IDLE_DAYS,STIM_BUDGET_MIN_FREE_DISK_GB,STIM_BUDGET_HARD_FLOOR_DISK_GB,STIM_MAINTENANCE_CRITICAL_FREE_DISK_GBand the variables of the settings in the table's last row, such asSTIM_MAINTENANCE_PRESSURE_CHECK_MINUTESandSTIM_BUDGET_MAX_LIVE_WORKSPACES), and a governed command refuses while any of them is set. (stim,@stim-cli/core) 4ea04d782 - Stim Desktop's autopilot timer and thresholds are removed from the Automatic Maintenance section of the App preferences; the daemon's level and last actions replace them. (Desktop ships with 0.3.0) 4ea04d782
stim gc --idleis gone, and instim gc --jsontheidleDevicesandworktreeDependenciessections are replaced byladder. stim-server'sgcmethod no longer takesidleMs. (stim,@stim-cli/server,@stim-cli/core) 4ea04d782- Maintenance no longer runs from every command. The detached maintenance child spawned by command hooks, supervisors and
status --watch(STIM_MAINTENANCE_CHILD) is removed; the daemon runs the pass, anddoctor,start,iosandandroidrun it in their own process while no daemon holds the home. 751e1f049
Fixes
- A stim-server whose Stim home is unreadable degrades instead of revoking every client. An unmounted external volume used to close every session with
unauthorized, retire hosted sessions and make clients report the worker as revoked. The server now answers 503, refuses handshakes with the newhome-unavailablecode, keeps the sessions it has, and serves again when the home answers; a registry file that does not parse keeps it degraded until fixed. Fixes #4856. (@stim-cli/server,@stim-cli/core,stim) d11ed5f64 - stim-server no longer exits when a child fails to spawn while it holds a device input claim.
terminatesignalled process group 0 for a child with no pid (for example afterxcode-selectpointed at a deleted Xcode), which dropped every client with exit 143. Fixes #4963. (@stim-cli/server) dbcb6d46b - Failed
stim agent-devicecommands on a hosted session no longer end inRemote Diagnostics: unavailable ... HTTP 404, and a gone agent session is named. Fixes #4954. (stim,@stim-cli/server) 3e39a7441 - More than five runs reserving a Metro port at once no longer refuse with
STIM_BAD_ARG. A port lost to another claim leaves the candidates, so the loop ends within the 200-port range. Fixes #4842. 6c3c44fdb - Owned simulators and emulators are created inside the boot slot, so a burst of new workspaces no longer creates every device at once. Fixes #4877. 5bc8d3f6a
- Queued boot admissions share one device listing, so a 16-workspace burst no longer repeats
simctl listin every waiter. Refs #4865. 4982ea8e9 - An iOS run builds its app while its new simulator waits to boot. Fixes #4917. 192f75140
- The daemon's event loop no longer blocks for 5 to 8 s under memory pressure. The maintenance pass used a synchronous
top -l 1; each tick phase is now timed indaemon_tick. Refs #4944. 2f0325e4b - Adopting a parked iOS simulator gives its privacy and keychain resets three minutes instead of the general 60 s
simctldeadline, whichprivacy reset allcould cross. Fixes #4819. eb5cf2761 - The dormant stage reports the data size of the devices it deletes instead of
0K freed. Fixes #4864. 679fe3941 - Owned devices with no dev server are timed from command-time passes on Windows. Fixes #4823. a6769283a
- Internal only: the end-to-end harness for the resource model under
scripts/resource-model-e2e/and its follow-ups (bf2ccce42, f1f4e0854, b4832170c, eb6e76c16). No shipped behavior changes. - Test only: 13f7d0fd7, afb8484ae, b2a43daee, 08daea1fb, 3b20b47bc, 242949d01. These skip daemon-only and share-server cases on Windows, run the resource-model tests there, take the Stim home away in the pairing tests without renaming a watched directory, and wait for the control helper before revoking its device. No shipped behavior changes.
Docs
- Design specs: the resource model (968e31ced) and multiplayer device presence 4688734a6. Refs #4871.
- The guides (
agent,lifecycle,settings,cleanup,facts,share,errors) and the website pages for settings, idle stop, disk pressure, gc, queue reclaim,stim shareandstim agent-devicedescribe the changes above.
Migration notes
-
Run the removal steps before the first governed command.
start,ios,android,web,macos,reviveandgcrefuse withSTIM_BAD_ARGwhile the environment sets a removed variable that used to change behavior, and while a config layer they read still holds a value that turned something off:maintenance.modeofforreport, ormetro.idleStopMinutesordevices.idleShutdownMinutes0. Each refusal prints the commands to run, in order, for examplestim settings set daemon.mode off, thenstim settings unset maintenance.mode;stim doctorrates the same leftovers, and alsomaintenance.idleStopHours0untilidle.dormantDaysis set (that key is still read for hosted sessions, so it never refuses).Removed Replacement metro.idleStopMinutes,devices.idleShutdownMinutesidle.minutesdevices.reclaimIdleMinutesthe daemon's reclaim rule for a waiting boot maintenance.deviceIdleDays(STIM_MAINTENANCE_DEVICE_IDLE_DAYS)idle.dormantDaysbudget.minFreeDiskGb(STIM_BUDGET_MIN_FREE_DISK_GB)disk.minFreeGb(STIM_DISK_MIN_FREE_GB)budget.hardFloorDiskGb(STIM_BUDGET_HARD_FLOOR_DISK_GB)disk.hardFloorGb(STIM_DISK_HARD_FLOOR_GB)maintenance.criticalFreeDiskGb(STIM_MAINTENANCE_CRITICAL_FREE_DISK_GB)disk.criticalFreeGbmaintenance.mode(STIM_MAINTENANCE)daemon.mode(STIM_DAEMON);reportandoffalso govern the passesstart,ios,androidandgcrun themselvesbudget.maxCommittedMemoryGb,budget.maxLiveWorkspaces,maintenance.pressureCheckMinutes,maintenance.sizeCheckMinutes,maintenance.maxLoadPerCore,maintenance.memoryPressureLevel,maintenance.memoryWarningMinutes,maintenance.minAvailableMemoryGb,maintenance.capTargetPercent,maintenance.idleCheckMinutes,maintenance.urgentFreeDiskGb,maintenance.pressureProtectMinutesnone; the ladder's rules are fixed -
Workspaces idle-stop and clear build outputs after 15 minutes without activity. The daemon deletes DerivedData, Gradle outputs, git-ignored in-tree build directories and the Metro store of an idle workspace (4.3 GB in the test run), and
stim reviverebuilds from the cache. A workspace idle for three days (idle.dormantDays) has its owned devices deleted; the nextstim iosorstim androidrecreates them. Setidle.minutesoridle.dormantDaysto0to opt out, ordaemon.mode off. -
concurrency.maxBuildsandconcurrency.maxDevicesat 0 now mean derived, not unlimited. Builds runmax(1, floor(cores/6))at a time, boots two at a time, and booted devicesmax(2, floor((RAM - 4 GB)/1.5 GB)). A stim-server worker shares its build cap between its own and offloaded builds, so a worker with fewer than 12 cores (a 10-core Mac mini) runs one build at a time; setconcurrency.maxBuildson the worker to raise it. A run waits while every holder ahead of it is alive instead of refusing after a fixed 10 minutes, and refuses withSTIM_AT_CAPACITYafter 90 minutes in all, sooner when a holder cannot be verified;--wait <seconds>and--no-waitbound it. -
A home with
STIM_HOMEset owns a device only when its ledger lists it. The pre-ledger config fallback applies only whileSTIM_HOMEis unset, so a scoped home, hosted-session homes andSTIM_HOME=~/.stimno longer shut down or delete a device they did not create. -
start,iosandandroidrefuseSTIM_LOW_DISKonly while free disk is still underdisk.hardFloorGbafter the ladder ran. Memory never refuses. A scopedSTIM_HOMEnow runs the model with the same defaults (daemon on, disk floors applied). -
STIM_BUILD_COMPATstays 5, so 1.39.0 and 1.40.0 machines can offload builds to each other. -
stim-server protocol changes are additive behind hello features (
presence,device-clipboard,share-view-password,share-stop-id,hosted-presence) and one new refusal code,home-unavailable, which the phone app and Stim Desktop already retry. Update the phone app and Stim Desktop with the server to use the clipboard, view-only password and per-share stop; older clients keep working without them. -
The npm
nextdist-tag moves with every merge tomain.latestis unchanged by it. After 1.40.0 publishes,nextcarries1.41.0-next.*.
Human review
These changes merged with review: needs-human; each PR carries a Human review: comment naming the lines no maintainer has approved yet: #4909 (second share password and per-session access), #4943 (login eviction and view-login rate limit), #4928 (a control session reads the device clipboard), #4949 (Desktop sends Mac clipboard text to the machine running a device), #4967 (a kept loopback listener under proxy exposure), #4867 (the npm next publish job in the release environment), #4942 (the Desktop next workflow, which holds signing secrets), #4890 (private-size measurement and dependency deletion) and #4907 (idle-stage deletion of .dd and .cxx).
QA
Skipping the pre-tag QA gate is the maintainer's standing default from 2026-10-26, and the maintainer asked for this release on 2026-11-03 without QA. This deviates from RELEASE.md section 3, which has no waiver for a stable version; the expedited RC lane is for prereleases only and was not used. The waiver covers only section 3. No section 3 QA round ran on any commit since v1.39.0.
Omitted before the tag, for this candidate: the rows that node scripts/release-qa-matrix.mjs v1.39.0 requires, the native suites test/e2e/native/run-native-e2e.mjs and test/e2e/native/run-cache-e2e.mjs, and test:compat. Per-change evidence is in the pull requests.
Run before the version commit, on the candidate (the freeze plus the version bump): pnpm install --frozen-lockfile, release:prep --check, build, CLI --version (1.40.0), --help and guide agent, the licenses regeneration that release:prep performs, and pnpm tarball inspection of the thirteen packages. The format, lint, typecheck, knip, RPC and unit checks run in the version pull request and its merge-queue run, per RELEASE.md section 2 step 2. Run after the version commit lands: the release gate of RELEASE.md section 4 step 4 on the exact release commit, and the Release workflow's own gates. The full Windows unit suite runs in Post-release validation, recorded, not gated.