Skip to content

feat: distinguish Claude Desktop App / IDE / CLI sessions - #175

Merged
graykode merged 1 commit into
graykode:mainfrom
ntung:feature/claude-launch-surface
Sep 14, 2026
Merged

graykode merged 1 commit into
graykode:mainfrom
ntung:feature/claude-launch-surface

Conversation

@ntung

@ntung ntung commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Claude Code can be launched from three different surfaces that all show up as plain claude processes today: a terminal CLI install, the Claude desktop app's bundled Claude Code binary, and an editor extension (VS Code, Cursor, Windsurf, ...). abtop previously labeled all of them identically as "claude" with no way to tell which is which.

  • Adds a LaunchSurface (Cli/App/Ide) classified from each session's resolved process command path:
    • .../Claude/claude-code/... (Electron userData layout) → App
    • .../extensions/anthropic.claude-code-.../... → IDE
    • everything else (homebrew/npm/native installs, the auto-updater's claude/versions/<ver> layout) → CLI (default, unchanged behavior)
  • The sessions table's existing 3-char agent label (*CC) gets a trailing suffix letter for the less common surfaces: *CCa for the desktop app, *CCi for an IDE extension. Plain CLI sessions are unaffected.
  • Threaded through to the JSON snapshot (SessionView) for headless consumers.
  • Codex and OpenCode sessions always report Cli — no desktop-app or editor-extension equivalent is known for those tools.
  • Adds a "Legend" entry to the in-app keybinding help (?) explaining the a/i suffix, in English and Chinese.

Test plan

  • cargo test — 207 passed
  • cargo clippy --all-targets — clean
  • rustfmt --check on all touched files — clean
  • Verified against real live sessions on a dev machine, cross-checked with ps:
    claude Cli 8570 jummp-biomodels
    claude Cli 7968 abtop
    claude Ide 91981 simple-updown-load-server   (VS Code extension)
    claude App 9420  jummp-biomodels             (Claude Desktop app)
    
  • Rendered draw_sessions_panel via TestBackend to confirm *CC/*CCa/*CCi render correctly.

Claude Code can be launched from three different surfaces that all show
up as plain `claude` processes today: a terminal CLI install, the Claude
desktop app's bundled Claude Code binary, and an editor extension (VS
Code, Cursor, Windsurf, ...). abtop previously labeled all of them
identically as "claude" with no way to tell which is which.

Add a `LaunchSurface` (Cli/App/Ide) classified from each session's
resolved process command path:
- `.../Claude/claude-code/...` (Electron userData layout) -> App
- `.../extensions/anthropic.claude-code-.../...` -> Ide
- everything else (homebrew/npm/native installs, the auto-updater's
  `claude/versions/<ver>` layout) -> Cli (default, unchanged behavior)

The sessions table's existing 3-char agent label ("*CC") now gets a
trailing suffix letter for the less common surfaces: "*CCa" for the
desktop app, "*CCi" for an IDE extension. Plain CLI sessions are
unaffected. Also threaded through to the JSON snapshot (`SessionView`)
for headless consumers.

Codex and OpenCode sessions always report `Cli` — no desktop-app or
editor-extension equivalent is known for those tools.

Add a "Legend" entry to the in-app keybinding help (`?`) explaining the
a/i suffix, in English and Chinese, since the suffix alone isn't
self-explanatory.
@ntung

ntung commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

@graykode not sure my updates for the PR description doesn't retain.

@ntung

ntung commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

@graykode not sure my updates for the PR description doesn't retain.

There has been a bug preventing me from updating the PR description. It works now.

@graykode graykode left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changes for release security. No blocking security issues found. Tests and Clippy passed locally. The command-line launch-surface classification can produce incorrect labels, but does not affect permissions or process termination checks.

@graykode graykode closed this Sep 14, 2026
@graykode graykode reopened this Sep 14, 2026
@graykode
graykode merged commit 3e1d3af into graykode:main Sep 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants