Home Writing Projects Setup Protocol CV

Terminal

Pick one approach and stick with it. VS Code has a built-in Claude Code panel; iTerm2 + tmux is a standalone alternative. Running both creates duplicate sessions that can't see each other. The .zshrc below auto-skips tmux inside VS Code terminals to prevent this.

My setup uses tmux in iTerm2. The shell auto-attaches on launch, and I spawn Claude Code panes with a one-line script.

tmux config highlights

tmux-claude-code plugin

A TPM plugin for managing Claude Code sessions. Searches past conversations by keyword, resumes them in the correct working directory, and shows active session count in the status bar.

The keyword search is the key feature: it greps the first few user messages of every session transcript (~/.claude/projects/*/*.jsonl), excludes active sessions, decodes the project directory, and opens claude --resume in the right place. Smart pane detection uses child process checks and content markers to reliably identify CC panes even when they report zsh as their command.

Auto-attach on shell start

This block in .zshrc ensures every terminal session lands inside tmux — but skips VS Code terminals (which have their own Claude Code panel). SSH connections create a grouped session so phone and laptop share windows but can view them independently.

# Skip auto-attach in VS Code terminals (use VS Code's Claude Code panel instead)
if [[ -z "$TMUX" && -z "$VSCODE_INJECTION" ]]; then
  if [[ -n "$SSH_CONNECTION" ]]; then
    # Skip during tmux-resurrect restore to prevent pane explosion
    if [[ -z "$(tmux show-environment -g TMUX_RESTORING 2>/dev/null | grep -v '^-')" ]]; then
      tmux new-session -A -t c -s "remote-$$" \; new-window -n remote 'claude; exec zsh' 2>/dev/null || tmux new -s c 'claude; exec zsh'
    fi
  else
    tmux attach -t c 2>/dev/null || tmux new -s c 'claude; exec zsh'
  fi
fi

Navigation cheatsheet

Action Key
New Claude Code paneprefix+c
New named CC paneprefix+C
Resume CC session by keywordprefix+Ctrl-r
Browse CC sessions (fzf)prefix+Ctrl-b
Grid view (re-tile)prefix+g
Zoom pane fullscreenprefix+z
Return to gridprefix+z again
Jump to pane by numberprefix+q then number
Next pane (stays zoomed)prefix+n
Previous pane (stays zoomed)prefix+p
Next pane (unzooms)prefix+o
Move pane to own windowprefix+!
Kill paneprefix+x then y

Window organization

I group tmux windows by domain so prefix+0 through prefix+3 maps to a mental context switch, not a hunt through panes:

Key Window What lives here
0metaSingle pane running Claude Code as a "control plane" — reorganizes windows, kills dead panes, checks on other sessions
1policyengineAll PolicyEngine work: microsimulation, emails, deployment, data pipelines
2otherRules Foundation, Cosilico, Eggnest, outreach, decks
3personalSide projects, personal errands, life stuff

Each window has 5–8 panes in a tiled layout. I zoom into one pane with prefix+z to focus, then prefix+n/prefix+p to cycle through panes while staying zoomed. The meta pane at prefix+0 is a persistent Claude Code session that can inspect and reorganize everything else — moving panes between windows with join-pane, killing idle shells, or checking what a session was working on by reading its transcript.

Claude Code

Configuration lives in a dedicated repo: MaxGhenis/.claude

Key settings

Skills

13 on-demand skills that load based on conversation context (not preloaded). Examples: Whoop health data, Xero UK accounting, App Store Connect, GCP billing, OpenCollective expenses, Modal/Vercel deployment, OpenMessage patterns, agent teams, Slack patterns, Cloudflare domains.

Commands

12 slash commands including /briefing (daily summary), /search-everything (cross-platform search), /expense (OpenCollective filing), /config-tidy (audit and reorganize config layers), and more.

Plugins

Dotfiles

Tracked in a separate repo: MaxGhenis/dotfiles

Contains .tmux.conf and .zshrc. Kept separate from .claude because these files also include non-Claude config (conda, NVM, Julia, PATH, etc.).

Home directory files are symlinks to the repo, so edits are always in sync:

~/.zshrc      → ~/dotfiles/.zshrc
~/.tmux.conf  → ~/dotfiles/.tmux.conf
~/bin/cc      → ~/tmux-claude-code/cc

Phone access

The simplest way: Remote Control. Every local session is automatically available at claude.ai/code and the Claude mobile app (iOS / Android) with no SSH or VPN.

For direct terminal access from a phone (e.g. to run shell commands), I also have: