TUI manager for Claude Code sessions and Remote Control
Project description
cc-session-control
tmux-first TUI and headless CLI for Claude Code sessions, background agents, and Remote Control.
CLI command: csctl
Features
- Sessions Tab — View, resume (tmux-first:
Enterresumes into the per-project tmux window;tbare-terminal fallback;Rbackgrounds into tmux; ⧉ marks tmux-resident sessions), terminate, and delete Claude Code sessions across all projects; a cleanup submenu (c) prunes empty/short sessions and sweeps orphan artifact directories, zombie session files, and aged global entries - Projects Tab — The startup tab: start a new tmux claude session in a project dir (
Enter), start/stop RC servers per project (o/s), toggle per-project auto Remote Control (c), show running/stopped/dead states - Background agents Tab — List background agent jobs; take over, respawn, watch their timeline, stop, or remove them
Built with urwid.
UI language: Simplified Chinese (notifications and status text). CLI output is in English.
Requirements
- Python 3.12+
- Claude Code CLI installed and authenticated
- tmux (the primary session-lifecycle carrier: launch, resume, background, and survive terminal/SSH disconnects; managed Remote Control servers also use it)
- Linux / WSL (macOS support is partial —
/proc-based liveness detection is Linux-only)
Installation
Install the latest published release:
uv tool install cc-session-control
# or
pipx install cc-session-control
Upgrade later with uv tool upgrade cc-session-control (or pipx upgrade cc-session-control).
Latest master build
To try the newest master before it is released, install from GitHub:
uv tool install --reinstall git+https://github.com/dzshzx/cc-session-control.git
csctl manages the Claude Code state on the machine where it is installed: the
local ~/.claude, local tmux, and the projects recorded in the local
~/.claude.json. Install it separately on each machine whose sessions you want
to manage. For working on the code
instead of using it, see CONTRIBUTING.md.
Usage
The TUI is the primary surface — Remote Control management and session
cleanup live there (Projects tab and the Sessions cleanup submenu). The
headless CLI keeps only the agent-facing commands: resume and agents.
# Open TUI
csctl
# Resume rescue (headless): list sessions across directories with
# ready-to-copy resume commands (native /resume only searches the cwd
# and hides sdk-ts/bridge sessions)
csctl resume # Page 1, 20 per page
csctl resume mybug # Keyword: sid/cwd/title, then transcript body
csctl resume --page 2 # Next page
csctl resume --all # Everything, no paging
# Read-only inventory
csctl agents # Background agents: state, tempo, name, cwd
# Options
csctl --theme light # Force the TUI palette (auto/dark/light)
csctl --version
The companion Claude Code skill (claude-session-doctor) is distributed via
the skills CLI — install it with
skills add dzshzx/agent-skills --skill=claude-session-doctor (it is no
longer bundled with this package).
Configuration
| Environment Variable | Default | Description |
|---|---|---|
CSCTL_RC_SESSION |
rc |
tmux session name for RC servers |
CSCTL_CLEANUP_AGE_DAYS |
14 |
Minimum age in days for the age sweep in the Sessions cleanup submenu (must be an integer ≥ 0) |
CSCTL_THEME |
auto |
TUI palette: auto (detect the terminal background via $COLORFGBG, else dark) / dark / light. Most terminals (including tmux) don't set $COLORFGBG, so auto falls back to dark — set this (or --theme) explicitly for a light terminal |
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 cc_session_control-0.8.0.tar.gz.
File metadata
- Download URL: cc_session_control-0.8.0.tar.gz
- Upload date:
- Size: 189.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d31a45e2b4bc808b0c40837b72bf8860b9ffe2bfbd6655b89fcc63ea44c31d2d
|
|
| MD5 |
58797c43adae725e51ffbeee00e471e0
|
|
| BLAKE2b-256 |
ceda2f4e0fa3a87a6015e341dbb9f8210ead25ef626abea4d98239510f2ed8d3
|
Provenance
The following attestation bundles were made for cc_session_control-0.8.0.tar.gz:
Publisher:
release.yml on dzshzx/cc-session-control
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cc_session_control-0.8.0.tar.gz -
Subject digest:
d31a45e2b4bc808b0c40837b72bf8860b9ffe2bfbd6655b89fcc63ea44c31d2d - Sigstore transparency entry: 2289383822
- Sigstore integration time:
-
Permalink:
dzshzx/cc-session-control@5b6f4d9751e3ac33ea4c9650e3cdce1c3f367fd8 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/dzshzx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5b6f4d9751e3ac33ea4c9650e3cdce1c3f367fd8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cc_session_control-0.8.0-py3-none-any.whl.
File metadata
- Download URL: cc_session_control-0.8.0-py3-none-any.whl
- Upload date:
- Size: 118.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da57eba255db270e2792844211e77b8eea3732e67dc8195dd2c528d46ae2d1e4
|
|
| MD5 |
76845e7f8961b7993ceb6a7c504cd8c0
|
|
| BLAKE2b-256 |
78eff8364e6d1dfb0d145d5abbfb87d8aee41055398ba2e4580a8ada0c4fb456
|
Provenance
The following attestation bundles were made for cc_session_control-0.8.0-py3-none-any.whl:
Publisher:
release.yml on dzshzx/cc-session-control
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cc_session_control-0.8.0-py3-none-any.whl -
Subject digest:
da57eba255db270e2792844211e77b8eea3732e67dc8195dd2c528d46ae2d1e4 - Sigstore transparency entry: 2289383923
- Sigstore integration time:
-
Permalink:
dzshzx/cc-session-control@5b6f4d9751e3ac33ea4c9650e3cdce1c3f367fd8 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/dzshzx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5b6f4d9751e3ac33ea4c9650e3cdce1c3f367fd8 -
Trigger Event:
push
-
Statement type: