I Built a macOS Terminal That Detects Your AI Coding Agents — Here's Why
<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:
cocxy hooks install # Configure Claude Code integration cocxy notify "Deploy complete" # Trigger notification cocxy window list # List all windows cocxy session save my-workspace # Save/restore sessions cocxy remote connect prod-web # SSH multiplexing cocxy capture-pane # Capture terminal content cocxy dashboard toggle # Agent dashboardcocxy hooks install # Configure Claude Code integration cocxy notify "Deploy complete" # Trigger notification cocxy window list # List all windows cocxy session save my-workspace # Save/restore sessions cocxy remote connect prod-web # SSH multiplexing cocxy capture-pane # Capture terminal content cocxy dashboard toggle # Agent dashboardEnter 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:
brew tap salp2403/tap brew install cocxybrew tap salp2403/tap brew install cocxyEnter fullscreen mode
Exit fullscreen mode
Or download the DMG from cocxy.dev
Build from source:
git clone https://github.com/salp2403/cocxy-terminal cd cocxy-terminal swift buildgit clone https://github.com/salp2403/cocxy-terminal cd cocxy-terminal swift buildEnter 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.
DEV Community
https://dev.to/gsalp/i-built-a-macos-terminal-that-detects-your-ai-coding-agents-heres-why-1ndSign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
claudegeminilaunch
Webhook Best Practices: Retry Logic, Idempotency, and Error Handling
<h1> Webhook Best Practices: Retry Logic, Idempotency, and Error Handling </h1> <p>Most webhook integrations fail silently. A handler returns 500, the provider retries a few times, then stops. Your system never processed the event and no one knows.</p> <p>Webhooks are not guaranteed delivery by default. How reliably your integration works depends almost entirely on how you write the receiver. This guide covers the patterns that make webhook handlers production-grade: proper retry handling, idempotency, error response codes, and queue-based processing.</p> <h2> Understand the Delivery Model </h2> <p>Before building handlers, understand what you are dealing with:</p> <ul> <li>Providers send webhook events as HTTP POST requests</li> <li>They expect a 2xx response within a timeout (typically 5

Building a scoring engine with pure TypeScript functions (no ML, no backend)
<p>We needed to score e-commerce products across multiple dimensions: quality, profitability, market conditions, and risk.</p> <p>The constraints:</p> <ul> <li>Scores must update in real time</li> <li>Must run entirely in the browser (Chrome extension)</li> <li>Must be explainable (not a black box)</li> </ul> <p>We almost built an ML pipeline — training data, model serving, APIs, everything.</p> <p>Then we asked a simple question:</p> <p><strong>Do we actually need machine learning for this?</strong></p> <p>The answer was no.</p> <p>We ended up building several scoring engines in pure TypeScript.<br> Each one is a single function, under 100 lines, zero dependencies, and runs in under a millisecond.</p> <h2> What "pure function" means here </h2> <p>Each scoring engine follows 3 rules:</p> <

Why AI Agents Need a Trust Layer (And How We Built One)
<p><em>What happens when AI agents need to prove they're reliable before anyone trusts them with real work?</em></p> <h2> The Problem No One's Talking About </h2> <p>Every week, a new AI agent framework drops. Autonomous agents that can write code, send emails, book flights, manage databases. The capabilities are incredible.</p> <p>But here's the question nobody's answering: <strong>how do you know which agent to trust?</strong></p> <p>Right now, hiring an AI agent feels like hiring a contractor with no references, no portfolio, and no track record. You're just... hoping it works. And when it doesn't, there's no accountability trail.</p> <p>We kept running into this building our own multi-agent systems:</p> <ul> <li>Agent A says it can handle email outreach. Can it? Who knows.</li> <li>Age
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Products

Webhook Best Practices: Retry Logic, Idempotency, and Error Handling
<h1> Webhook Best Practices: Retry Logic, Idempotency, and Error Handling </h1> <p>Most webhook integrations fail silently. A handler returns 500, the provider retries a few times, then stops. Your system never processed the event and no one knows.</p> <p>Webhooks are not guaranteed delivery by default. How reliably your integration works depends almost entirely on how you write the receiver. This guide covers the patterns that make webhook handlers production-grade: proper retry handling, idempotency, error response codes, and queue-based processing.</p> <h2> Understand the Delivery Model </h2> <p>Before building handlers, understand what you are dealing with:</p> <ul> <li>Providers send webhook events as HTTP POST requests</li> <li>They expect a 2xx response within a timeout (typically 5

🚀 I Vibecoded an AI Interview Simulator in 1 Hour using Gemini + Groq
<h1> 🚀 Skilla – Your AI Interview Simulator </h1> <h2> 💡 Inspiration </h2> <p>Interviews can be intimidating, especially without proper practice or feedback. Many students and job seekers don’t have access to real interview environments where they can build confidence and improve their answers.</p> <p>That’s why I built <strong>Skilla</strong> — an AI-powered interview simulator that helps users practice smarter, gain confidence, and improve their communication skills in a realistic way.</p> <h2> 🌐Live URL: <strong><a href="https://skilla-ai.streamlit.app" rel="noopener noreferrer">https://skilla-ai.streamlit.app</a></strong> </h2> <h2> 🤖 What It Does </h2> <p><strong>Skilla</strong> is a smart AI interview coach that:</p> <ul> <li>🎤 Simulates real interview scenarios </li> <li>🧠 Ask

Building a scoring engine with pure TypeScript functions (no ML, no backend)
<p>We needed to score e-commerce products across multiple dimensions: quality, profitability, market conditions, and risk.</p> <p>The constraints:</p> <ul> <li>Scores must update in real time</li> <li>Must run entirely in the browser (Chrome extension)</li> <li>Must be explainable (not a black box)</li> </ul> <p>We almost built an ML pipeline — training data, model serving, APIs, everything.</p> <p>Then we asked a simple question:</p> <p><strong>Do we actually need machine learning for this?</strong></p> <p>The answer was no.</p> <p>We ended up building several scoring engines in pure TypeScript.<br> Each one is a single function, under 100 lines, zero dependencies, and runs in under a millisecond.</p> <h2> What "pure function" means here </h2> <p>Each scoring engine follows 3 rules:</p> <

Why AI Agents Need a Trust Layer (And How We Built One)
<p><em>What happens when AI agents need to prove they're reliable before anyone trusts them with real work?</em></p> <h2> The Problem No One's Talking About </h2> <p>Every week, a new AI agent framework drops. Autonomous agents that can write code, send emails, book flights, manage databases. The capabilities are incredible.</p> <p>But here's the question nobody's answering: <strong>how do you know which agent to trust?</strong></p> <p>Right now, hiring an AI agent feels like hiring a contractor with no references, no portfolio, and no track record. You're just... hoping it works. And when it doesn't, there's no accountability trail.</p> <p>We kept running into this building our own multi-agent systems:</p> <ul> <li>Agent A says it can handle email outreach. Can it? Who knows.</li> <li>Age

Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!