Skip to main content

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:

  1. Loads active sessions from the sessions directory, filtering by project if specified
  2. For each live session, discovers subagents and reads their .meta.json (metadata) and .jsonl (messages)
  3. Infers agent status by analysing message history and checking process liveness
  4. Expires completed/interrupted agents after 10 minutes without activity
  5. Renders a two-column grid of agent panes with scrolling output
  6. 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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -am 'Add feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccmon-0.5.6.tar.gz (40.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccmon-0.5.6-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

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

Hashes for ccmon-0.5.6.tar.gz
Algorithm Hash digest
SHA256 9ae3099b308aba92de76b89c65ea574901fa352c1a47fb82206198fd057cdaa8
MD5 47c0d8f7899d5d877a0d7b8fae8ec7c6
BLAKE2b-256 e291c2c2626cc19a9d572930842d5fbfce6f80f39821ce8aa3c8b1944662ab36

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccmon-0.5.6.tar.gz:

Publisher: publish.yml on einerlei/ccmon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ccmon-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 98f1e0e7bd7cdd73bf4ebe8b580830fbeb7afa50be5c7a1027ef2ac52c8c14a6
MD5 89e2333f5a54617d67d558921dbe5db4
BLAKE2b-256 bff61f5d0d3480637db06fb538361a7b77ceceec2c19febadc82df0babe7adf9

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccmon-0.5.6-py3-none-any.whl:

Publisher: publish.yml on einerlei/ccmon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page