Live
Black Hat USAAI BusinessBlack Hat AsiaAI BusinessGeopolitics, AI, and Cybersecurity: Insights From RSAC 2026Dark ReadingAdvanced Compact Patterns for Web3 DevelopersDEV CommunityA conversation on concentration of powerLessWrongDecoding the Black Box: LLM Observability with LangSmith & Helicone for Local ModelsDEV CommunityBest Free Snyk Alternatives for Vulnerability ScanningDEV CommunityKey AI, Cybersecurity, and Privacy Takeaways from the NAIC 2026 Spring Meeting - JD SupraGoogle News: AIAI LEGAL KEYNOTE SPEAKER & ARTIFICIAL INTELLIGENCE LAW FUTURIST FOR EVENTS - futuristsspeakers.comGNews AI legalGateway Capital announces first close of $25M Fund IITechCrunch AIBrazil’s machinery industry drives innovation in automation, AI, IoT and clean energy - The National Law ReviewGNews AI BrazilHow Cos. Can Navigate The Patchwork Of AI Safety Bills - Law360Google News: AI SafetyFailed AI tractor company lays off all employees, abandons Bay Area headquartersHacker News AI TopBest AI-Powered SaaS Product Ideas for 2026: 10 High-Growth NichesDEV CommunityBlack Hat USAAI BusinessBlack Hat AsiaAI BusinessGeopolitics, AI, and Cybersecurity: Insights From RSAC 2026Dark ReadingAdvanced Compact Patterns for Web3 DevelopersDEV CommunityA conversation on concentration of powerLessWrongDecoding the Black Box: LLM Observability with LangSmith & Helicone for Local ModelsDEV CommunityBest Free Snyk Alternatives for Vulnerability ScanningDEV CommunityKey AI, Cybersecurity, and Privacy Takeaways from the NAIC 2026 Spring Meeting - JD SupraGoogle News: AIAI LEGAL KEYNOTE SPEAKER & ARTIFICIAL INTELLIGENCE LAW FUTURIST FOR EVENTS - futuristsspeakers.comGNews AI legalGateway Capital announces first close of $25M Fund IITechCrunch AIBrazil’s machinery industry drives innovation in automation, AI, IoT and clean energy - The National Law ReviewGNews AI BrazilHow Cos. Can Navigate The Patchwork Of AI Safety Bills - Law360Google News: AI SafetyFailed AI tractor company lays off all employees, abandons Bay Area headquartersHacker News AI TopBest AI-Powered SaaS Product Ideas for 2026: 10 High-Growth NichesDEV Community
AI NEWS HUBbyEIGENVECTOREigenvector

I Built a macOS Terminal That Detects Your AI Coding Agents — Here's Why

DEV Communityby Said Arturo LopezApril 2, 20264 min read1 views
Source Quiz

<p>I've been writing Swift since 2015 and building macOS apps for most of my career. I always wanted to build a terminal — not because the world needed another one, but because a terminal emulator touches everything I find interesting: low-level input handling, GPU rendering, process management, and shell integration.</p> <p>For years, it stayed on my someday list. Then two things happened at the same time.</p> <p>In late 2024, <a href="https://ghostty.org" rel="noopener noreferrer">Ghostty</a> launched and open-sourced <strong>libghostty</strong> — a production-grade terminal rendering engine built on Metal. Suddenly, I didn't need to write a GPU renderer from scratch. The hardest part of building a terminal was solved.</p> <p>Around the same time, AI coding agents went from novelty to da

I've been writing Swift since 2015 and building macOS apps for most of my career. I always wanted to build a terminal — not because the world needed another one, but because a terminal emulator touches everything I find interesting: low-level input handling, GPU rendering, process management, and shell integration.

For years, it stayed on my someday list. Then two things happened at the same time.

In late 2024, Ghostty launched and open-sourced libghostty — a production-grade terminal rendering engine built on Metal. Suddenly, I didn't need to write a GPU renderer from scratch. The hardest part of building a terminal was solved.

Around the same time, AI coding agents went from novelty to daily workflow. Claude Code, Codex, Aider, Gemini CLI — I was running these tools for hours every day. And I kept hitting the same frustration:

  • Start a long task in Claude Code

  • Switch to another tab

  • Come back 10 minutes later

  • "Wait... did it finish? Is it waiting for me? Did it error out?"

Every terminal I used — iTerm2, Ghostty, Warp, Kitty — they all show you text. That's it. They have zero awareness of what's actually running inside them.

So I built Cocxy Terminal. A native macOS terminal built on libghostty that actually understands what your AI agents are doing.

It's open source, MIT licensed, zero telemetry, and not a business. I built it for my own workflow and decided to share it. If it helps you, great. If not, no hard feelings.

How It Works: 4-Layer Agent Detection

Cocxy watches your terminal through 4 independent detection layers. The key part: no agent cooperation needed. You don't install plugins in Claude or configure Codex. Cocxy figures it out on its own.

Layer 0 — Hook Integration Direct event stream from Claude Code's hook system. Real-time notifications for tool calls, completions, and errors.

Layer 1 — OSC Sequences Terminal escape sequences that agents emit for titles, directory changes, and prompt markers.

Layer 2 — Pattern Matching Configurable regex patterns that detect agent-specific output (thinking indicators, tool calls, progress markers).

Layer 3 — Timing Heuristics Statistical analysis of output patterns — long pauses followed by bursts indicate an agent is processing.

Each layer works independently. If one misses something, another catches it. The result: you see agent state (working, waiting, done, error) in the sidebar, tab bar, and notification system — without switching tabs.

What Else Is in There

Beyond agent detection, I built everything I wanted in my daily terminal:

GPU Rendering — Built on libghostty, the same Metal engine behind Ghostty. Smooth scrolling, crisp text, zero lag.

65 CLI Commands — Full scriptability via Unix socket:

Enter fullscreen mode

Exit fullscreen mode

Built-in Panels — Agent dashboard, event timeline, smart routing between sessions, embedded browser with DevTools, native macOS notifications with custom sounds.

Remote Workspaces — SSH multiplexing, port tunnels, SFTP browser, connection profiles. No extensions needed.

Zero Telemetry — No analytics. No PostHog. No Sentry. No crash reporting. Nothing leaves your machine. Verify it yourself — the code is all there.

The Stack

  • Swift + AppKit — native macOS, no Electron

  • libghostty — Metal-accelerated terminal rendering

  • Zero third-party dependencies — no npm, no Node, no external Swift packages

  • 3,053 tests across the codebase

Metric Value

CLI Commands 65

Tests 3,053

External Dependencies 0

Telemetry 0

License MIT

Try It

Homebrew:

Enter fullscreen mode

Exit fullscreen mode

Or download the DMG from cocxy.dev

Build from source:

Enter fullscreen mode

Exit fullscreen mode

Links

  • Website: cocxy.dev

  • GitHub: github.com/salp2403/cocxy-terminal

  • Docs: Getting Started

This is a solo project. No company, no funding, no team. Just a developer who needed a better terminal for working with AI agents and decided to share it.

If it solves a problem for you, I'd appreciate a star on GitHub or any feedback. If you find a bug or want to contribute, issues and PRs are open. And if it's not for you, that's totally fine too.

Thanks for reading.

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by Eigenvector · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

Knowledge Map

Knowledge Map
TopicsEntitiesSource
I Built a m…claudegeminilaunchopen sourceopen-sourceproductDEV Communi…

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Building knowledge graph…

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!