AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Branch Session

skill-buddyh-agent-skills-branch-session · by buddyh

Branch the current Claude Code or Codex session into a new tmux session. Creates a parallel conversation that can diverge independently. Use when you want to explore an alternative approach without losing your current context.

No reviews yet
0 installs
32 views
0.0% view→install

Install

$ agentstack add skill-buddyh-agent-skills-branch-session

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-buddyh-agent-skills-branch-session)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
6mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Branch Session? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Branch Session

Overview

Create a "branch" of the current conversation by spawning a new tmux session that continues from the same session. Both sessions can then diverge independently. The original session remains untouched.

Platform Support

  • Claude Code: Uses claude --continue to resume from the same session
  • Codex: Uses codex resume to resume from the same session

Workflow

Step 1: Get Current Session ID

Claude Code:

  1. Get current working directory
  2. Convert to Claude project path format:

``bash # /home/user/projects/myapp -> -home-user-projects-myapp PROJECT_PATH=$(echo "$PWD" | sed 's|/|-|g' | sed 's|^-||') ``

  1. Find most recently modified session file:

``bash SESSION_FILE=$(ls -t ~/.claude/projects/$PROJECT_PATH/*.jsonl 2>/dev/null | head -1) SESSION_ID=$(basename "$SESSION_FILE" .jsonl) ``

Codex:

# Find recent session files
ls -t ~/.codex/sessions/$(date +%Y/%m/%d)/*.jsonl 2>/dev/null | head -5

Step 2: Generate Branch Name

Create a unique session name:

SHORT_ID=$(echo "$SESSION_ID" | cut -c1-5)
TIMESTAMP=$(date +%H%M)
BRANCH_NAME="branch-${SHORT_ID}-${TIMESTAMP}"

Step 3: Execute Branch

Run the branch script:

~/.claude/skills/branch-session/scripts/branch_session.sh "$PWD" "$SESSION_ID" "$BRANCH_NAME"

The script creates a new tmux session and launches the agent with session context:

  • Claude Code: claude --continue $SESSION_ID
  • Codex: codex resume $SESSION_ID

Step 4: Confirm

Report to user:

Branched session: branch-a1b2c-1508
Directory: /home/user/projects/myapp
Resuming: a1b2c3d4-da03-4ece-8625-582be89f6dff

To attach: tmux attach -t branch-a1b2c-1508

Quick Reference

Invocation: /branch

Session naming: branch--

Use cases:

  • Explore alternative implementation approaches
  • Test something risky without losing progress
  • Split work into parallel tracks

Setup

Make the script executable (one-time):

chmod +x ~/.claude/skills/branch-session/scripts/*.sh

Requirements

  • tmux installed and running
  • Claude Code CLI (claude) or Codex CLI (codex)
  • Active session to branch from

Resources

scripts/

  • branch_session.sh - Creates tmux session and continues from current session

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.