You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a974463
Browse filesBrowse the repository at this point in the historyBrowse files
Codex CLI support: session-log adapter and tmux output
No agent CLI other than Claude Code lets you supply the status line as a
command. Verified rather than assumed: Codex 0.146's tui.status_line takes a
fixed list of built-in item ids (openai/codex#20244, #17827), opencode 1.17 has
no statusLine anywhere in its shipped config schema or its 130MB bundle (the
proposal is anomalyco/opencode#30295, and a search summary claiming it shipped
is wrong), Hermes documents its bar as fixed, and the installed Cursor CLI
binary contains no statusline strings at all.
Codex does not need a hook. It already writes what matters to
~/.codex/sessions/<date>/rollout-*.jsonl: token_count records carrying
last_token_usage, cached_input_tokens and model_context_window, plus rate_limits
with used_percent, window_minutes and resets_at. codex_payload() translates
those into the same shape Claude Code pipes in, so nothing downstream changes,
and --tmux renders it into the tmux status bar instead of Codex's own.
main() split into argument handling plus build_line(payload), which is what
makes a second harness possible at all. The cache segment now prefers numbers
an adapter supplies, since only Claude Code has a transcript to derive them
from. to_tmux() rewrites SGR colours as tmux formats, doubles literal '#'
(tmux reads it as the start of a format) and strips hyperlinks.
Cost and lines changed are omitted for Codex because Codex does not record
them; better a missing segment than an invented number.
Two bugs the installer only revealed when run: --print fetched and overwrote
glint.py before previewing (it clobbered a working copy once), and the tmux
value nested double quotes inside a double-quoted string, which ended it
mid-path. --print is now a true dry run and the inner path is single-quoted.
88 tests.
Co-Authored-By: Claude Code <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -188,6 +188,42 @@ Treat them as defaults, not doctrine: `GLINT_REST_NUDGE=40` moves the whole ladd
188
188
-**Python 3.8+** (standard library only: no `pip install`)
189
189
-**git** (optional; the branch segment simply hides without it)
190
190
191
+
## Other harnesses (Codex CLI)
192
+
193
+
Claude Code is currently the only agent CLI that lets you supply the status line as a command. Verified in August 2026:
194
+
195
+
| Harness | Status line | External command hook |
196
+
|---------|-------------|-----------------------|
197
+
| Claude Code |`statusLine.command`, session JSON on stdin |**yes**|
198
+
| Codex CLI 0.146 | built-in `tui.status_line`, a fixed set of item ids | no ([#20244](https://github.com/openai/codex/issues/20244), [#17827](https://github.com/openai/codex/issues/17827)) |
199
+
| opencode 1.17 | built-in TUI bar | no ([#30295](https://github.com/anomalyco/opencode/issues/30295) is a proposal; `statusLine` appears nowhere in the shipped config schema) |
200
+
| Hermes Agent | built-in bar, width-adaptive | no |
201
+
| Cursor CLI | - | no |
202
+
203
+
Codex does not need a hook, though, because it already writes everything worth showing to `~/.codex/sessions/<date>/rollout-*.jsonl`. glint reads that and renders into your **tmux status bar** instead of Codex's own:
Use `--print` first to see the tmux block and a live preview without changing anything. The installer keeps a marked, idempotent block in `~/.tmux.conf`, so re-running refreshes it rather than stacking copies, and it leaves the rest of your config alone.
214
+
215
+
What you get and what you do not:
216
+
217
+
-**Works**: model with reasoning effort, context against the real `model_context_window`, cached share of the last turn, quota windows with reset ETAs and the pace marker, plus everything that never needed the harness (directory, git, break, hydration).
218
+
-**Missing**: session cost and lines changed. Codex does not record them, and glint would rather omit a segment than invent one.
219
+
- Quota is bucketed by the window length Codex reports (`window_minutes`), so a 300 minute window shows as `⏱5h` and 10080 as `📅7d`.
220
+
221
+
For any other tool, the harness-independent half still works next to it, including in a plain shell:
222
+
223
+
```bash
224
+
python3 ~/.claude/glint.py --harness codex --tmux # or drop --harness for stdin JSON
225
+
```
226
+
191
227
## Upgrading
192
228
193
229
Re-run the installer: it overwrites `~/.claude/glint.py` and leaves your settings alone:
0 commit comments