kosa8 docs

Guides / Try several ideas at once

Try several ideas at once

When you do not know which of three fixes is right, the usual approach is to try one, wait, undo, try the next. kosa8 copies the finished machine once per idea and runs them all at the same time.

Why the copies are cheap

The expensive part of any environment is the setup — dependencies installed, a server warm, a cache primed. A fork resumes from that finished state with its processes intact, so four ideas cost roughly what one costs. The setup happened once.

Do the slow part once

$ kosa8 sandbox create web --memory 2048
$ kosa8 sandbox run web node:22 npm ci
   … 1,412 packages installed

Try every idea against it

$ kosa8 explore web \
    --variant "npm test" \
    --variant "npm test -- --experimental-vm-modules" \
    --variant "npm test -- --babel"

forked 3 branches in 6379ms

BRANCH                RESULT   TIME     VARIANT
 web-explore-624461   failed   356ms    npm test
*web-explore-624462   ok       371ms    npm test -- --experimental-vm-modules
 web-explore-624463   ok       1360ms   npm test -- --babel

winner: web-explore-624462
other branches removed; --keep-all keeps them for inspection

What "winner" means

The fastest branch that succeeded, not the first. When several approaches work, the quick one is almost always the one worth keeping. The losers are removed automatically, because leaving a dozen live machines behind after every exploration would quietly exhaust the host.

# keep them all to look at
$ kosa8 explore web --keep-all --variant "…" --variant "…"

# keep a specific one regardless of who won
$ kosa8 explore web --keep web-explore-624463 --variant "…" --variant "…"

Just the copies, without running anything

$ kosa8 fork web -n 3 --prefix trial
forked web into 3 sandboxes in 4497ms
  trial1	192.168.127.2
  trial2	192.168.127.2
  trial3	192.168.127.2

Each is independent. Changing one does not touch the others or the parent.

Each branch has a time limit

Two minutes by default, so one stuck idea cannot hold up the answer. Change it with --timeout.

Next

Run an AI assistant — give one of these machines to Claude Code or Copilot.