Repository navigation
fix(codex): detect sessions held open by a codex app-server - #185
TheeCoderAhmed wants to merge 2 commits into
Conversation
The desktop rollout filter only accepted the literal "Codex Desktop" originator. Newer Codex versions are reported to write "codex_work_desktop" and "codex_vscode", so their rollouts were filtered out and abtop showed no sessions while the app-server was running.
|
Thanks for picking up #179. I tested this branch against a live Codex 0.167.0 setup on macOS, and it still finds no sessions there. Accepting more What's runningThree ways of using Codex, all sharing
On 0.167 the terminal
The The originator also records only which client created a thread. Threads move between clients: I continued a thread started in the terminal ( ResultsThe same live sessions, read by
Proposed changeAll of it is in
Tests: I updated Two side effects I checked:
Cosmetic follow-up, not included: these rows show The patch is below, against Patch (
|
Newer Codex versions run terminal sessions through a managed codex app-server daemon, and third-party hosts write their own originator strings, so the originator is no longer a reliable signal. A recent rollout held open by an app-server process now counts whatever its originator. The filesystem scan still requires a Desktop originator, because it has no PID to attribute the file to. A rollout held by two app-servers is shown once, under the lower PID, so the row does not flip between ticks. Based on the patch mschirrmeister posted on this PR after testing against Codex 0.167.0 on macOS.
|
Thanks for testing this and posting the patch. I applied it on top of this branch and credited you in the PR. I can't run Codex 0.167 here, so tell me if it still shows nothing. |
|
Thanks for applying it! I tested
This also confirms Tested with the help of Claude (Claude Code). |
Fixes #179.
Newer Codex runs sessions through
codex app-server, and some hosts write their own originator names. TheCodex Desktoplabel no longer tells us what is live, so abtop showed0 sessions.Now a recent rollout held open by an app-server counts as live, whatever its originator. The filesystem scan still needs a Desktop originator, since it has no PID to match.
A rollout held by two app-servers shows once, under the lower PID.
Thanks to mschirrmeister for testing on Codex 0.167 and posting the patch. I applied it on top of this branch.
Tests:
cargo test, clippy and rustfmt pass. Not run against live Codex here.