Skip to content

Detect more agents, including ones started through node, python, or npx - #4

Merged
ganya002 merged 1 commit into
ganya002:mainfrom
noxaur:claude/clamshell-agent-detection-d9c43a
Oct 16, 2026
Merged

ganya002 merged 1 commit into
ganya002:mainfrom
noxaur:claude/clamshell-agent-detection-d9c43a

Conversation

@noxaur

@noxaur noxaur commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Clamshell only found an agent when the program name was the first word of the command. It missed agents started through node, bun, python, or npx. It also missed agents with a space in their path. It counted Claude desktop app helper processes as agents.

Changes

  • Add agent names: Cline, Kilo, Qwen, Kimi, Kiro, Auggie, Plandex, OpenHands, gptme, Junie, Devin, Open Interpreter, and Gemini CLI.
  • Find agents that a runner starts, for example node …/claude-code/cli.js, npx @google/gemini-cli, and python -m aider.
  • Match package and install paths for Claude (native install), Codex, Gemini, OpenCode, Copilot, Qwen, Amp, Auggie, Kilo, Pi, and Droid.
  • Read a second ps listing (comm=) so paths with spaces work, for example Application Support/Claude/claude-code/…/claude.
  • Ignore desktop apps and helpers in /Applications, MCP and app servers (claude mcp serve, codex app-server), and one-shot commands (--version, login, update).
  • Ignore app paths that the command listing cuts at a space. The comm= listing covers the real binaries.
  • Update the agent list in the README.

Verification

  • Added 21 test cases to Tests/EngineTests.swift. They cover each runner type, the ignore rules, and paths with spaces.
  • Ran the logic tests (swiftc … Tests/EngineTests.swift Sources/Engine.swift) after the rebase on main. They print ok.
  • Compiled the full app with swiftc -Onone -framework AppKit Sources/*.swift. It builds.
  • Ran the scanner on live ps output on a Mac. It found only the running Claude Code session. The first run showed a false Codex match from a space-cut app path. I fixed it and added a test.

🤖 Generated with Claude Code

Match more agent names and package paths. Read the executable path as well as the
command line. Skip desktop apps, helper processes, servers, and one-shot commands.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ganya002
ganya002 merged commit faff2d1 into ganya002:main Oct 16, 2026
1 check 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