feat: add OpenCode + Codex desktop + Hermes Agent support - #1
feat: add OpenCode + Codex desktop + Hermes Agent support#1Leocarneiroo wants to merge 8 commits into
Conversation
Detects opencode processes via ps/lsof, reads sessions from SQLite (~/.local/share/opencode/opencode.db). Uses cwd-based liveness detection (same fallback pattern as Claude Code). - AgentKind.opencode added - ProcessDiscovery.isOpenCode() detects opencode binary - SessionScanner.scanOpenCode() queries SQLite for sessions - IndicatorView: purple ring animation for OpenCode - AppDelegate: state tracking + terminal-acknowledge support Known limitation: text extraction uses simple regex on JSON; nested quotes in messages may truncate snippets.
|
Thanks for the PR! Verified it compiles and runs, but a few things need fixing before this can be merged:
|
Codex desktop app (ChatGPT.app) runs without a terminal TTY. Previously, process detection required TTY != '??', so the desktop app was invisible to Agent Notch. Changes: - Remove unconditional TTY requirement; scope to Claude only - Codex/OpenCode without TTY: insert 'codex-desktop' sentinel - Sentinel bypasses lsof (unreliable at 0.2s for desktop apps with many open files) - scanCodex: sentinel marks all recent sessions live - --scan debug mode: handle sentinel correctly Desktop sessions detected via ps alone — no lsof dependency.
Detects hermes_cli, slash_worker, and Hermes.app processes. Uses sentinel pattern (hermes key) since all processes are background/headless with no TTY. Reads active sessions from ~/.hermes/state.db (ended_at IS NULL). - AgentKind.hermes with amber/gold ring indicator - isHermes() detects hermes_cli, slash_worker, Hermes.app - scanHermes() queries SQLite for active sessions - Full IndicatorView + AppDelegate state tracking
1. Rebase: restore batch lsof (lsofChunks) + 2.0s timeouts from upstream
(was accidentally reverted in our patches)
2. SQL fix: opencodeTailInfo strings used escaped backslash
'\\\(sessionID)' → '\(sessionID)' — queries now interpolate
3. isOpenCode: restrict to executable token only (first == 'opencode'
or hasSuffix('/opencode')), remove broad contains('/opencode')
- opencodeTailInfo: fix '\\\(sessionID)' → '\(sessionID)' so SQL
queries actually interpolate the session ID (were literal text before)
- isOpenCode: remove broad contains('/opencode') — only match on
executable token (first == 'opencode' or hasSuffix('/opencode'))
to avoid false positives on commands mentioning opencode paths
|
Thanks for the review! All three points addressed:
PR now at 5 commits, compiles clean on macOS 15.5 arm64, |
|
Great work on the agent orchestration approach! The OpenCode + Codex integration looks solid. I noticed this fits well with AI Agent workflow automation patterns — if you ever want automated testing, CI/CD integration, or multi-agent orchestration templates, check out agent-studio which covers exactly these use cases with n8n workflows and SKILL.md conventions. Keep building! 🚀 |
What
Adds 3 new agents to Agent Notch:
1. OpenCode
ps+lsof~/.local/share/opencode/opencode.db)2. Codex desktop app (ChatGPT.app)
codex-desktopbypasseslsof3. Hermes Agent
hermes_cli,slash_worker,Hermes.app~/.hermes/state.db(ended_at IS NULL)Current agent roster
~/.claude/projects/~/.codex/sessions/~/.local/share/opencode/opencode.db~/.hermes/state.dbTesting
--scanwith live processesDiff: ~250 insertions, ~15 deletions across 3 commits