Small wrapper for developers with too many Codex sessions. Runs Codex
(optionally with --yolo) and updates your terminal tab title while it works.
Default titles (configurable):
| State | Tab title |
|---|---|
| New session | codex:new |
| Working | codex:running... |
| Done with a commit | codex:✅ |
| Done but maybe stuck (no commit) | codex:🚧 |
Works by watching Codex session logs in ~/.codex/sessions/... and uses the
last recorded turn to seed the initial title when resuming with --resume or
--last.
One‑liner:
curl -fsSL https://raw.githubusercontent.com/tmustier/codex-title/main/install.sh | bashOptional flags:
# Add PATH line if needed
curl -fsSL https://raw.githubusercontent.com/tmustier/codex-title/main/install.sh | bash -s -- --add-path
# Add aliases (codex + cyolo)
curl -fsSL https://raw.githubusercontent.com/tmustier/codex-title/main/install.sh | bash -s -- --aliasHomebrew:
brew tap tmustier/tap
brew install codex-titleuv:
uv tool install git+https://github.com/tmustier/codex-titlecodex-title
# Pass Codex args
codex-title -- --resume --last
# Follow resume signals across tabs (may sync titles across sessions)
codex-title --follow-global-resume -- --resume
# Launch with full‑auto (Codex bypass flag)
codex-title --yolo
# Show the resolved title and log path without changing the tab title
codex-title --statusCustomize titles:
codex-title --new-title 'codex:new' --running-title 'codex:thinking' --done-title 'codex:done'Commit-aware done title (override the default):
codex-title --no-commit-title 'codex:🚧'Config file (optional):
~/.config/codex-title/config.env
new_title=codex:new
running_title=codex:thinking
done_title=codex:done
no_commit_title=codex:🚧
alias_codex=codex
alias_cyolo=cyolo
Pass a different config file:
codex-title --config ~/my-codex-title.envEnvironment overrides (take precedence over config):
CODEX_TITLE_CONFIG(config file path)CODEX_TITLE_NEW_TITLECODEX_TITLE_RUNNING_TITLECODEX_TITLE_DONE_TITLECODEX_TITLE_NO_COMMIT_TITLECODEX_TITLE_IDLE_DONE_SECS(idle seconds before treating a tool-only turn as done; default15; set0to disable)CODEX_TITLE_CLOCK_SKEW_SECS(tolerated log timestamp skew in seconds; set0to disable)CODEX_TITLE_PID_LOG_TIMEOUT_SECS(seconds to use fast PID-based log detection before falling back to slower polling; set0to disable; requireslsof)CODEX_TITLE_PID_SWITCH_INTERVAL(seconds between PID log checks while running; defaults to1.0)CODEX_TITLE_FOLLOW_GLOBAL_RESUME(set to1to follow resume signals from other tabs/sessions)CODEX_TITLE_ALIAS_CODEX(for install.sh --alias)CODEX_TITLE_ALIAS_CYOLO(for install.sh --alias)CODEX_TITLE_LOG_PATH(set to an empty string to disable the debug log)
CLI flags override both env and config values.
When no_commit_title is non-empty, the wrapper treats a turn as committed if it
sees a successful git commit in the Codex tool logs for that turn, or if the git
HEAD changed in the current working directory. Otherwise it uses no_commit_title.
This includes git -C /path/to/repo commit ... commands run by Codex.
Recommended:
alias codex='codex-title'
alias cyolo='codex-title --yolo'To customize alias names for install.sh --alias, set alias_codex and
alias_cyolo in the config file (or use the env vars above).
Codex writes JSONL session logs under ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl.
This wrapper tails the newest log and flips the tab title when it sees:
- User message begins processing -> running
- Assistant message (or aborted turn) -> done
- If no assistant message arrives, mark done after the log has been idle for a short period (default 15s; tuned to preserve quick notifications while tolerating long gaps between tool calls/text output)
- If
no_commit_titleis non-empty, show it when no commit happened in the last turn - By default,
--resume/--lastonly affects initial log selection; later resume switches only happen after you issue/resumein the same session (useCODEX_TITLE_FOLLOW_GLOBAL_RESUME=1or--follow-global-resumeto opt in globally) - Log timestamp checks allow for moderate clock skew (default 300s)
- When available, the Codex PID is used to bind to the active log (via
lsof) for per-tab isolation
Implementation details and the resume-fix timeline live in docs/implementation.md.
Note: codex-title --status uses the global TUI log to pick a log path and may
not reflect the current tab's binding.
curl -fsSL https://raw.githubusercontent.com/tmustier/codex-title/main/uninstall.sh | bashMIT
See CHANGELOG.md.