← ClaudeAtlas

ainb-fleetainb-spawnlisted

Spawn a coding-agent session correctly with `ainb run`: always into a git worktree, never bare into a plain checkout. Use whenever you are about to start a Claude/Codex/Gemini/Copilot session in a terminal. Guards the invocations that silently produce a `(broken)` workspace row, two agents sharing one working tree, a `--parent` flag that never fires, or a teardown that cancels itself and leaks the session.
stevengonsalvez/agents-in-a-box · ★ 21 · AI & Automation · score 78
Install: claude install-skill stevengonsalvez/agents-in-a-box
# ainb spawn, start a session correctly One command, two legal shapes for `--repo`. Getting that choice wrong is what shares a working tree between two agents or nests a worktree inside a worktree. ## The two legal shapes Fresh session off a repo root (the common case): ```bash ainb run \ --repo /absolute/path/to/repo-root \ --worktree --create-branch fix/issue-101 \ --tool claude \ --dangerously-skip-permissions \ -p "$(cat /tmp/task-101.md)" ``` Existing task worktree (isolation already done, do not nest another): ```bash ainb run --repo /absolute/path/to/existing/worktree --tool claude -p "$(cat task.md)" ``` Which shape? One command decides it (`.git` is a *file* in a real worktree, a *directory* in a normal clone): ```bash test -f "$P/.git" && echo "worktree: pass bare" || echo "repo root: add --worktree --create-branch" ``` ## Flags, and why | Flag | Why | |---|---| | `--repo <abs-path>` | Repo root, or an existing task worktree. Absolute, always. | | `--create-branch <branch>` | Implies `--worktree` and names the branch. Prefer over bare `--worktree`, which invents `ainb/session-<shortid>`. | | `--worktree` | Isolation. Lands at `~/.agents-in-a-box/worktrees/by-name/<repo>--<branch>--<shortid>`. | | `--tool claude\|codex\|gemini\|copilot` | Which CLI to launch (default `claude`). | | `--model <id>` | Passed through to the provider unchanged. Optional. | | `--dangerously-skip-permissions` | Unattended runs only. | | `-p "<task>"` | Initial prompt, se