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+
  • Poetry

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
poetry install
poetry 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
poetry install

# Run tests
poetry run pytest -q

# Lint and format
poetry run ruff check
poetry 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.5.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.5-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file ccmon-0.5.5.tar.gz.

File metadata

  • Download URL: ccmon-0.5.5.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.5.tar.gz
Algorithm Hash digest
SHA256 da9963f1726b6140ffbc3bc1486d3fa037fb2ef60052349243a4198034b2f1be
MD5 9a5bd8daea7b3d41e64c3f9fc3822e19
BLAKE2b-256 32b457e9bb285a37f2c07f3fe71162e313b86dab046aefca6f08c7335d6e5f96

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccmon-0.5.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: ccmon-0.5.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d08c4deb2946a21d8ee440ff1aa51b2127723af3627cea731da15b3c5bd0dbca
MD5 7dfb2c179b5b691828ae9a152d001ab7
BLAKE2b-256 61bdedb51c590ad3fa9b0aa75990f49e87e09b182f3e57b6e08e7fbfbc16e4a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccmon-0.5.5-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