Changelog
What changed in each release of agentlane, newest first.
0.6.3
Changed
- The dev-loop skill says where proof comes from. Its "What counts as proof" section now sends an agent to the place a user meets the change (a screen, a command, a request), has it read its steps back before running them, probe around the change by hand, and report whether the change worked, failed or could not be reached. A test that never starts the app no longer reads as proof of what a user sees.
0.6.2
Added
- A Docker image, published as
ghcr.io/north-star-hq/agentlane. It holds agentlane, Node 24 and the pinned Playwright with Chrome for Testing and the system libraries it needs, for linux/amd64 and linux/arm64.docker run -i --rm ghcr.io/north-star-hq/agentlaneis an MCP server over stdio. With a project mounted at/work, the image runs the CLI and brings the web app up in a lane inside the container, for CI jobs and cloud agents' sandboxes. It runs as a non-root user under tini, and any--userworks. The docs' new page, Docker image, has the commands. Releases push the image from this version on.
0.6.1
The first look or screenshot no longer fails when the XCTest runner takes over a minute to start, and a simctl timeout and a failed Maestro download now say what happened.
Fixed
- The first look or screenshot on a fresh iOS driver waits for the XCTest runner. That call also waits for Maestro to start its runner on the simulator, which Maestro allows 120 s for, but the driver cut it at 60 s and gave up after one try. Where the start takes longer, as it can on GitHub's macOS runners,
lookandscreenshotfailed withMaestro's session failed (timeout), andupreporteddriver: not started. On a simulator, the first call on each Maestro now gets 120 s on top of its own 60 s, and the driver setsMAESTRO_DRIVER_STARTUP_TIMEOUTso Maestro waits the same 120 s. Calls after the runner has answered keep 60 s. A first read or screenshot that still times out, or that Maestro answers withiOS driver not ready in time, restarts Maestro and is tried once more. That error no longer tells you to raiseMAESTRO_DRIVER_STARTUP_TIMEOUT, which the driver sets itself. It now says the next call starts a fresh runner. - The CLI and the MCP server wait longer on a simulator. They wait up to 10 minutes for a look or a screenshot and 28 for a run, which covers a first call the driver tries twice. Emulators keep Maestro's own startup time and the earlier limits.
- A session failure says whether the driver tried again. A call tried once read
failed again after a restart. It now readsMaestro's session failed (timeout): ..., and a call tried twice reads... and failed again when the driver tried once more: .... - A simctl command that runs out of time says so.
up's preflight readsimulator runtime: xcrun simctl list -j runtimes failed:with nothing after it, and told you to install a runtime that was installed. It now readsxcrun simctl list -j runtimes didn't finish within 180 s, with a fix that says to run the listing by hand. Listing the runtimes gets 180 s instead of 60. A simctl command that fails without writing to stderr now names its exit status or signal. - Agents no longer stop agentlane's MCP calls before agentlane does. Codex stops an MCP call after 60 s, GitHub Copilot after 30 s, Antigravity after 3 minutes and Gemini CLI after 10, while a first look on a fresh iOS simulator can take minutes, a run up to 28 minutes, and the same call may first wake a parked lane or install Maestro.
initnow sets a 60-minute limit on agentlane's server for each of them:tool_timeout_secin.codex/config.toml,timeoutin.mcp.jsonand.gemini/settings.json, andtimeoutSecondsin.agents/mcp_config.json. That is enough for a call that wakes a parked lane, installs Maestro and runs the longest flow, and the agent stops a call that waits longer. It raises a shorter value and keeps a longer one, and in Codex's[mcp_servers.agentlane]table it now keeps the other keys you set. The Codex and Gemini CLI plugins carry the same limit, and the Cursor plugin gets its own MCP file without Codex's key.doctorwarns about an entry with no limit or a shorter one, naming the file, the key and the value. Runinitagain in each project to set it. Cursor's CLI stops an MCP call after 60 s and has no setting for it. - A failed Maestro download is an error
upreports. Whenupdownloaded Maestro for a sign-in hook and the download couldn't connect, it crashed withTypeError: fetch failedand a stack trace. A download that can't connect is now tried once more, and a failed one readsdownloading Maestro <version> from <url> failed: <reason>, with a fix. In the sign-in step,upexits as it does for any failed step. Inup's driver step, as before, it printsdriver: not started (...)and carries on. execends its command if the process that ran it, or any process above it, exits, sonpx agentlane execends with the agent's shell.execwatched only its parent. Undernpxthat parent is npm, which keeps running when the shell above it is killed, so the command ran on.execnow records the pid, parent pid and start time of each process above it as it starts. Once a second it asks whether each still exists, which starts no process. Every 10 seconds it also reads their start times and parent pids with oneps. A process whose start time and parent pid have both changed counts as replaced, which catches a pid the system gave to a new process and lets a clock step pass. Under Codex, the shared app-server daemon and the processes above it don't count, since the daemon outlives the Codex window that started it.
0.6.0
The server a project's lane databases live in can now be declared under shared in agentlane.json. It runs while a lane needs it and stops 5 minutes after the last one parks or ends, with its data kept. up --no-app gives tests a lane with the project's data and nothing else. The guard denies a docker or podman command that would leave a container running after the agent, and exec stops its command once the process that ran it is gone. This version runs beside 0.5.x on the same Mac; "Sharing a Mac with 0.5.x" lists what 0.5.x does differently.
Moving from 0.5.x
- Run
initagain in each project, and commit what it changes.node_modules/.bin/agentlane init, with the agents the project uses, rewrites the guard hooks so they start the toolkit for commands that namedockerorpodmantoo. Until then the container guard doesn't run in that agent, anddoctorwarns that the hooks are stale. Codex asks you to trust the changed hooks again with/hooks. The Claude Code plugin's hooks update with the plugin. - Declare the database server under
shared. Give it astartthat starts the server and exits, astopthat stops it and keeps its data, and areadythat exits 0 when it answers.startandstopmust each cope with running twice and with finding the server already in the state they set. The docs' new page, A server the lanes share, has a Docker Postgres to copy. A server you started by hand is found running at the firstupand kept, and from then on agentlane stops it once no lane needs it. - A project that starts its server in a precondition, such as one that runs
just local-db: move the command into the shared service'sstart, and leave the precondition to check state only, such asdocker info >/dev/null 2>&1with "start Docker Desktop" as its fix, or remove it. A precondition never starts a server: it runs before everyup, and nothing stops what it starts. - A project that starts its server in a resource's
create, such as ascripts/lane/db.shthat runs the container with--restart unless-stoppedand whose teardown starts the container again to drop the lane's database: take the server start out of bothcreateandteardown, so they only create and drop the lane's database, and put it in the shared service'sstart. agentlane starts the shared service before eachcreateand each teardown that needs it. - Drop restart policies. A container with
--restart unless-stoppedorrestart: alwayscomes back whenever Docker starts, with no lane that needs it. Remove the policy fromstartand from compose files, and clear it on a container that already has one withdocker update --restart no <container>. - Name the server in
needs. Each resource and service that uses it lists it:"needs": ["postgres"]. A resource withoutneedsdoesn't start the server before itscreate, and a lane whose resources and services name none doesn't keep it up. - Make test databases resources. Each database the project's tests create, a test-only one included, becomes a resource that exports its URL (
TEST_DATABASE_URL, say) and needs the server. Run the tests withnode_modules/.bin/agentlane up --no-appandnode_modules/.bin/agentlane exec -- <test command>, and change the run skill's test steps to match. Thesetupandcreate-verification-skillskills write configs this way. - Move every branch that has a running lane. A lane on a branch whose
agentlane.jsonhas nosharedrecords no need for the server, even while it uses it. Once a lane on a moved branch finds the server running and keeps it, agentlane stops the server 5 minutes after that lane parks or ends, under the lane on the older branch. Before you rely on the stop, merge thesharedconfig into every branch that has a lane, or runreleasein the lanes on the branches you don't move.
Sharing a Mac with 0.5.x
- One registry, still format 1. This version adds the tables
shared_servicesandshared_needs, and the columnsrepositoryandneedstoresources, which 0.5.x doesn't read. 0.5.x keeps working on the file. - 0.5.x refuses
sharedandneeds. Its schema allows neither, so a worktree still on 0.5.x fails validation on a config that uses them. Move a project tosharedonce its branches run this version. - 0.5.x starts and stops no shared service. A lane that 0.5.x parks or ends doesn't count as no longer needing its shared services. The next sweep of this version finds them running with nothing that needs them and stops them 5 minutes later.
- Resources 0.5.x created record no needs. Their teardown starts no shared service until an
up, a wake or arestartof this version records what they need.
New
- Shared services.
shared.<name>inagentlane.jsondeclares a server the lanes of one repository use together, withstart,stop,ready,cwdandtimeoutSeconds(180 by default). Resources and services name the ones they use inneeds, and a name not declared undersharedfails validation. There is one of each per repository, used by the lanes of all its worktrees. agentlane starts it in a newsharedstep ofup, after the build preconditions and before the resources, when a parked lane wakes, inrestart, and before a resource teardown that needs it. Two lanes coming up together start it once, and a server whosereadyalready passes is kept without runningstart. It stops 5 minutes after the last lane that needs it parks or ends. The stop runs from the sweep, which runs while any agentlane process runs: each MCP server checks every minute, and every command checks as it starts. With no agentlane process running, a due stop happens at the next agentlane command. A failed stop is tried again a minute later, and a failed start leaves the server counted as running, to stop under the same rule. A stop runs the commands, the folder, thePATHand the container tool's variables (DOCKER_HOST,DOCKER_CONTEXT,COMPOSE_PROJECT_NAMEand the like) recorded at the last start, and runs in the shared service's log folder once that folder is gone. agentlane never removes a shared service. up --no-appbrings up the project's data alone: the preflight checks that need no device, the preconditions that name no platform, setup, the shared services the resources need, the resources and doctor. It claims no device, browser or port, and builds and starts nothing. Commands run underexecwith the resources' values. The lane parks and wakes like any other, and a later plainupin the folder adds the app to it with the same data. It is refused for a project with no resources, with--platform,--no-cache,--refresh-cacheor--timeout, and in a folder whose lane already has the app.restartin a data-only lane is refused, exit 2, since the lane runs no service.- The guard denies containers that outlive their command.
dockerandpodman(anddocker-compose,podman-compose) commands that leave a container running are denied:run -din any of its spellings,start,restart,compose up -d,--detachor--wait,compose start,compose restart,compose run -d,podman pod startandrestart, andpodman kube playwithout--down. It reads them throughsh -c,npx,env,sudo,nohup,setsid, full paths, split quotes and brace expansion.run --rm, foregroundcompose up,exec,stop,rm,createand the read-only commands pass, and so do host processes started withnohup,&,setsidordisown. The denial namesshared,up --no-appandexecas the routes, andAGENTLANE_ALLOW_CONTAINER=1as the bypass, which agents use only when the user has asked, in that conversation, for a container outside lanes. agentlane doesn't track or stop such a container. The denial needs no registry, so it works when the state folder can't be read. doctorchecks shared services. Ashared <name>line for each shared service the lane needs runs itsreadyand fails withupas the fix. A data-only lane gets the config, wiring, lane, hook locale, resource and shared lines only.statuslists shared services after the lanes: whether each runs, the lanes that need it, when it stops, and why its last start or stop failed, with its log.lanes --jsonhas them in a top-levelsharedarray.
Changed
execends with the process that ran it. When that process exits while the command runs, such as an agent's shell being killed,execsends SIGTERM to the command and every process under it, SIGKILL 5 seconds later to whatever still runs, and exits 129. A command whose caller is gone before it starts never runs. While the caller lives,execreads its parent pid once a second and nothing else changes: the command stays in the terminal's process group, gets Ctrl-C and reads the terminal.nohup agentlane exec -- <server> &followed by closing the shell now ends the server too.reapexits 1 when a shared service's stop fails, as it does on any other problem, andreap --jsonhas asharedlist of the services it stopped.- A teardown starts the shared services its resource needs first. When that start fails, the teardown doesn't run and its record is kept with
teardown did not run, since shared service <name> did not start, to be tried again by the next release or reap. One pass tries each failing shared service once. restartstarts any shared service the lane needs that isn't running, before it stops the service, so a failed shared start leaves the running service alone.- The guard hooks start Node for commands that name
dockerorpodman, as they do for device and browser tools.setsidnow passes through likenohup, sosetsid <device command>gets the device check. up's claim step readsclaimed lane <id>: no device, browser or portfor a lane that holds none, and a lane with no ports no longer ends the line with a stray comma.- The README, the docs home and the package description now open on the problem agentlane solves.
Fixed
agentlane schemano longer opens the registry, so printing the schema leaves the state folder as it was.
0.5.1
Three checks no longer fail things that work, and the registry's lock holder names its caller.
Fixed
- A simulator location nothing reports no longer stops
up. locationd reports the simulated location only while an app is receiving one, so on a simulator where no app is, capture hygiene read nothing back after setting the location three times, failed, andupstopped before it launched the app.upnow counts that location as set and says it is unconfirmed:hygiene: applied location (unconfirmed: nothing read back after setting it 3 times over 46 s; locationd reports a location only while an app is receiving one).doctorwarns instead of failing. A location read back at another coordinate still fails. upkeeps a running service whose listener can't be read. Whenlsoftimed out,upanddoctorcounted a dev server whose process was alive and whose ready check passed as failed, andupstopped and restarted it. Its ready check now stands for it, andupsaysthe listener on <port> could not be read.doctorsees the Claude Code plugin from a git worktree. A project-scope install also loads in the git worktrees of the checkout it was installed for, anddoctorwarned there that Claude Code hadn't installed the plugin.- The registry's lock holder names an
execand other lane touches. A busy refusal named a longexecas "an unidentified caller"; it now reads, for example,agentlane exec: sh, on lane ab2ea94d.
0.5.0
A lane now gives its simulator or emulator back when nobody uses it, and ends on its own once its session is gone, whether or not the session ran release or its session-end hook fired. The hooks move into every agent's project settings, plugin or not, and doctor proves they run. prune and the tool installs leave less on disk. This version runs beside 0.4.1 on the same Mac; "Sharing a Mac with 0.4.1" lists what 0.4.1 still does differently.
Moving from 0.4.1
- Run
initagain in each project, and commit what it changes.node_modules/.bin/agentlane init, with the agents the project uses, rewrites the guard and session-end hooks in each agent's project settings. The new hooks start the toolkit only for commands that name a device or browser tool, find the toolkit in another worktree of the repository, and read names split by quotes, backslashes, line continuations,$"…"or brace expansion. Until then,doctorwarns that the hooks are stale. Codex asks you to trust the changed hooks again with/hooks. The Claude Code plugin's own hooks update with the plugin. - Projects that leave Claude Code's hooks to the plugin need that run too. A project whose
.claude/settings.jsonenablesagentlane@agentlaneoragent-env@agent-envand has no hooks of its own gets them frominit, which renames the 0.2.x plugin key as before. Until then,doctorfailshooks claudeon a Mac where the plugin isn't installed, because no hook runs there. - Hold the lanes a person looks at. A lane now parks 30 minutes after its last call, so a simulator left up for someone to look at shuts down. The
dev-loopanddriveskills tell agents to runagentlane keep, and a script that leaves an app up for a person runs it too. - Leave
config.json'sidleHoursuntil 0.4.1 is gone. This version accepts it and ignores it, because no lane takes over another any more. Remove it once no project on the Mac runs 0.4.1 or earlier. Don't setparkMinuteswhile one does: those versions refuse aconfig.jsonwith a setting they don't know. - Update scripts that read the JSON.
claim --jsondropstookOverandfreed.prune --jsondropsunrecorded: readorphans, andkeptfor the devices kept with a reason.lanes --jsonandstatus --jsonaddpark,holdandownerGoneto each lane, andstate(running,goneorunknown) andaliveAtto its processes. - Run
prunewith your state variables. If a project or shell setsAGENTLANE_STATE_DIRorAGENT_ENV_STATE_DIR, runprunewith the same variables that project's agentlane runs with.prune --yesnow deletes a shut-down device named like a pool device that no registry it reads records, so a device whose lane is in a registry it doesn't read is deleted. - To get 0.2.x's disk back, release its lanes first.
prune --yesdeletes 0.2.x's downloads and build cache only while no registry 0.2.x may use has a lane or a waiting claim. Where agentlane shares 0.2.x's state folder, that counts every lane, so release them all (agentlane statuslists none), then runprune --yesfrom each project that ran 0.2.x, so its build cache is covered. - Delete old init backups by hand.
initnow keeps its five newest backups per project. It never removes the ones earlier versions named without the project hash (<state dir>/init-backups/<stamp>-<folder>).
Sharing a Mac with 0.4.1
- One registry, still format 1. This version adds tables 0.4.1 doesn't read (
parks,holds,owner_checks,device_leases,process_alive) and keeps the format version 0.4.1 checks. When 0.4.1 ends a lane, its park, hold and checks go with it. - A parked lane is a live lane to 0.4.1. 0.4.1 sees it alive, with its ports held, and sees its device as free.
- 0.4.1 still ends a gone owner's lane at once. Its own claims end such a lane as soon as they find it, and judge a Claude Code owner by its pid. So the 30-minute window in which a returning session takes its lane back holds once every project on the Mac has upgraded.
- 0.4.1 can still take over a parked or held lane. Once a lane's last call is over 2 hours old (its
idleHours), a 0.4.1 claim short of ports or devices can take the lane and end it, teardowns included. Nothing is handed to two lanes, but a lane of this version can end that way. Akeepcounts as a call, so it puts that off. - 0.4.1 refuses a
config.jsonthat setsparkMinutes, with "unknown setting 'parkMinutes'". - A device shutdown cut short. If a process of this version is killed while it shuts a device down, and only 0.4.1 processes run afterwards, that device's slot and memory stay held until a process of this version claims or releases, or the Mac restarts. Meanwhile, 0.4.1 claims that need the slot are refused
pool-busy, naming "a process claiming a lane (pid 1)". No second device is made. - A pool over its size. If a Mac restart with 0.4.1 in use leaves the pool with more devices than its size, this version deletes the extra device once its shutdown or delete ends, with a note. If that delete fails, the device stays until
agentlane prune. - Tool versions. A lane of 0.4.1 runs agent-browser without naming its browser, so while one does, every older browser stays. A project still on 0.4.1 downloads its tools again the next time it needs them, if nothing used them when they were removed.
New
- Parking. While its owner is alive, a lane parks 30 minutes after its last call. Its dev servers, browser, driver and Maestro stop, its recordings end, its simulator or emulator shuts down and goes back to the pool, and its bundler pin, dial defaults and
adb reverserules are removed. It keeps its ports, its resources, its browser's saved login and its record. The next call brings it all back before it runs:exec,restart,up, any MCP tool, and the CLI'slook,run,screenshot,record,driver start,evidenceanddevice. With the pool full, that call waits for a device asupdoes. A call that comes while the lane is being parked or brought back waits up to 30 minutes, then is refused with the new codelane-busy.statusshowsparked since …; its next call brings back …,lanes --jsonhas aparkfield, anddoctorwarnsparked. The window isparkMinutesinconfig.json, 30 by default. agentlane keep --for <time> --reason <text>holds this session's lane for its folder up past the park window, while a person looks at the running app.--fortakes minutes or hours (45m,2h,1h30m), 1 hour when left out and 24 hours at most; a longer or malformed time is refused with exit 2.--reasonis required. A secondkeepreplaces the first.keepcounts as a call, and on a parked lane it doesn't wake anything: the next call brings the lane back and the hold keeps it up.releaseends the hold with the lane, and so does the owner being found gone.statusshowsheld until <time> (<left> left): <reason>, andlanes --jsonhas aholdfield. No setting holds lanes by default.- A lane whose owner is gone ends on its own. An owner is gone when its process has exited, its pid belongs to another process, or the lane's folder was deleted. The sweep finds such a lane within 5 minutes while any agentlane MCP server runs, and otherwise at the next agentlane command. It parks the lane at once, and 30 minutes later ends it with everything
releasedoes. In that window, the owner's Claude Code session (byCLAUDE_CODE_SESSION_ID) or Codex thread takes the lane back, with its ports and resources, by calling on it from its folder; the next call wakes it. No other session gets the lane.statusshows anowner goneline with when the lane ends and which session can take it back, andlanes --jsonhasownerGone. A session-end hook still releases at once. - The sweep. There is no daemon. Every agentlane command checks, from one registry read, whether the sweep has work, and when it does starts it in a detached process and carries on. Each running MCP server does the same every minute. The sweep parks lanes past the window, checks the owners no call has shown alive in the last few minutes, ends lanes whose window has passed, stops a screen recording an ended lane left running (only after
psproves the pid is that recorder), and removes an ended lane's folder, evidence included, seven days after the lane ended. It logs tosweep.login the state folder. agentlane reap [--json]runs the sweep now and prints what it did, for running from cron or launchd.- The guard counts as a call. A
simctl,adb,playwright-clioragent-browsercommand the guard lets through on the session's own device or browser counts as a call on that lane, so a lane an agent drives by hand isn't parked. doctorproves the hooks run. Ahooks <agent>line per wired agent reads the mark the hook left the last time it reached the toolkit. When the mark is missing, over a day old, from another toolkit or older than the hook file, the toolkit's files or the Node the hook ran on, doctor runs the guard hook on a harmless command. The line fails with a fix when the hook can't run: no toolkit, a danglingnode_modules/.bin/agentlane, a broken command, a missing hook script, or a Claude Code plugin that the project leaves the hooks to and that isn't installed. When the toolkit is older than doctor, it says to update it.doctoralso warns when the project enables the plugin and Claude Code hasn't installed it.statuschecks the processes it lists. Each process a lane started shows as running, gone or can't tell. A pid another process has taken counts as gone.prunefinds lost devices and what 0.2.x left. It lists the simulators and emulators named like pool devices (agentlane-pool-*,agentlane-emu-*,agent-env-pool-*,agent-env-emu-*) that no registry it reads records, each with its size, andprune --yesdeletes them, only while simctl or adb lists them as shut down. It reads the registries in$AGENTLANE_STATE_DIRand$AGENT_ENV_STATE_DIRwhen set, and in theagentlaneandagent-envfolders of$XDG_STATE_HOMEand~/.local/state. Before each deletion it locks them all and checks again. This reverses 0.3.0's promise that a device the registry has no record of is never deleted; 0.3.0 kept them because a registry in another state folder might hold them, which is still true of a folder none of those variables names. prune also lists 0.2.x's downloads in~/.local/share/agent-envand its build cache in.git/agent-env, in this repository and every repository a registry names, and deletes them only while no registry 0.2.x may use has a lane or a waiting claim. It refuses a folder whose real path isn't 0.2.x's own. Before deleting one it renames it to<path>.removing-<time>-<hex>, so a second prune can't give it back to a 0.2.x lane; if a 0.2.x lane appears while prune works, prune puts back what it moved, and the nextprune --yesfinishes or undoes a run that stopped partway.- Older tool versions go. Once agentlane has installed and checked a newer pin of its patched Maestro, playwright-core, Chrome for Testing, the headless shell, ffmpeg or agent-browser, it removes the older versions it installed itself in
~/.local/share/agentlane. A version stays while a running process names it, a lane's files in this version's registry or 0.2.x's name it, another process is installing it, a kept version runs it, or, for a browser, a link in the browsers folder's.linksnames it, such as the one a project's ownnpx playwright installwrites. Ifpsor a registry can't be read, nothing is removed. It never removes newer versions, folders without its install marker, or~/.local/share/agent-env. agent-browser lanes now name their browsers inbin/.browsers, and the lane'sagent-browsersetsAGENT_BROWSER_EXECUTABLE_PATHto its headless shell. A Maestro from an earlier pin, such as2.11.0-agentenv.3, goes at the first install of the current one unless something uses it. - agentlane's own files have limits. A lane's recorded steps (
<state>/driver/<id>.steps.jsonl) keep the newest 512 KiB of runs once they pass 1 MiB, so in a very long session the oldest steps drop out ofrecord save. Each run records when it ran, and a device trace that spans a cut holds only the runs afterevidence trace start.<state>/emulators/<avd>.logmoves to<name>.1when it passes 5 MiB at a boot, andsession-end.logandsweep.logwhen they pass 1 MiB.initnames its backups<stamp>-<folder>-<hash of the project's path>and keeps the five newest per project. Evidence folders are never cut. - A Postgres recipe. The resources page shows how to clone each lane's database from a template built once per migrations fingerprint, with
examples/expo-app/scripts/lane-pg.sh.
Changed
- No lane takes over another. At any idle age, a claim short of a device waits in the queue, and a claim short of ports is refused, naming the lanes that hold them.
- A claim no longer ends other sessions' lanes. It records a gone owner and leaves the lane to the sweep.
- The hooks always go in each agent's project settings.
initwrites Claude Code's guard and session-end hooks into.claude/settings.jsoneven when the project enables the plugin, which still brings the skills and the MCP server. There the session-end hook gets its declared 10 seconds; Claude Code gives a plugin's session-end hook 1.5 seconds whatever it declares, so the plugin's hook only starts the release. Where both copies run, both guards answer the same and one release runs. The hooks look for the toolkit from the hook's folder upwards, then in the repository's other worktrees. - The hooks start Node only for device and browser commands. The hooks
initwrites check in the shell that the command namessimctl,adb,emulator,avdmanager,playwright-cli,@playwright/clioragent-browserbefore they start the toolkit, as the plugin's hook already did. Both read names split by quotes, backslashes, line continuations (in Copilot's hook input too),$"…"or brace expansion, and a command with braces that names none of them, such asmkdir -p src/{a,b}, starts no Node. - The guard reads
$"…"quoting and brace expansion. It judgesa$"db" shell,a{d,}b shell,e{nv,mulator} -avd …andadb -s emulator-55{54,60} …as the commands bash runs. - Every call on a lane counts as its last use.
driver stop,doctor,keepandtouchcount, and so do evidence commands and device controls that fail.driver statusandevidence listdon't. A longexeccommand,uphook or tool call counts once a minute while it runs. When the registry is busy, a driving command records its use in the lane's folder (last-call.json) and carries on, instead of waiting up to 120 seconds and failing. - Slow device work runs outside the registry's lock. A claim, an
up, a release and the driver's last-used updates no longer wait while another lane creates a simulator or AVD, lists devices or shuts one down. While a pool device is being shut down or deleted,statuslists it as<device name>.shutdown.<hex>(or.delete.) in statecreating, apool-busyrefusal names "a process shutting down(pid N)", and prunekeeps it with that pid. Wherepscan't read pid 1, as in some sandboxes, shutdowns and deletes still run inside the lock. A claim that keeps seeing lanes end while it lists devices looks again while its--timeoutlasts, then is refusedpool-busy, naming the lanes that ended. - An interrupted release finishes later. If a release is stopped while it shuts its device down, the next claim or release finishes the shutdown and puts the device back in the pool shut down, where a recovering release used to put it back booted.
- Stopping a service whose leader has exited.
release,restart, a park and a reap stop the processes a service started that outlive its leader, where they used to refuse with akillhint. They stop the processes left in the service's group that started with its leader or before agentlane last saw the leader running, which covers the workers of anexec-style dev server (expo, vite, a node API) whose main process died first. agentlane records that sighting when the service passes its ready check, and the sweep records it again at most every 10 minutes. Without that proof they still refuse, with the hint. After the grace, SIGKILL goes to the whole group, so helpers started after SIGTERM end too. Ifpscan't list the processes a service started outside its group, they ask once more and then stop the group anyway, reporting those processes as not found, or as left alone with akillcommand. - Stop messages say who got what.
stopped api (…) with SIGKILL to process group 4242, which SIGTERM did not endreplaces… with SIGKILL after SIGTERM was ignored, and a stop that can't prove what is left says what it sent. When a process can't be checked,release,restart,doctorandupname the read that failed (ps could not read when it started,its working directory could not be read) instead of "ps or lsof failed". upasks each question once. It runsxcrun simctl list runtimes,xcodebuild -versionand the Java 17 search once perupand hands the driver the JDK it found, reads the simulator's state once before booting and once after, no longer lists devices just to prune lane files, and reuses each cache input's hash after the build.- Ended lanes' folders go seven days after the lane ended.
up,claimand the sweep count from the end the registry records, where they used to count from the folder's last write, which could remove a week-old lane's evidence as soon as it ended. pruneneedsHOME, and exits 2 without it.
Fixed
- A browser lane driven only through the MCP tools counts as in use. Its last use never moved, so another lane could take it over while it was in use.
- A reap does everything a release does. 0.4.1's reap of a dead owner's lane skipped its recordings, the bundler pin, the dial defaults, the
adb reverserules and the project's teardown hook. - A service that fails to start and can't be stopped afterwards stays in the lane's record, and the failure says so. The lane used to forget a process that may still have been running.
- A dev server that has exited but whose parent hasn't collected it yet is reported stopped, not as having survived SIGKILL.
- An invalid
config.jsonno longer shuts down a lane's warm driver. The driver, and a long command's once-a-minute count, try the last-used update again until the file reads. - A claim no longer refuses a free port as "held by processes the registry did not start" when the process probing it was busy for over half a second.
up's preflight, the driver andmaestro/build.shaskjava_homefor JDK 17 with-F, so a Mac with JDK 21 registered and an unregistered JDK 17, such as Homebrew'sopenjdk@17, finds Homebrew's.- The driver looks past a
JAVA_HOMEthat names a JDK other than 17 for one that is, asupdoes, so a driverupstarted restarts after an idle stop or a crash. A non-17AGENTLANE_JAVA_HOMEis still refused. pruneshuts down a free pool simulator that simctl lists as booting or shutting down before it deletes it, and lists it as "starting or stopping, so it is shut down first" ("state": "changing"in--json).prune --yesreports what happened when its registry lock fails to commit after a step: a 0.2.x folder it took for removal is deleted and reported deleted, and one it put back for a 0.2.x lane is reported put back.- On Linux, a reap or release stops the services of a lane whose worktree folder was deleted. It used to leave them running, with
pid N is no longer in <folder>, because Linux names a deleted working folder with(deleted)after it.
Known issues
- An interactive Codex session's lane ends only through Codex's session-end hook. Codex runs a thread's commands under its shared
codex app-server, so the lane records no process for its owner (codex thread <id> (no process recorded)) and the sweep can't tell when the thread is gone. The hookinitwrites into.codex/hooks.jsonreleases the lane when the app server unloads the thread. When that hook doesn't run, for example because the project's hooks aren't trusted, the lane parks once it goes unused and stays parked, andstatusshowsleft alone: its owner can't be judged. To free it, runagentlane releasein the lane's folder from the Codex thread that holds it, oragentlane release --lane <id> --forcefrom any shell. - A Codex app server restart releases the lanes of Codex sessions that are still open. When the app server stops or restarts, through
codex app-server daemon restartor its own updater, it runs the session-end hook for every thread it has loaded, and the hook releases each thread's lane at once. 0.4.1 does the same. The session's nextuporclaimgives it a new lane.
0.4.1
Changed
initin a terminal is a proper TUI. It asks which agents you use with an arrow-key picker (space toggles, Enter confirms), with the agents it found checked and the file that gave each away beside it. It shows the files it wrote with skills grouped by folder, streams the package manager's output inside the frame while it adds agentlane and collapses it when that succeeds, and ends with each agent's next step. Output that isn't a terminal, such as an agent or CI runninginit, is unchanged.
0.4.0
New
npx agentlane initwith no flags. init wires the agents whose files the project has (CLAUDE.md,.codex/,.cursor/,.github/copilot-instructions.md,GEMINI.md,.agents/rules/and others) or whose session runs it, and prints the reason for each. In a terminal it lists all six agents, checks the ones it found, and takes Enter, numbers or names. With no terminal and nothing found, it exits 2 and names--agentsand--all, which work as before.- init installs the toolkit. When the project's
package.jsondoesn't listagentlane, init adds it as a dev dependency at its own version with the project's package manager (from thepackageManagerfield or the lockfile: pnpm, yarn, bun or npm). A project with nopackage.jsongets a private one. When the install fails, init keeps the files it wrote, exits 1 and prints the command to run. A project that already lists another version keeps it, and init says so.--checkinstalls nothing.
Fixed
- Maestro starts with the JDK in
AGENTLANE_JAVA_HOMEwhenJAVA_HOMEis another version.up,doctorand the Android build already read it first, butlook,screenshotand the other driving commands read onlyJAVA_HOME, so they refused a Java 21JAVA_HOMEthatdoctorhad passed. upanddoctorno longer fail capture hygiene on a Mac where the simulator reads its pinned status-bar time back as9:41. They accepted only09:41, which is how some Macs print it.initno longer lists 0.2.x's.github/hooks/agent-env.jsonasunchangedin a project that doesn't have it. It lists that file only when it changes or removes it.- Under
execand in the signin hook,maestrois the lane's own Maestro, or it prints why the lane has none and exits 2. A lane whoseagentlane.jsonwas invalid or had nodriverblock, or that held no running simulator or emulator, ran whatevermaestrocame first on PATH, unbound to the lane's device, after one warning that named only the file. The message now gives the config's problems, or what is missing and how to add it. A project that ran its own Maestro underexecwithout adriverblock adds"driver": {}toagentlane.json. - The lane's
maestrorefusesmaestro mcp, which takes its device from each tool call, so the lane can't bind it to its device. The lane's MCP server isnode_modules/.bin/agentlane mcp. maestro test's output goes to the lane's evidence folder only whentestis the subcommand. A flow file namedtest, given to another subcommand, got a--debug-outputfolder too.- On macOS,
agentlane driver install --from <zip>clears thecom.apple.quarantineattribute from the Maestro it unpacks. macOS'sunzipcopied a browser-downloaded zip's quarantine onto every unpacked file. Install still checks the zip's sha256 before unpacking.
The patched Maestro
The patched Maestro build is renamed 2.11.0-agentlane.1, and the toolkit downloads it over https from this repository's release, so first use no longer needs a signed-in gh. Compared with 2.11.0-agentenv.3:
- The MCP
runtool's result lists only theenvthe call passed. It used to list everyMAESTRO_*variable in the driver's own environment as well. Flows still get those variables. - On Android, a
tapOnwithretryTapIfNoChange: trueandwaitToSettleTimeoutMs: 0taps a second time again when the first tap changed nothing. The quick tap, which sendsretryTapIfNoChange: false, still reads no hierarchy after the tap. - When an iOS runner never answers within the startup timeout, Maestro stops the
xcodebuildit launched for it. Before,maestro testleft thatxcodebuildrunning after it exited. - On iOS,
maestro record,maestro hierarchyandmaestro querytake a runner port the OS assigns when you pass no--driver-host-port, asmaestro testalready did. They used the fixed port 22087, so two lanes running them at once collided, and the second failed with "The XCTest runner port 127.0.0.1:22087 is held by a Maestro runner that refuses this process's token". A--driver-host-portyou pass still wins.
0.3.0
The toolkit is called agentlane now, and what each agent session holds is a lane. The package, the command, the config file, the environment variables, the plugin, the output and the JSON all say agentlane and lane. Besides the rename, 0.3.0 adds prune, browsers for Intel Macs and Linux, and the fixes listed under New and Fixed. You still claim and release a lane, so the claim and release commands keep their names. 0.3.0 runs beside 0.2.x on the same Mac, so projects can move one at a time.
Moving from 0.2.x
- Release the project's lanes first. In each worktree, while 0.2.x is still installed, run
node_modules/.bin/agent-env release. A lane 0.2.x started keeps 0.2.x's variables in its services and driver. - Replace the dependency. The package is
agentlane, at 0.3.0, and its bin isnode_modules/.bin/agentlane. - Rename the config.
agent-env.jsonbecomesagentlane.json, and its"$schema"points atagentlane.schema.json.up,doctorandrestartrefuse a project that still has onlyagent-env.json, and their message names these renames. - Rename the variables. Every
AGENT_ENV_variable isAGENTLANE_now, in the config's commands, hooks, scripts, Maestro flows and test configs. Two change more than the prefix:AGENT_ENV_CLAIMisAGENTLANE_LANE, andAGENT_ENV_CLAIM_TOKENisAGENTLANE_LANE_TOKEN. The settings you set yourself follow the prefix:AGENTLANE_STATE_DIR,AGENTLANE_OWNER_PID,AGENTLANE_JAVA_HOME,AGENTLANE_MAESTROandAGENTLANE_PLAYWRIGHT_BROWSERS. - Run
initonce.node_modules/.bin/agentlane init --agents <list>replaces what 0.2.x'sinitwrote instead of adding a second copy. MCP server entries namedagent-envbecomeagentlane, and.codex/config.tomlloses[mcp_servers.agent-env]. Hooks that rannode_modules/.bin/agent-envrunnode_modules/.bin/agentlane, and.github/hooks/agent-env.jsonbecomes.github/hooks/agentlane.json. The skill stubs runagentlane skills get, anddisabledMcpjsonServersnamesagentlane. Untilinithas run,doctorwarns that the wiring is stale. - The Claude Code plugin is
agentlane@agentlane. Where.claude/settings.jsonenablesagent-env@agent-env,initenablesagentlane@agentlaneinstead and renames the marketplace entryagent-envtoagentlane, keeping its source. Rename anagent-env@…entry in your local or user settings by hand. The setup skill is/agentlane:setup, and the MCP server isplugin:agentlane:device. The marketplace's repository is stillnorth-star-hq/agent-env. - Update scripts that read the CLI. The renamed commands, flags and JSON fields are listed below.
- Expect one uncached build. The build cache moves to
.git/agentlane/build-cache. The pinned Maestro, Playwright and agent-browser download again into~/.local/share/agentlane/. Once no worktree of the project runs 0.2.x, you can delete.git/agent-env/, and once nothing on the Mac runs it,~/.local/share/agent-env/.
Renamed
claims --jsonislanes --json. Its output isversion: 2:claimsislanes, a pool device'sclaimIdislaneId, and a pending teardown'sclaimislane.release --claim <id>isrelease --lane <id>.- In
claim --jsonandup --json,claimislane. Inrelease --json, each teardown'sclaimislane.driver status --jsongiveslaneId.doctor'sclaimcheck is thelanecheck, and the refusalclaim-goneislane-gone. - The CLI's output, the MCP tools' descriptions, the schema and the skills say lane.
claimprintsclaimed lane <id>, andstatuslistslanes. - Each lane's folder is
<state dir>/lanes/<id>, where$AGENTLANE_LOGSand$AGENTLANE_EVIDENCEpoint. - New pool devices are
agentlane-pool-*simulators andagentlane-emu-*emulators. - The bench report's schema is
agentlane-bench/1.
Sharing a Mac with 0.2.x
- One registry. While
~/.local/state/agent-env/registry.sqliteexists and~/.local/state/agentlane/registry.sqlitedoesn't, 0.3.0 uses 0.2.x's state folder as it is. Both versions then see every lane, and neither hands out a port, simulator, emulator or browser profile the other holds. A Mac that never ran 0.2.x gets~/.local/state/agentlane/. - 0.2.x's names in 0.2.x's folder. There, 0.3.0 writes only what 0.2.x reads: the registry stays format 1, lane folders stay under
claims/, and new pool devices are namedagent-env-pool-*andagent-env-emu-*, because 0.2.x boots only emulators with its own prefix. So either version can reap the other's lane once its owner is gone: stop its services, driver and browser, and run its resources' teardowns. - 0.2.x's pool devices stay in the pool. A free one goes to the next lane of either version, and 0.3.0 boots, stops and deletes
agent-env-emu-*emulators as its own.agentlane prune --yesdeletes the free ones along with 0.3.0's, and never one a 0.2.x lane holds. - Moving the folder. Once no project on the Mac runs 0.2.x and
statuslists no lanes, runmv ~/.local/state/agent-env ~/.local/state/agentlane && mv ~/.local/state/agentlane/claims ~/.local/state/agentlane/lanes. 0.3.0 then uses the folder under its own name. Don't run 0.2.x on that Mac afterwards, because it would start a second registry.
New
agentlane prunelists the pool simulators and emulators that no lane holds, andagentlane prune --yesdeletes them to free their disk. It works from the registry, so it covers theagent-env-pool-*andagent-env-emu-*devices 0.2.x made. Each deletion locks the registry and checks again that no lane of either version holds the device, so a lane claimed meanwhile keeps it. A device the registry has no record of is never deleted, even one with a pool name; the listing shows those apart, because a registry in another state folder may hold them.--jsonprints the listing and each result for tools.- Browsers for Intel Macs and Linux. The pinned Chrome for Testing, its headless shell and ffmpeg now cover Intel Macs and Linux on x64 and arm64, so
up --platform webinstalls its browser there withoutAGENTLANE_PLAYWRIGHT_BROWSERS. Linux runs the web half of a project; iOS needs a Mac, and Android on Linux isn't supported yet. - Chrome's system libraries on Linux.
doctorhas abrowser librariescheck that names each library Chrome for Testing needs and the machine lacks, such aslibnss3.so, and gives Playwright'sinstall-deps chromiumcommand as the fix.upstops with the same message before it opens the browser. - Capture hygiene on a simulator has a new
keyboard-introstep. It marks the keyboard's slide-to-type intro as shown (com.apple.keyboard.preferencesDidShowContinuousPathIntroduction= true) and reads it back, so a fresh simulator's first keyboard no longer opens on an intro that covers the app.doctorlists the step with the others. - The
create-verification-skillskill tells a project to clear its app's own first-run sheets (onboarding, what's-new, permission prompts) before capturing, and to name them in its run skill.
Fixed
- On Android, the build hook runs with
JAVA_HOMEset to the JDK the build cache key names:AGENTLANE_JAVA_HOME, elseJAVA_HOME, else the JDK 17 agentlane finds. Before, withJAVA_HOMEunset, Gradle could run a different JDK from the one the cached build was keyed to. - On Linux, hooks run with
LANGandLC_ALLset toC.UTF-8, which glibc always has, instead ofen_US.UTF-8, which many images don't generate.uprefused a web app on such a machine, citing CocoaPods. macOS keepsen_US.UTF-8. - On Linux without
lsoforss, as in thenode:24image,upreads a port's listeners from/proc. Before this, it never found a service's listener and timed out on a server that answered.
0.2.1
Fixes from running setup from scratch on a production app and on the example app, after 0.2.0 reached them. A project that vendors 0.2.0 should move to this one.
maestro testunder a claim keeps a passing run's folder, itstakeScreenshotfiles included, and links every run into Maestro's own folder. 0.2.0 deleted a passing run's folder, so a flow's screenshots were lost and scripts reading~/.maestro/testsfound nothing.- A second
up --platform webon a claim whose browser is open works. 0.2.0 failed with "Tracing has already been started". - A web service started through a package manager (
pnpm exec next dev …) passesup's check that the server on the port is this worktree's, because a listener anywhere below the started process now counts. initwires Claude Code once wherever the plugin loads from, and removes the copies an earlierinitwrote;doctorwarns when both wire it.- Every command the CLI and the skills tell you to run is
node_modules/.bin/agent-env …, which works in every agent's shell. - Simulator hygiene sets the location again, up to 3 times, when a set doesn't read back.
- Claude Code's SessionEnd hook declares a 10 s timeout, so the release isn't cut off by Claude Code's shared 1.5 s budget.
- The skills:
setupruns every committed flow and test suite before and after its changes and lists each one;create-verification-skillpins the device when flows tap by point, writes a precondition per tool, seeds a page per feature the repo's docs list, and treats a wait that never matches in a sign-in flow as a defect.
0.2.0
0.2.0 adds web apps beside mobile apps, per-claim resources, the setup skill and wiring for six agents. A project moving from 0.1.x needs to know the items under "Moving from 0.1.x" first.
Moving from 0.1.x
- Run
initagain after you upgrade. The skill stubs' text changed, sodoctorwarns that a project's stubs are stale untilnode_modules/.bin/agent-env init --agents <list>rewrites them. Warnings don't faildoctor. - Each claim has an evidence folder.
$AGENT_ENV_EVIDENCE(<state dir>/claims/<id>/evidence) is set in every hook and underexec. It survivesreleaseand goes when the claim's files are pruned, seven days after the claim ends.node_modules/.bin/agent-env evidence screenshot | video start|stop | trace start|stop | logs | listwrites there, and a failedrun, or a failed command underexecon a browser claim, keeps its own bundle there. maestro testunder a claim writes into the evidence folder. In 0.1.x, Maestro wrote each run to its own folder,~/.maestro/tests/<run>. The claim'smaestronow passes--debug-output, and each test's output, itstakeScreenshotfiles included, lands in$AGENT_ENV_EVIDENCE/<stamp>-maestro-test-<pid>/.maestro/tests/<run>/<flow>/. The folder name ends in-failedwhen the test failed, which is also the path Maestro prints on a failure.- Each run is also linked into Maestro's own folder (
~/.maestro/tests/<run>, or$XDG_STATE_HOME/maestro/tests/<run>), so a script that reads it keeps working. Maestro's folder holds the runs of every claim on the Mac, so a script that runs under a claim should read$AGENT_ENV_EVIDENCEinstead. - A
--debug-outputor--test-output-diryou pass yourself goes to Maestro unchanged.
- Each run is also linked into Maestro's own folder (
- Printed commands are
node_modules/.bin/agent-env …. Every fix line the CLI prints, and every command in the skills and stubs, is written that way, run from the project root, because a bareagent-envis on the PATH only in Claude Code with the toolkit's plugin. A run skill that says bareagent-envworks only there; write the full path. - The
deviceskill is nowdrive. It drives browsers too. Adeviceskill remains and points todrive, so a run skill that namesdevicestill works. initand the Claude Code plugin. Wherever Claude Code loads the plugin (the project's settings, your local or user settings, or the session runninginit, as--plugin-dirdoes),initwrites none of the plugin's skills, MCP server or hooks for Claude Code, and says where it found the plugin. It removes the copies an earlierinitwrote, backing each file up first in<state dir>/init-backups/. An agent-env server in.mcp.jsonstays for other agents and is turned off for Claude Code withdisabledMcpjsonServers. A project whose only agent is Claude Code through the plugin gets no toolkit stubs in.agents/skills/.doctorwarns when the plugin and the project's own files both wire Claude Code.- The registry format is unchanged. 0.1.3 and 0.2.0 worktrees share a Mac's registry: 0.2.0 adds tables that 0.1.3 doesn't read and keeps the format version 0.1.3 checks.
New
- Web apps.
webinagent-env.jsonnames the service that serves the web app and the page to open.node_modules/.bin/agent-env up --platform webgives the claim its own browser (a profile, a debugging port and a driver session), opens the app, and signs it in through thesigninhook, which writes Playwright storage state to$AGENT_ENV_STORAGE_STATE. The driver is Playwright (playwright-cli) by default, or agent-browser. The toolkit installs Playwright 1.64.0 and agent-browser 0.39.0 with their browsers in its own data folder, so a project's@playwright/testmust be 1.64.x for its tests to find a browser underexec. Browser archives are pinned for Apple silicon Macs only; elsewhere, setAGENT_ENV_PLAYWRIGHT_BROWSERS. One claim can hold a device and a browser. - Service
platforms. A service can be limited to the apps that need it, so a webupdoesn't start Metro. - Resources.
resourcesdeclares data each claim gets its own copy of, such as a database: acreatecommand that exports values to every service, hook andexec, and ateardownthat runs when the claim ends, after a crash too. - Six agents.
node_modules/.bin/agent-env init --agents claude,codex,cursor,copilot,gemini,antigravity(or--all) writes each agent's skill stubs, MCP server and hooks from one source.--checkexits 1 when a file would change. - The setup skill. It takes a project from no toolkit wiring to
doctorready on every platform.upanddoctorname it whenagent-env.jsonis missing or invalid, or no agent is wired.
Fixed
- A service started through a package manager, such as
pnpm exec next dev, is the service's.pnpm execstarts its command in a process group of its own, anduprefused the server as a process the toolkit did not start. A listener below the service's process now counts, and stopping the service stops it too, even when the wrapper passes on no signal. up --platform webruns again on a claim whose browser is open. The second run failed at sign-in with "Tracing has already been started"; it now ends the running trace and starts a new one.- A browser driver error during
uporexecis reported with exit code 1 and a fix that works whendoctorsays ready (close the browser withnode_modules/.bin/agent-env exec -- playwright-cli close, thenupopens a new one), instead of escaping with a stack trace. upsets the simulator's location again, up to three times, when it doesn't read back, as happens on a freshly booted simulator under heavy load.