$ show Yeachan-Heo/oh-my-codex
oh-my-codex is a multi-agent orchestration CLI tool extending OpenAI Codex with team coordination, workflow automation, and persistent infrastructure. It provides a command-line interface (omx) and a suite of native Rust binaries for tasks like tmux session management (omx-mux), command family execution (omx-sparkshell), and runtime replay (omx-runtime-core). The system orchestrates AI agents through states (autopilot, ralph, team, ultragoal), manages tmux-isolated worker panes, maintains a persistent wiki knowledge base with full-text query and linting, dispatches lifecycle notifications to Discord/Telegram/webhooks, and includes a hook plugin system with an SDK for implementing custom event handlers. It also features a VSCode extension for session management and a mission-driven research workflow (autoresearch) that executes evaluator-gated experiments. Architecturally, it is a hybrid Node.js CLI application with Rust sidecar binaries. The TypeScript core (src/) implements the CLI, state machines, team coordination, MCP servers, notification engine, and extensibility framework. Rust crates provide low-level tmux interaction, command execution with language-specific registries, and a replay-capable runtime core. The system integrates deeply with Codex CLI through native hooks and plugin marketplace, and supports platform-specific behavior for macOS, Linux, and Windows. The codebase is heavily tested (hundreds of unit/integration/contract tests), uses atomic file operations for state persistence, and employs file-based locking with heartbeat for cross-process coordination. While primarily an application, it includes a small data/research component: playground demos for Bayesian optimization and ML model tuning, and the autoresearch mission framework with evaluator scripts. However, these are peripheral to the main orchestration purpose. The repository demonstrates strong engineering practices with modular design, dependency injection for testability, and clear separation of concerns across systems (auth, adapters, notifications, team state, hooks, MCP). It is actively maintained with frequent releases and extensive QA documentation.
The LLM identified 6 files worth highlighting for reuse:
Provides a factory function `createHookPluginSdk` that exposes a scoped API surface (tmux, log, state, omx) to hook plugins. Isolates plugins from internal implementation, supports cross-process communication via subprocess IPC, and is fully testable. Demonstrates clear separation of concerns and would be extractable for any plugin system.
Implements `redactAuthSecrets` to strip sensitive patterns (Bearer tokens, Authorization headers, API keys) from strings and objects using configurable regex patterns and recursive traversal. Handles edge cases like partial matches, JSON string safety, and caps replacement length. A self-contained utility reusable in any CLI or logging system.
Exports `runAndCapture` and `spawnProcessTree` with configurable timeout, output size limits, process count limits, and parent-exit cleanup (SIGKILL on spawner exit). Handles cross-platform command resolution (PATHEXT, cmd.exe on Windows) and supports stdin passthrough. A robust, production-grade process runner reusable in any Node.js CLI tool.
Implements capabilities lockfile: builds an observed tool-call inventory against expected tool usage, then checks preflight for missing arguments, hallucinated tools, and tool-restraint violations. Uses atomic file operations for lockfile persistence and supports env-based bypass. Demonstrates a novel pattern for validating AI agent tool usage.
Implements file-based distributed locks with heartbeat (periodic file update), stale recovery (TTL-based), and multiple lock types (scaling, membership, task-claim, mailbox). Uses atomic writes with release via process exit or explicit unlock. A production-grade cross-process locking library extractable for any Node.js application needing coordination without a centralized service.
Exports `safeJsonParse` (with type parameter) and `safeReadJsonFile` that return typed results with fallback defaults, avoiding try-catch boilerplate. Handles file read errors, invalid JSON, and provides deterministic defaults. A small but essential utility that improves code robustness, reusable in any TypeScript project.