Ways to work · 2 of 3
In parallel
One session is a pair of hands. A box can hold several, each on its own copy of the work, none of them waiting for the others. The thing that makes this go is that a copy is cheap: an environment clones in seconds with its dependencies and its database, so every session can have one.
The unit of isolation is the environment, not the branch
Elsewhere, two agents on one project means two git worktrees — and two node_modules to rebuild, one database to fight over, and a merge at the end. On a box, two sessions means two environments. clone_environment copies the whole directory copy-on-write: projects/ with everything installed, the build cache, and the live database contents. Measured on a real environment: 11 seconds carrying 594 MB of node_modules and 47 MB of Postgres, and about 300 MB of disk for the two of them together, because the unchanged blocks are shared.
So a session that wants to try something does not branch. It clones, and the original keeps running at its own address.
You
Clone catan as catan-dark and give the dark one a night theme.
Bettik
Environment "catan-dark" cloned from "catan". Address https://catan-dark.home.<handle>.bettik.dev This is a copy-on-write clone of "catan" -- its database contents, dependencies and build cache came across, and the two diverge from here. Claimed for "night-theme" to write.
The clone starts claimed by the session that made it. Nobody else edits it underneath them.
Claims: one writer, or many readers
Two sessions editing one environment will fight over the working tree, so an environment can be claimed. The rule is the one Rust uses for references: a write claim excludes everyone; read claims coexist and exclude only a writer.
A session claims an environment before it changes anything — /bettik-environment catan does this — and says what it calls itself, so whoever collides with it sees a recognisable name and, when the session has one, whether that session is running right now.
You
Fix the scoring bug in catan.
Claude
Checks environment_status first: catan is held by "night-theme" to write, since 14:02, and that session is running. Says so, and offers a clone.
A claim does not expire. A session that goes quiet — you put the phone down, the app was backgrounded — keeps its environment. It is asleep, not gone: opening it again revives it with the same transcript. So a claim is held until the holder releases it, and the guide on the box tells sessions to clone rather than steal. Stealing is possible (claim_environment with steal) and is only done when you say so in as many words.
When a session is done, release_environment with no environment named gives up everything it held. transfer_environment hands a claim straight to another session, with no gap in which a third could take it.
Fanning out
The pattern, then: one session per thing you want tried, each on its own clone, each holding its own claim.
You
Try three approaches to the pathfinding: A* on a clone called catan-astar, a flood fill on catan-flood, and leave the original alone. Report back on each.
Three environments, three addresses, three sessions if you start them that way — or one session doing them in turn. When they are done you open three tabs and pick. The losers are destroy_environment (it asks) and the winner is either kept as is, or its change is brought back to catan by the ordinary means: a branch pushed from the clone's projects/app, pulled in the original.
What limits it
Memory. Each running environment holds its runtime and its database resident, and the box says how full it is at the top of every environment_status. Under 75%: install freely. Above it, an install or a start comes back as a question — the box names the running environment that has been idle longest and how much it holds — and the session puts that to you: stop it, or go ahead anyway. Under a gigabyte free it is a refusal, because an environment starting into no room takes the box down.
Stopped environments cost nothing but disk. stop_environment keeps every byte and the address; start_environment brings it back. An environment you are not looking at today can be stopped without losing anything, which is how twenty environments fit on a box that runs five.
Next: overnight — leaving it running.