Skip to content
ATAI Today Brief
HomeNewsConceptsGuidesToolbox
AboutSubscribeUA
Subscribe

AI Today Brief

The daily AI-engineering brief. Built in public. EN · UA.

XTelegramLinkedInYouTubeRSS
NewsConceptsGuidesSubscribeAdvertiseAboutEditorial policyAI disclosurePrivacyTerms

© 2026 AI Today Brief. All rights reserved.

  1. Home/
  2. News/
  3. Tools & releases/
  4. CTOP: Terminal Monitor for Claude Code and AI Agent Sessions
Tools & releases

CTOP: Terminal Monitor for Claude Code and AI Agent Sessions

July 4, 2026· 7 min read
OKCurated by Oleksandr Kuzmenko, AI Product Engineer·Updated July 4, 2026·Sources cited on every story
AI-assisted · editor-reviewed·How we use AI
CTOP: Terminal Monitor for Claude Code and AI Agent Sessions

Monitor your local Claude Code, Codex CLI, OpenCode, and Devin agent sessions with CTOP, an interactive terminal dashboard. It tracks real-time CPU, memory, token usage, context window, and API costs in a single pane.

Impact: Medium

Why it matters

AI coding agents run heavy multi-step loops in the background. CTOP brings htop-like observability to AI developers, preventing runaway loops and surprise API bills.

TL;DR

  • 01CTOP acts as an htop equivalent specifically tailored for monitoring AI coding agents like Claude Code, Codex CLI, OpenCode, and Devin.
  • 02It displays live terminal diagnostics including CPU, memory, token usage, context window segments, and estimated API expenses.
  • 03Supports a native Claude Code skill that allows autonomous agents to programmatically query their own active session telemetry.

Key facts

Supported Agents
Claude Code, Codex CLI, OpenCode, Devin
Installation
brew tap aakashadesara/ctop && brew install ctop-claude, or manual git clone
OS Support
macOS, Linux, Windows (PowerShell)
Dependencies
sqlite3 (for OpenCode/Devin)

Terminal Dashboard for Agent Telemetry

ctop solves the visibility problem of running background AI agents. When running multiple iterative sessions of Claude Code, Codex CLI, OpenCode, or Devin, keeping track of active context windows and API spend is challenging. The tool reads process information from ps (or PowerShell on Windows) and matches active processes with local metadata and database entries from Claude (~/.claude/projects/), Codex (~/.codex/sessions/), OpenCode (~/.local/share/opencode/), or Devin (~/.local/share/devin/cli/).

The dashboard provides a visual breakdown of the context window, highlighting free, input, output, and cached segments. It also estimates per-session and aggregate API costs, preventing surprise bills from runaway agent loops.

Autonomous Agent Self-Introspection

You can install a native skill in Claude Code to let your agent query its own metrics. By copying the ctop skill into your projects, the agent can use the CLI mode under the hood.

mkdir -p ~/.claude/skills && cp -r skills/ctop ~/.claude/skills/

Once installed, you can ask Claude Code: "how much has this session cost?" or "is my context about to compact?". The agent will execute CLI commands like ctop whoami or ctop stats to analyze its state and optimize its prompt strategy.

Session Control and CLI Automation

The tool offers list and card-grid views, live log streaming, and process controls. Developers can search and filter sessions by directory or branch, pin active sessions, and safely terminate hanging agents via SIGTERM. For scripting, ctop ls --json exports machine-readable metrics, enabling you to build automated scripts that detect when an agent's context window is running low (e.g. less than 15% free capacity) to prompt a /compact command.

Try it in 2 minutes

brew tap aakashadesara/ctop && brew install ctop-claude

bash

✓ When to use

  • When running multi-agent workflows or long background agent tasks where you want to monitor context window consumption and avoid API billing surprises.

✕ When NOT to use

  • If you do not run local terminal-based AI agents like Claude Code or Codex CLI.

What to do today

  • →Install CTOP using Homebrew: brew tap aakashadesara/ctop && brew install ctop-claude
  • →Integrate the ctop skill into your Claude Code projects directory to enable agent self-introspection
#ctop#Claude Code#Codex CLI#OpenCode#Devin

Sources

  • CTOP GitHub Repository
ShareShare on XShare on LinkedIn
← Previous storyClaude Fable Demonstrates Autonomous Tool Creation in Terminal

Related stories

  • Tools & releasesStrix: Open-source AI penetration testing tool finds and patches vulnerabilities
  • Tools & releasesAlibaba Open-Sources Page Agent for Direct Client-Side Document Object Model Web Automation
  • Tools & releasesDESIGN.md Format Specification to Document Design Systems for AI Agents
  • Tools & releasesAnthropic Redeploys Claude Fable 5 Globally with Toughened Cybersecurity Classifiers

Email digest

Get the morning AI brief

One email a day — the stories that matter for engineers, founders and tech leads. Human-edited, with links to primary sources.

  • ✓120+ sources scanned daily
  • ✓Edited by a human
  • ✓1 email per day
  • ✓EN + UA

By subscribing you agree to the privacy policy.