Repository navigation
Conversation
Codex discovery skipped any process whose command line contained "grep", and marked it as a one-shot exec when it contained " exec". Long -c values such as developer instructions are part of that command line, so an interactive TUI could be dropped entirely, or shown as exec and then hidden as Done after its first task_complete. - grep: exclude only when the executable itself is a grep (new process::cmd_is_grep), in codex, codex mcp-server, and opencode discovery. - exec: take it from the rollout's session_meta originator (codex_exec vs codex-tui); argv is only a fallback for rollouts without one, and matches the whole token.
demrom
marked this pull request as ready for review
October 16, 2026 17:34
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.
abtop can miss Codex sessions started with long
-cvalues (for example-c developer_instructions=...), even while the process is running and has its rollout open. Two substring checks run over the whole command line:!cmd.contains("grep")drops the process if any argument mentions grep.cmd.contains(" exec")treats an interactive TUI as a one-shotcodex execif any argument contains " exec", as in "run executables". After the firsttask_completethe session counts as Done and disappears from the list.Changes:
process::cmd_is_grepexcludes a process only when its executable is a grep (grep,pgrep, ...). Codex CLI and Desktop discovery,codex mcp-serverdetection and opencode discovery all had the same substring check and now use it.session_meta.originator(codex_execorcodex-tui). The argv guess is kept as a fallback for rollouts without an originator, and now matchesexeconly as a whole token.Testing:
cargo clippy -- -D warningsandcargo testpass (225 tests).find_codex_pids_ignores_grep_and_exec_inside_args,test_codex_tui_originator_overrides_exec_guess_from_argvandcmd_is_grep_checks_only_the_executable. The first two fail onmain.-cinstructions: abtop 0.5.5 does not list them, this branch lists all of them.