Skip to content

Commit 0dc0e9a

Browse files
authored
Merge pull request #17 from iamgp/feat/add-codex-support
Add Codex support
2 parents 4a85b63 + 1bb2671 commit 0dc0e9a

10 files changed

Lines changed: 623 additions & 12 deletions

File tree

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
![License: MIT](https://img.shields.io/badge/license-MIT-blue)
55
[![Product Hunt](https://img.shields.io/badge/Product%20Hunt-Launch-ff6154?logo=producthunt&logoColor=white)](https://www.producthunt.com/products/lazy-agent)
66

7-
A terminal UI, macOS menu bar app, and HTTP API for monitoring all your coding agents — [Claude Code](https://claude.ai/code), [Cursor](https://cursor.com/), [pi](https://github.com/badlogic/pi-mono), and [OpenCode](https://opencode.ai/) — from a single place. No lock-in, no server, purely observational.
7+
A terminal UI, macOS menu bar app, and HTTP API for monitoring all your coding agents — [Claude Code](https://claude.ai/code), [Cursor](https://cursor.com/), [Codex](https://developers.openai.com/codex/), [pi](https://github.com/badlogic/pi-mono), and [OpenCode](https://opencode.ai/) — from a single place. No lock-in, no server, purely observational.
88

99
Inspired by [lazygit](https://github.com/jesseduffield/lazygit), [lazyworktree](https://github.com/chmouel/lazyworktree), and [pixel-agents](https://github.com/pablodelucca/pixel-agents).
1010

@@ -33,10 +33,11 @@ lazyagent watches session data from coding agents to determine what each session
3333
- **Claude Code CLI** — reads JSONL from `~/.claude/projects/*/`
3434
- **Claude Code Desktop** — same JSONL files, enriched with session metadata (title, permissions) from `~/Library/Application Support/Claude/claude-code-sessions/`
3535
- **Cursor** — reads SQLite from `~/Library/Application Support/Cursor/User/globalStorage/state.vscdb`
36+
- **Codex CLI** — reads JSONL from `~/.codex/sessions/YYYY/MM/DD/*.jsonl`
3637
- **pi coding agent** — reads JSONL from `~/.pi/agent/sessions/*/`
3738
- **OpenCode** — reads SQLite from `~/.local/share/opencode/opencode.db`
3839

39-
Use `--agent claude`, `--agent pi`, `--agent opencode`, `--agent cursor`, or `--agent all` (default) to control which agents are monitored. Agents can also be enabled/disabled in the config file. Pi sessions are marked with a **π** prefix, Cursor with **C**, OpenCode with **O**, and Desktop sessions with a **D** prefix in the session list.
40+
Use `--agent claude`, `--agent pi`, `--agent opencode`, `--agent cursor`, `--agent codex`, or `--agent all` (default) to control which agents are monitored. Agents can also be enabled/disabled in the config file. Pi sessions are marked with a **π** prefix, Cursor with **C**, Codex with **X**, OpenCode with **O**, and Desktop sessions with a **D** prefix in the session list.
4041

4142
From the JSONL stream it detects activity states with color-coded labels:
4243

@@ -119,6 +120,7 @@ lazyagent --agent claude Monitor only Claude Code sessions
119120
lazyagent --agent pi Monitor only pi coding agent sessions
120121
lazyagent --agent opencode Monitor only OpenCode sessions
121122
lazyagent --agent cursor Monitor only Cursor sessions
123+
lazyagent --agent codex Monitor only Codex CLI sessions
122124
lazyagent --agent all Monitor all agents (default)
123125
lazyagent --api Start the HTTP API (http://127.0.0.1:7421)
124126
lazyagent --api --host :8080 Start the HTTP API on a custom address
@@ -234,6 +236,7 @@ lazyagent reads `~/.config/lazyagent/config.json` (created automatically with de
234236
"notify_after_sec": 30,
235237
"agents": {
236238
"claude": true,
239+
"codex": true,
237240
"cursor": true,
238241
"opencode": true,
239242
"pi": true
@@ -260,9 +263,10 @@ lazyagent/
260263
├── main.go # Entry point: dispatches --tui / --tray / --api / --agent
261264
├── internal/
262265
│ ├── core/ # Shared: watcher, activity, session, config, helpers
263-
│ │ └── provider.go # SessionProvider interface + Multi/Live/Pi/OpenCode/Cursor providers
266+
│ │ └── provider.go # SessionProvider interface + Multi/Live/Pi/OpenCode/Cursor/Codex providers
264267
│ ├── model/ # Shared types (Session, ToolCall, etc.)
265268
│ ├── claude/ # Claude Code JSONL parsing, desktop metadata, session discovery
269+
│ ├── codex/ # Codex CLI JSONL parsing and session discovery
266270
│ ├── cursor/ # Cursor IDE session discovery from state.vscdb
267271
│ ├── pi/ # pi coding agent JSONL parsing, session discovery
268272
│ ├── opencode/ # OpenCode SQLite parsing, session discovery

frontend/src/lib/SessionDetail.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
<dl class="grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5 text-[12px]">
120120
{#if detail.agent}
121121
<dt class="text-subtext">Agent</dt>
122-
<dd class="text-text">{detail.agent === "pi" ? "π pi" : detail.agent}</dd>
122+
<dd class="text-text">{detail.agent === "pi" ? "π pi" : detail.agent === "codex" ? "X codex" : detail.agent}</dd>
123123
{/if}
124124
{#if detail.source === "desktop"}
125125
<dt class="text-subtext">Source</dt>
@@ -135,6 +135,9 @@
135135
{:else if detail.agent === "claude"}
136136
<dt class="text-subtext">Source</dt>
137137
<dd class="text-text">CLI</dd>
138+
{:else if detail.agent === "codex"}
139+
<dt class="text-subtext">Source</dt>
140+
<dd class="text-text">Codex CLI</dd>
138141
{/if}
139142
{#if detail.model}
140143
<dt class="text-subtext">Model</dt>

frontend/src/lib/SessionList.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
{#if session.agent === "pi"}<span class="text-activity-spawning">π</span>
102102
{:else if session.agent === "opencode"}<span class="text-subtext">O</span>
103103
{:else if session.agent === "cursor"}<span class="text-subtext">C</span>
104+
{:else if session.agent === "codex"}<span class="text-subtext">X</span>
104105
{:else if session.source === "desktop"}<span class="text-accent">D</span>
105106
{/if}
106107
{session.customName || session.agentName || session.shortName}

0 commit comments

Comments
 (0)