/agterm:spawn-session [task description]from agterm
Hand off an arbitrary task to a freshly spawned, independent agterm session running its own `claude` or `codex` process — not a background subagent. Activates on "spawn a new session for this", "hand this off to a new session", "start a separate session for this job", "delegate this to a new terminal session", "run this in a separate/parallel session", "spin up a session for this slice", or when the user is slicing a larger job into pieces to hand off one at a time.
Ships in agterm. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Hand a task prompt to a new agterm session running its own claude or
codex process — a visible terminal session the user can switch to and
drive, which keeps running after this conversation ends. Not an Agent
subagent: those are in-process, hidden, and die with this conversation.
The task prompt passed as the argument, if any:
$ARGUMENTSparser. No Spawn: prefix —
the companion indent and the spawn flag already mark it.Ask with AskUserQuestion — question "Which CLI should the new session run?",
header "Runtime", single-select, options:
claude process, matching this sessioncodex process (Codex CLI)Check the Step 3 answer before asking — do not default to the Claude tier list out of habit just because it's the familiar one. Codex gets its own, different question.
If Claude was chosen, ask with AskUserQuestion — question "Which model
should the new session use?", header "Model", single-select, options:
claude launches with by defaultMODEL_FLAGS is --model <lower-cased label>, or empty for Inherit.
If Codex was chosen, ask with AskUserQuestion — question "Which model
should the new Codex session use?", header "Model", single-select, options:
-m flag; Codex uses whatever model it's
configured to use by defaultcodex --help or your ~/.codex/config.toml) via the "Other" free-text
choice; Codex has no built-in model tiers to pick from insteadMODEL_FLAGS is --model <exact text the user provided>, or empty for
Inherit. Never guess or substitute a model name of your own — use exactly
what the user typed.
Claude runtime only: call ListAgents first. Its first line reads
"This session is []"; PARENT_NAME is the bare <name>, without
the bracketed ref. End the prompt with the footer below so the new session
knows where it came from. The footer carries no instruction: any "report back"
wording led spawned sessions to message this one unasked. Codex gets no footer (it
has no SendMessage), and neither does a Claude spawn where ListAgents
isn't available or gives no name — spawn anyway.
---
Spawned from Claude session PARENT_NAME.
Two calls, no shell chaining, so each one can match an allow rule:
/tmp. Name it agterm-spawn-<slug>.md. Don't delete it
afterwards — agtermctl is fire-and-forget, so the new session may not have
read it yet.$PWD or other variables):bash "${CLAUDE_PLUGIN_ROOT}/scripts/SPAWN_SCRIPT" "<current working directory>" "SESSION_NAME" "<prompt file path>" [MODEL_FLAGS]
Don't pre-check agterm availability; the script does that and exits non-zero
with a reason. The script also refuses a prompt whose first line reads as a
hand-off description ("Spawn a new session to..."). If it does: don't rewrite
the whole prompt. Edit just line 1 of the file into a direct imperative,
then rerun the same command.
SPAWN_SCRIPT is agterm-spawn.sh for the Claude runtime, codex-spawn.sh
for the Codex runtime:
# Claude, model chosen
... "/path/to/repo" "parser" "/tmp/agterm-spawn-parser.md" "--model opus"
# Codex, model chosen
... "/path/to/repo" "parser" "/tmp/agterm-spawn-parser.md" "--model gpt-5.1-codex"
# Claude, Inherit
... "/path/to/repo" "parser" "/tmp/agterm-spawn-parser.md"
Exit 0: the last stdout line is the new session's display name. Report the hand-off with that name, the runtime (Claude/Codex), the model unless Inherit, and that it sits under this session for the user to switch to. Non-zero: report the failure, quoting stderr; if it's the "not available" message, ask whether they want a background subagent instead of silently falling back to one.
Either way, stop — do not implement the task in this session.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub parmaster/claude-dlc --plugin agterm5 skills in this plugin
/handoffHand off an implementation plan directly to a fresh agterm session running Claude or Codex. Explicit invocation only./mailbox-chatHold a back-and-forth conversation with the agent (Codex or Claude Code) running in the other pane of this agterm split, as peers, through agterm's pane mailboxes. Use when the user says "ask codex", "chat with codex", "talk to codex", "work with codex", "discuss this with codex", "ask codex what it thinks", "get a second opinion from codex", "chat with claude", "ask claude", "discuss this with claude", "work with the other pane", "ask the other agent", or when a prompt or hook message arrives starting with "[peer chat]". Not for handing a whole task to a new separate session (that is spawn-session)./overlayOpen a local HTML file or a URL in an agterm overlay floating over the current session. Activates on "open <file.html> in an overlay", "show <file.html> in agterm", "open <url> in an overlay". Markdown files and plans open with the webrev skill instead. Only for viewing inside agterm; running programs or any other terminal control belongs to the agterm skill./webrevOpen a markdown or text file - a plan, a document, or a draft such as a PR body, an issue comment or a commit message - as a rendered page in an agterm overlay, where the user attaches notes to blocks, code lines or the whole file and hands them back as annotation records. Use when the user says "webrev", "/webrev", "web review", "open the plan", "open the latest plan", "show the plan", "open <file.md>", "annotate this plan", "let me annotate this", "review this doc", "review this draft before posting", "let me review the PR body first", or "let me review the commit message". Not for diffs, and not for a plan critique by Claude (that is planning:review-plan).