feat(): codex parity with claude code session information#74
Merged
Conversation
hiskudin
approved these changes
Jun 8, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings Codex to parity with Claude Code for session info + notifications in StackNudge. Codex sessions now show live context-window usage in the Sessions tab (e.g.
26K · gpt-5.5) and get context-fill alerts, permission prompts surface the tool/command, and Codex is auto-wired by the shell installer to match the macOS first-launch wizard. Also fixes an installer venv crash and abuild.shsource-list gap.Changes
Codex context-window usage (Sessions tab)
panel/CodexTranscriptStats.swift(CodexTranscriptReader) — parses Codex rollout JSONL (~/.codex/sessions/**/rollout-*.jsonl)token_countevents. Context occupancy =last_token_usage.total_tokens − reasoning_output_tokens, matching Codex's owntokens_in_context_window()(cached input is a subset of input, never summed).TranscriptReader.readnow dispatches by path: Codex rollouts →CodexTranscriptReader, everything else → the existing Claude reader. The event→stats→UI path is already agent-generic, so Codex sessions populate the same context row + context-fill alerts as Claude.Installer / hooks
install.sh+uninstall.sh: auto-wire/remove Codex (~/.codex/hooks.json, Claude-shapedStop+PermissionRequest), matching what the macOS first-launch wizard already does.notify.sh:agent_supports_decision()gates the in-panel Allow button + blocking permission FIFO to agents whose hook can consume a decision (claude-code,codex). Gemini/Antigravity (observability-onlyNotificationhooks) no longer create a pointless blocking FIFO or show a non-functional Allow button.notify.sh: permission banner resolves Codex'sapply_patchtool to a filename (apply_patch: foo.ts) instead of a bare tool name.Fixes
install.sh: clear a partial/incompatible venv (rm -rf "$VENV") beforepython -m venv, so re-installs don't abort with[Errno 17] File exists.build.sh: addpanel/CodexTranscriptStats.swiftto the explicitswiftcsource list (SPM globs it; the shipping build doesn't).Docs / tests
README.md: reconcile the support matrix + installer/wizard wording (add Antigravity, correct the Cursor-permission note).Tests/StackNudgePanelCoreTests/CodexTranscriptReaderTests.swift: XCTest covering occupancy math, latest-event selection, the cached/cumulative traps, nil cases, and path dispatch.Testing
swift build— clean (library incl. the new file)../build.sh— succeeds (full shipping app).bash -n+shellcheck -S error— clean oninstall.sh,uninstall.sh,notify.sh,build.sh.CodexTranscriptReaderagainst a real Codex 0.136 rollout via a standaloneswiftcharness →tokens=25864,model=gpt-5.5; plus XCTest fixtures (CI runsswift testunder Xcode; can't run locally — CommandLineTools lacks XCTest).make build+ install, a live Codex session shows the context row (… · gpt-5.5) in the Sessions tab and fires context-fill alerts, identical to Claude.Related issues
None.