claude-sessions spawn: add --headless/--create for non-interactive use

Claude-Session: https://claude.ai/code/session_01JXneLTuvb5Gxim3DTN2tQa
This commit is contained in:
Paul O'Reilly
2026-10-26 00:26:51 +13:00
parent c32ea467e4
commit d23778942d
3 changed files with 42 additions and 8 deletions

View File

@@ -12,14 +12,14 @@ from the Claude app.
- `/spawn-session <project>` — spawn for a named project folder
- `/spawn-session <project> --mode <mode>` — override engagement mode
- `/spawn-session <project> --attach` — attach after spawning
- `/spawn-session` — lists projects and asks which one
## How it works
Thin wrapper over the `claude-tmux` script (in `small-scripts`, symlinked to `~/sbin`).
The skill only resolves the project name from `$ARGUMENTS` (or asks) and shells out to
`claude-tmux <project> [flags]`. All real logic — folder resolution, mode selection
Calls `claude-sessions spawn <folder> --headless [--name topic] [--create]` (since 2026-10-26),
which wraps `claude-tmux` (in `small-scripts`, symlinked to `~/sbin`). The skill only resolves
the folder from `$ARGUMENTS` (or asks). Headless mode never prompts or attaches, and exits 2
if the topic is already a live tmux session (the skill then asks for a unique topic). All real logic — folder resolution, mode selection
(profile `last-mode` unless `--mode`), Title-Casing, ` #N` auto-increment, tmux creation,
and launching `claude --remote-control` via `claude-profile` — lives in the script.