Support Codex sessions started by the VS Code extension
Environment
- macOS
- abtop 0.5.5 installed through Homebrew
- Codex VS Code extension
- Extension-bundled Codex version: 0.154.0-alpha.6.2
Problem
abtop does not display Codex sessions started through the VS Code extension, even though the extension’s codex app-server processes and rollout files are available locally.
The VS Code extension starts processes similar to:
.../.vscode/extensions/openai.chatgpt-*/bin/macos-aarch64/codex \
-c features.code_mode_host=true \
app-server \
--analytics-default-enabled
These processes have their corresponding rollout files open under:
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
The rollout metadata identifies these sessions as:
{
"originator": "codex_vscode",
"source": "vscode"
}
However, the sessions do not appear in the abtop session, token, context, or project panels.
Steps to reproduce
-
Install and open the Codex VS Code extension.
-
Start a Codex session inside VS Code.
-
Confirm that the extension’s app-server process is running:
ps ax -o pid=,command= | grep "codex.*app-server"
-
Confirm that it has one or more rollout files open:
lsof -p <app-server-pid> -Fn | grep "rollout-.*\.jsonl"
-
Run:
or:
-
Observe that the VS Code Codex session is missing.
Actual behavior
Codex app-server processes are excluded from the normal Codex CLI collector.
abtop has a separate app-server discovery path, but it currently accepts only rollouts whose metadata contains:
originator = "Codex Desktop"
VS Code rollouts use:
originator = "codex_vscode"
As a result, the app-server process and its rollout files are detected, but the rollout filter rejects the VS Code sessions.
Additionally, Codex sessions currently use LaunchSurface::Cli, even when they originate from an IDE.
Relevant source:
https://github.com/graykode/abtop/blob/v0.5.5/src/collector/codex.rs
Expected behavior
Codex sessions started by the VS Code extension should be displayed in abtop with the available:
- Session status
- Token usage
- Context-window usage
- Project information
- Tool activity
- Rate-limit information, when present in the rollout
They should be identified as IDE sessions, for example using:
The underlying app-server process should remain protected from session-level kill operations.
Suggested implementation
Generalize the existing Codex Desktop app-server collector so it supports multiple app-server launch surfaces.
For example:
- Recognize
originator = "Codex Desktop" as LaunchSurface::App.
- Recognize
originator = "codex_vscode" or source = "vscode" as LaunchSurface::Ide.
- Keep supporting multiple rollout files per app-server process.
- Continue excluding app-server processes from the normal one-PID-to-one-rollout CLI mapping.
- Continue preventing abtop from killing an app-server process as though it were an individual session.
- Rename Desktop-specific helper functions where appropriate to reflect their broader app-server purpose.
- Add tests covering Codex Desktop, VS Code, ordinary CLI, stale rollouts, and multiple rollouts owned by one app-server.
Additional context
This is separate from standalone Codex CLI discovery. Standalone CLI sessions use metadata such as:
{
"originator": "codex-tui",
"source": "cli"
}
The requested change is specifically to expose sessions already produced and owned by the Codex VS Code extension’s app-server processes.
Support Codex sessions started by the VS Code extension
Environment
Problem
abtop does not display Codex sessions started through the VS Code extension, even though the extension’s
codex app-serverprocesses and rollout files are available locally.The VS Code extension starts processes similar to:
These processes have their corresponding rollout files open under:
The rollout metadata identifies these sessions as:
However, the sessions do not appear in the abtop session, token, context, or project panels.
Steps to reproduce
Install and open the Codex VS Code extension.
Start a Codex session inside VS Code.
Confirm that the extension’s app-server process is running:
Confirm that it has one or more rollout files open:
Run:
or:
Observe that the VS Code Codex session is missing.
Actual behavior
Codex app-server processes are excluded from the normal Codex CLI collector.
abtop has a separate app-server discovery path, but it currently accepts only rollouts whose metadata contains:
VS Code rollouts use:
As a result, the app-server process and its rollout files are detected, but the rollout filter rejects the VS Code sessions.
Additionally, Codex sessions currently use
LaunchSurface::Cli, even when they originate from an IDE.Relevant source:
https://github.com/graykode/abtop/blob/v0.5.5/src/collector/codex.rs
Expected behavior
Codex sessions started by the VS Code extension should be displayed in abtop with the available:
They should be identified as IDE sessions, for example using:
The underlying app-server process should remain protected from session-level kill operations.
Suggested implementation
Generalize the existing Codex Desktop app-server collector so it supports multiple app-server launch surfaces.
For example:
originator = "Codex Desktop"asLaunchSurface::App.originator = "codex_vscode"orsource = "vscode"asLaunchSurface::Ide.Additional context
This is separate from standalone Codex CLI discovery. Standalone CLI sessions use metadata such as:
The requested change is specifically to expose sessions already produced and owned by the Codex VS Code extension’s app-server processes.