This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Codex job count helper for Claude Code statusline | |
| # ============================================================================ | |
| # Returns count of currently-running Codex jobs (in_progress / running / | |
| # pending). Echoes integer (0 = nothing running) or empty on error. | |
| # | |
| # Cache: 5-sec TTL via /tmp/.codex_jobs_count to avoid heavy spawn cost | |
| # on every statusline refresh. Statusline calls this every prompt; without | |
| # cache, codex-companion.mjs spawn (~50ms) compounds into noticeable lag. | |
| # |