# Nushell worktree setup reproduction

Environment: Linux x86_64, Nushell 0.117.0, Chromium web client, 1280x800, light theme. Each commit runs its real dev server with a fresh isolated home and synthetic git projects. No live data is seeded. The free replay agent supplies the response.

Apply scenario-shell-environment.patch to the scenario harness so e2e passes SHELL, XDG_CONFIG_HOME and T3CODE_DEV_SEED into its app command. Copy nushell-setup-status.e2e.ts into scripts/scenarios/. Put config.nu under $XDG_CONFIG_HOME/nushell/config.nu; it only simplifies the prompt and hides the startup banner. Set SHELL to the actual Nu executable, without a shell substitution or wrapper.

Run in each checkout after vp i:

```sh
T3CODE_DEV_SEED=0 SHELL="$NUSHELL_BIN" XDG_CONFIG_HOME="$PROOF_CONFIG" \
  vp run scenarios scenarios/nushell-setup-status.e2e.ts --target web
```

The driver creates a project, configures a synchronous action through the app's project API (runOnWorktreeCreate=true, async=false), launches a thread in a new worktree, opens it in the real web client, and opens the setup terminal. It repeats with a second fresh project. Explicit branch names avoid unrelated generated branch naming.

Commands, in order:

1. echo setup-ok
2. node -e "process.exit(7)"

Base d8f3feff0c1749ca020941427b153005755baca6: both threads still show Setting up after the driver's 30-second observation. The successful command's terminal marker ends in literal $?. The failing command produces no completion marker. Start agent stays pending in both cases.

Head 893a673dd70488454d8bd8b605886948c9e0db59: the success terminal shows setup-ok and a marker ending in :0, and the replay agent replies. The failure terminal's marker ends in :7 and the UI reports Setup script exited with 7.

The recordings contain both commands in that order. Because the defect is a live setup wait, recordings are the primary evidence; live counters and spinners prevent pixel-identical waiting-state stills. Recordings were inspected before upload, including the terminal outcomes. No application implementation files were changed.

AI-assisted; verified with the tests and tools listed above.
