1.6 KiB
name, description, disable-model-invocation
| name | description | disable-model-invocation |
|---|---|---|
| tmux-launch-agent | Fork a new agent CLI session into a new tmux window, detected from the current agent. | true |
Agent CLI Seed Data
Agent config (binary, args, modelflag) is in agents-seed.md. Step 2 reads it by name.
Dispatch
-
Detect agent — Run
./detect-agent(sibling). On success, the agent name is known. On failure (exit 1), stop. -
Look up config — Find the agent's entry in
agents-seed.mdbyname. Extractbinary,args, andmodelflag. -
Parse flags — Scan user arguments for flags (before prompt text). For each flag, extract its value and remove both the flag and value from the argument list:
--name <title>/-n <title>— tmux window title-c <path>— working directory (default: project directory)--model <name>/-m <name>— model for child session
Remaining text is the prompt. If
--nameis absent, tmux auto-names the window. -
Build command — Assemble the inner command:
- Start with
<binary>. - If model specified: append
<modelflag> <model-name>. - If prompt exists and
argscontains{prompt}: write to/tmp/, substitute path for{prompt}. - If prompt exists and
argsis empty: pipe viaecho. - If no prompt: launch bare.
- Start with
-
Open window — Call
./tmux-open <window-name> <start-dir> <inner-command>where<inner-command>is the assembled command from step 4 as separate arguments. On success, a new tmux window appears with the agent session active.