Terminal monitor for Claude Code sessions and subagents
Project description
ccmon
Terminal monitor for Claude Code sessions and subagents in real time. Run ccmon to watch your agents.
Features
- Real-time monitoring — watch subagent status, output, and activity as they run
- Session filtering — view agents from the current project, a specific project, or all projects
- Status tracking — running, completed, interrupted, or unknown states with visual indicators
- Auto-refresh — updates every 0.5 seconds without manual intervention
- Stale expiry — completed/interrupted agents are automatically removed after 10 minutes of inactivity
- Manager agent visibility — shows which specialised agent is currently running in manager-type agents
Requirements
- Python 3.11+
Install
Homebrew (macOS, recommended)
brew install einerlei/tap/ccmon
pipx (cross-platform)
pipx install ccmon
pip
pip install ccmon
Development setup
git clone https://github.com/einerlei/ccmon.git
cd ccmon
uv sync
uv run ccmon
Usage
ccmon
ccmon --project /path/to/project
ccmon --all
Key bindings
| Key | Action |
|---|---|
r |
Manual refresh |
q |
Quit |
Architecture
The monitor is a single-file Python application using the Textual TUI framework.
Data sources:
- Sessions:
~/.claude/sessions/*.json— contains PID, working directory, and session ID - Subagents:
~/.claude/projects/{project-dir}/{session-id}/subagents/— per-agent metadata and message logs
How it works:
- Loads active sessions from the sessions directory, filtering by project if specified
- For each live session, discovers subagents and reads their
.meta.json(metadata) and.jsonl(messages) - Infers agent status by analysing message history and checking process liveness
- Expires completed/interrupted agents after 10 minutes without activity
- Renders a two-column grid of agent panes with scrolling output
- Refreshes every 0.5 seconds to keep the view current
Development
# Install with dev dependencies
uv sync
# Run tests
uv run pytest -q
# Lint and format
uv run ruff check
uv run ruff format --check
# Run the monitor
ccmon
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -am 'Add feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
All code must pass ruff check and ruff format --check. Add tests for new functionality.
Changelog
See CHANGELOG.md
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 ccmon-0.5.6.tar.gz.
File metadata
- Download URL: ccmon-0.5.6.tar.gz
- Upload date:
- Size: 40.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ae3099b308aba92de76b89c65ea574901fa352c1a47fb82206198fd057cdaa8
|
|
| MD5 |
47c0d8f7899d5d877a0d7b8fae8ec7c6
|
|
| BLAKE2b-256 |
e291c2c2626cc19a9d572930842d5fbfce6f80f39821ce8aa3c8b1944662ab36
|
Provenance
The following attestation bundles were made for ccmon-0.5.6.tar.gz:
Publisher:
publish.yml on einerlei/ccmon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ccmon-0.5.6.tar.gz -
Subject digest:
9ae3099b308aba92de76b89c65ea574901fa352c1a47fb82206198fd057cdaa8 - Sigstore transparency entry: 1493425692
- Sigstore integration time:
-
Permalink:
einerlei/ccmon@c0f824cce71da5694bd970e7b20f6808bb6fe65a -
Branch / Tag:
refs/tags/v0.5.6 - Owner: https://github.com/einerlei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c0f824cce71da5694bd970e7b20f6808bb6fe65a -
Trigger Event:
push
-
Statement type:
File details
Details for the file ccmon-0.5.6-py3-none-any.whl.
File metadata
- Download URL: ccmon-0.5.6-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98f1e0e7bd7cdd73bf4ebe8b580830fbeb7afa50be5c7a1027ef2ac52c8c14a6
|
|
| MD5 |
89e2333f5a54617d67d558921dbe5db4
|
|
| BLAKE2b-256 |
bff61f5d0d3480637db06fb538361a7b77ceceec2c19febadc82df0babe7adf9
|
Provenance
The following attestation bundles were made for ccmon-0.5.6-py3-none-any.whl:
Publisher:
publish.yml on einerlei/ccmon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ccmon-0.5.6-py3-none-any.whl -
Subject digest:
98f1e0e7bd7cdd73bf4ebe8b580830fbeb7afa50be5c7a1027ef2ac52c8c14a6 - Sigstore transparency entry: 1493425837
- Sigstore integration time:
-
Permalink:
einerlei/ccmon@c0f824cce71da5694bd970e7b20f6808bb6fe65a -
Branch / Tag:
refs/tags/v0.5.6 - Owner: https://github.com/einerlei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c0f824cce71da5694bd970e7b20f6808bb6fe65a -
Trigger Event:
push
-
Statement type: