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.4.tar.gz (40.3 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.4-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ccmon-0.5.4.tar.gz
  • Upload date:
  • Size: 40.3 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.4.tar.gz
Algorithm Hash digest
SHA256 f0959d26208a2f9cc7ae054a1f0db8bf0a523beaeeed5ce5ba1bfc3fb8a57a35
MD5 99dcfa5a6a83b752eced50530240f4bb
BLAKE2b-256 b990d2b9213d8a5f82df692eacd3a288e8f7ca37f78e2985e5161775965902ff

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ccmon-0.5.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 854a2b596cb7cc32bc0c5def419b367becf2df71000eb3baa539bcb1d2e77193
MD5 2359c5c77be08ec4f9c80382ac4ca72d
BLAKE2b-256 04778d96220b63def8391f5b0bb16adf47ba965d3b9893fd1918a1ef166b501e

See more details on using hashes here.

Provenance

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