Fork a terminal session to a new window with a command or agentic coding tool (Claude Code, Codex CLI, Gemini CLI). Supports context handoff. Use when the user requests 'fork terminal', 'new terminal', or 'fork session'.
Open a new terminal window and run a command in it. Supports raw CLI commands and agentic coding tools (Claude Code, Codex CLI, Gemini CLI) with optional conversation context handoff.
cmd on Windows)FORK_TOOL: python3 ${CLAUDE_SKILL_DIR}/scripts/fork_terminal.py # Terminal forking script
Parse Request
claude-codecodex-cligemini-cliraw-cliCheck Prerequisites
${CLAUDE_SKILL_DIR}/scripts/fork_terminal.py not found → report missing and stopwhich claude, which codex, which gemini)which <command>)which claude succeeds → proceedHandle Context Handoff (Agentic Tools Only)
${CLAUDE_SKILL_DIR}/prompts/context-handoff.md template{{CONVERSATION_SUMMARY}} with a concise summary of the conversation so far{{NEXT_TASK}} with the user's task for the forked sessionBuild Command
ffmpeg -i input.mp4 -c:v libvpx-vp9 output.webmclaude -p "fix tests" --dangerously-skip-permissionscodex -m o3 --dangerously-bypass-approvals-and-sandbox "fix tests"Fork Terminal
<FORK_TOOL> <constructed_command>python3 ${CLAUDE_SKILL_DIR}/scripts/fork_terminal.py claude -p "fix tests" --dangerously-skip-permissions| Tool | Binary | Prompt Flag | Model Flag | Auto-Approve Flag |
|---|---|---|---|---|
| claude-code | claude | -p "<task>" | --model <model> | --dangerously-skip-permissions |
| codex-cli | codex | "<task>" (positional, last) | -m <model> | --dangerously-bypass-approvals-and-sandbox |
| gemini-cli | gemini | -i "<task>" (must be last) | --model <model> | --yolo |