Hop between Claude Code sessions in tmux panes
Project description
Claude Tmux Hop
Quickly hop between Claude Code sessions running in tmux panes.
Features
- Priority-based cycling: Jump to panes waiting for input first, then idle, then active
- Auto-registration: Claude Code hooks automatically track pane states
- Auto-discovery: Existing Claude Code sessions are detected on plugin load
- In-memory state: Uses tmux pane options - no files, auto-cleanup when panes close
- Cross-session navigation: Works across all tmux sessions
Requirements
- uv (for
uvxcommand) - tmux 3.0+
- Python 3.10+
- Claude Code
Installation
1. Install Claude Code Plugin
claude plugin marketplace add unsafe9/claude-tmux-hop
claude plugin install claude-tmux-hop
2. Install Tmux Plugin (via TPM)
Add to ~/.tmux.conf:
set -g @plugin 'unsafe9/claude-tmux-hop'
Then press prefix + I to install.
That's it! The CLI runs via uvx automatically - no manual Python installation needed.
Any existing Claude Code sessions will be automatically discovered and registered as idle on plugin load.
Usage
Key Bindings
| Key | Action |
|---|---|
prefix + Tab |
Cycle to next Claude Code pane |
prefix + C-Tab |
Open picker menu (if enabled) |
Configuration
Add to ~/.tmux.conf:
# Customize cycle key (default: Tab)
set -g @hop-cycle-key 'Tab'
# Customize picker key (default: C-Tab)
set -g @hop-picker-key 'C-Tab'
CLI Commands
# List all Claude Code panes
uvx claude-tmux-hop list
# Cycle to next pane (usually via keybinding)
uvx claude-tmux-hop cycle
# Show picker menu
uvx claude-tmux-hop picker
# Discover existing Claude Code sessions (runs automatically on plugin load)
uvx claude-tmux-hop discover
# Preview what would be discovered
uvx claude-tmux-hop discover --dry-run
How It Works
Pane States
| State | Trigger | Priority |
|---|---|---|
waiting |
Notification hook (permission prompt) | Highest |
idle |
Stop hook (task complete) | Medium |
active |
UserPromptSubmit hook | Lowest |
Cycling Behavior
- If waiting panes exist, cycle only through waiting panes (oldest first)
- If no waiting, cycle through idle panes (newest first)
- If no idle, cycle through active panes (newest first)
State Storage
State is stored directly on tmux panes using custom options:
@hop-state: Current state (waiting/idle/active)@hop-timestamp: Unix timestamp of last state change
Benefits:
- No external files
- State auto-deleted when pane closes
- Fast (in-memory)
Releasing a New Version
Update the version in pyproject.toml, then publish to PyPI:
uv build
uv publish
Both plugins use uvx which always fetches the latest version from PyPI.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_tmux_hop-0.1.6.tar.gz.
File metadata
- Download URL: claude_tmux_hop-0.1.6.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
540a73b16c3faefda98ade05fdc2c5bda096ae37d75a68356f0d53f379542f8f
|
|
| MD5 |
e796b083c4c27e030981db0218a9f068
|
|
| BLAKE2b-256 |
5d8a869ea0273e5087fa575246ce299569245bea76a71a81a947052976e3b22f
|
File details
Details for the file claude_tmux_hop-0.1.6-py3-none-any.whl.
File metadata
- Download URL: claude_tmux_hop-0.1.6-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3342d1eed308109a0a075f08315eca3898f23a05c36f349df165d90e90ef1396
|
|
| MD5 |
ada0c466802385c3788e7cb9006bbcf2
|
|
| BLAKE2b-256 |
720084138a468c5ad6a2244a26131337d957d997f3649453c58c8a098b25d925
|