Skip to content

Conversation

@max-sixty
Copy link
Owner

Summary

Add documentation for spawning worktrees with Claude running in detached tmux sessions — one Claude session can hand off work to another that runs in the background.

Tips & Patterns (user-facing docs):

tmux new-session -d -s fix-auth-bug "wt switch --create fix-auth-bug -x claude -- \
  'The login session expires after 5 minutes...'"

Claude Code Skill (guidance for Claude):

  • Explicit requirements: user requests it, running in tmux, authorized via CLAUDE.md
  • "Do not use this pattern" for normal worktree operations

Related to #476 — documents the pattern as a tip rather than adding CLI flags.


@lucasoeth — this captures the workflow you proposed. Let me know if the documentation covers the use case well or if anything's missing.

This was written by Claude Code on behalf of @max-sixty

max-sixty and others added 5 commits January 9, 2026 13:27
Add documentation for spawning worktrees with Claude running in detached
tmux sessions, allowing one Claude session to hand off work to another
in the background.

Added to:
- Tips & Patterns (near end, with other advanced patterns)
- Claude Code Skill (as "Advanced" section with explicit requirements)

The skill guidance requires: explicit user request, running in tmux,
and authorization via CLAUDE.md or explicit instruction.

Related to #476

Co-Authored-By: Claude <[email protected]>
Add `zellij run` as an alternative to tmux for spawning worktrees
with Claude in the background. Rename section from "Agent handoffs
in tmux" to "Agent handoffs" to be multiplexer-agnostic.

The skill guidance now checks both $TMUX and $ZELLIJ env vars.

Co-Authored-By: Claude <[email protected]>
@max-sixty max-sixty merged commit 7503df1 into main Jan 12, 2026
20 checks passed
@max-sixty max-sixty deleted the tmux branch January 12, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants