agterm-fork
Fork the agent running in an agterm pane (Claude Code or Codex) into a sibling session: same workspace, same launch flags, full conversation history under a fresh session id, waiting at its prompt. The source session is untouched. Also wires a "Fork session" entry into agterm's custom-command palette.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- agterm-fork
- description
- Fork the agent running in an agterm pane (Claude Code or Codex) into a sibling session: same workspace, same launch flags, full conversation history under a fresh session id, waiting at its prompt. The source session is untouched. Also wires a "Fork session" entry into agterm's custom-command palette.
- when_to_use
- Trigger on: agterm-fork, /agterm-fork, "fork this session", "spin off this session", "continue this in a sibling tab", branch the current conversation into a parallel session, add the fork command to the agterm palette.
- allowed-tools
- [ "Bash" ]
02 资源文件 1
- 其他agterm-fork14.5 KB
03 SKILL.md 正文
agterm-fork
Only inside agterm, and only with the agterm-backup capture hook — that hook's live
record is where a session's own claude id comes from.
agterm-fork # fork the current pane
agterm-fork <pane-id> [left|right] # fork any pane (what the palette entry calls)
agterm-fork --dry-run # print the plan, create nothing
agterm-fork install # wire the "Fork session" custom command
agterm-fork uninstall # remove it
The plugin's bin/ is on PATH inside a Claude Code session, so run it by name. What fork does:
- Reads the pane out of
agtermctl tree, refuses if no claude or codex runs there. - Session id: the
agterm-backuplive record, falling back to a--resumealready in the pane's argv. Never guessed — no id, no fork. - Launch flags (
--dangerously-skip-permissions,--model, …) are inherited from the parent's argv, minus--resume/--continue/--fork-session. agtermctl session new --after <pane>— the anchor carries the workspace, so the fork lands next to its parent — then typesclaude --resume <id> --fork-session <flags>or, for codex,codex fork <id> <flags>(codex forks natively).- Waits for claude's "resume full session as-is / from summary" question and answers
2, so the fork really carries the whole history (
--no-answerto skip). - Stops there. The fork gets no task; the user opens it and drives it.
install writes ~/.local/bin/agterm-fork and a managed block in
~/.config/agterm/keymap.conf:
command "Fork session" cmd+ctrl+a>f $HOME/.local/bin/agterm-fork "$AGT_SESSION_ID" "$AGT_PANE"
so cmd+ctrl+a>f, or Ctrl-Shift-O → "Fork session", forks whatever session the cursor is
on, no Claude
involved. The wrapper resolves the newest installed copy of the skill at call time, because
the plugin cache path carries a commit sha and would otherwise break on every update.
Focus stays where it was (--no-select). The fork gets its own live record, so
agterm-backup covers it like any other session.
A palette launch is detached with no terminal, so the wrapper writes that run to
~/.local/state/agterm-fork/palette.log (argv, PATH, socket, the script's output, exit code) and
posts a "Fork session failed" notification when it exits non-zero. Read the log first when the
palette entry seems to do nothing.
04 同仓库更多 Skills
yt-dub
Give a YouTube video Yandex's Russian voice-over (the Yandex Browser / voice-over-translation one) at any length — including past Yandex's 4-hour limit — and mux it into the best video YouTube serves, with the original sound kept as a second track; optionally drop the result into Plex on SugarDaddy. Also when only the translated audio is wanted.
codex-proxy
Run an OpenAI-compatible Chat Completions endpoint on localhost that spends the user's ChatGPT/Codex subscription instead of an API key — for apps that take a Base URL, API key and model id (dictation post-processing, editors, scripts). Install it as an always-on LaunchAgent, check its status, print the key, try a request, or debug a failing app.
revdiff-ru
Review a diff in revdiff with everything except the code translated into Russian, line numbering preserved 1:1 so annotations map back to the real files. One command does the translation; then /revdiff:revdiff opens the result.
peer-chat
A prompt starting with "Chat from Codex:" is a peer message: answer it only through peer-chat.py, never in your own output. Also use when the user says "chat with codex", "talk to codex", "work with codex", "do this with codex", "build this with codex", "discuss this with codex" (the agent in the other pane of this agterm split). Not for a one-shot task handed off, and not for a read-only second opinion.
memory-review
Use when an agent memory directory has grown large enough that nobody remembers what is in it, when memories look stale or contradictory, when the same fact seems to live in both memory and a CLAUDE.md, or when the user asks to review, prune, audit or clean up their memories. Also use before retiring a project whose memories should move somewhere else.
decomment
Strip the noise comments an AI agent left behind on a branch — the ones that restate the code line by line or narrate the change as a story ("was X, now Y", "added a guard here"). Git holds the history and the code holds the present; only genuinely non-obvious comments survive.