#645

feat: share one coding agent catalogue across mux-activity and agent-activity

Openwiiiimmwants to merge intofrom

Closes OPS-300 Closes #668

Summary

Consolidate coding-agent CLI detection across opscope-core (tc::agent_work), mux-activity (Rex, Herdr, and Luvus), and agent-activity into one shared catalogue in core/src/agent_work/catalogue.rs.

  • Shared catalogue (tc::agent_work):
    • Group 1 (24 confirmed defaults): claude, codex, gemini, opencode, agy, pi, omp, cursor-agent, copilot, droid, devin, grok, kimi, qwen, qodercli, kiro (process kiro-cli only; bare kiro is the Kiro IDE launcher, and Herdr's kiro resolves as an alias), cline, crush, aider, codebuff, auggie, gptme, codewhale, and jules. Every entry carries a confirmation note citing local installs and/or official CLI docs.
    • Group 2 (entries whose command another program shares; each needs a second clue and is switched on by its own name in agents):
      • forge → forgecode only with /forgecode/ or /@antinomyhq/forge/ (never Foundry's forge).
      • agent → cursor-agent only with /cursor-agent/ (handles Cursor's exec -a Node wrapper while ignoring unrelated agent binaries).
      • cn → continue only with /@continuedev/ or /continuedev/.
      • vibe → vibe only with /mistral-vibe/ or /mistral_vibe/.
      • goose → Block's agent only by its Homebrew path (/block-goose) or by how it was run: bare, session, s or run. pressly/goose (goose up, goose postgres … status) never matches. Rex reports no arguments, so there the catalogue needs the path; a goose that reports itself to Rex (current versions do) shows regardless, with its own state — confirmed live: a script-installed goose under Rex appeared under AGENTS as idle.
    • Group 3 & exclusions: Sourcegraph's Amp is out of the defaults: amp is also a terminal text editor, and an npm install runs as node /usr/local/bin/amp, so no clue separates them. Herdr reports Amp itself, and adding amp to agents matches it unconditionally. Unconfirmed CLIs (letta, mastracode, maki, kilo/kilocode, plandex, openhands, trae-cli, etc.) stay out of DEFAULT_AGENTS until confirmed from official docs or an install, while still showing under Herdr/Luvus whenever the multiplexer reports them. Hermes Agent is excluded entirely, as are background service subcommands (opencode serve/acp, agy acp/mic-serve, claude gateway/mcp serve, codex app-server, devin acp, copilot --acp, kimi web, goose mcp, etc.).
  • mux-activity (Rex, Herdr, Luvus):
    • Rex reads tc::agent_work::DEFAULT_AGENTS and shared foreground/report classifiers; an agy pane under Rex is an agent row with unknown state (no status reported).
    • Herdr and Luvus read agents from settings (DEFAULT_AGENTS fallback), promote panes running configured/catalogue agents that the multiplexer did not list as unknown (no status reported), and resolve multiplexer aliases such as antigravity-cli ↔ agy and kiro ↔ kiro-cli to their process and child shells.
  • agent-activity:
    • Discovers every running agent in tc::agent_work::DEFAULT_AGENTS (plus disambiguated Group 2 matches) with its via process child shells, while limiting via log session-store reads to Claude Code, Codex, and OpenCode and stating no session-log reader for this agent on rows without one.
  • Settings & docs:
    • Regenerated config.example.json (UPDATE_CONFIG_EXAMPLE=1 cargo test) and updated settings.json, README.md, CONFIGURE.md, and help.txt for mux-activity and agent-activity.

Verification

  • UPDATE_CONFIG_EXAMPLE=1 cargo test and full workspace cargo test passed across opscope-core, all 22 binaries, and all 73 invariants in widgets/tests/check.rs
  • Unit tests for Group 1 provenance notes, alias resolution (antigravity-cli → agy, kiro → kiro-cli), background service subcommand exclusion, shebang shell wrappers on Linux and macOS, and narrowed/custom agents lists (core/src/agent_work/catalogue.rs, core/src/agent_work.rs)
  • Negative and second-clue tests for Group 2 generic names (forge, vibe, cn, agent, goose)
  • Programs sharing an agent's name are not agents: goose up, goose postgres … status, amp notes.txt, kiro .; a bare goose label or Rex foreground proves nothing
  • Removing one default (jules) leaves Cursor's agent launcher and Continue matching; removing continue switches off only Continue
  • Full workspace cargo test after the fix: 2621 passed, 0 failed (e8e955f)
  • Rex agy pane rendered in AGENTS with unknown state and no status reported (mux-activity/rex.rs, rex_parse.rs)
  • Herdr and Luvus gap-filling with unknown (no status reported), antigravity-cli → agy process/shell matching, and user-added agents entries (mux-activity/herdr.rs, luvus.rs)
  • agent-activity listing agy, pi, and gemini with their child shells while excluding unrelated generic commands (agent-activity/model.rs)

Activity

48
coderabbitai[bot]10d ago

WARNING

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 46 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 93 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bab7e936-a122-4c72-b80b-b510cb03ee19
Commits

Reviewing files that changed from the base of the PR and between dd294308c0c65bbc6aef474474df111d7373d48e and 066a7511a1647a1dbd733813c92c321ef2e64644.

Files selected for processing: 5

  • core/src/agent_work.rs
  • core/src/agent_work/catalogue.rs
  • widgets/src/widgets/mux-activity/herdr.rs
  • widgets/src/widgets/mux-activity/luvus.rs
  • widgets/src/widgets/mux-activity/luvus_parse.rs

Summary by CodeRabbit

  • New Features
    • Agent Activity now discovers a broader range of local coding agents and shows their child shell work. Session-log details are available for Claude Code, Codex and OpenCode.
    • Mux Activity recognises more agents across Rex, Herdr and Luvus. Agents without reported activity status appear with an unknown status.
  • Improvements
    • Agent matching supports aliases and process clues. Ambiguous command names require additional evidence, and the default agent list has been updated.
  • Documentation
    • Updated guides and help text explain agent discovery, matching and status reporting.

Walkthrough

A shared catalogue now classifies coding-agent processes and aliases. Agent-activity uses it to discover agents and child-shell work. Rex, Herdr and Luvus use the catalogue and configured names to identify agents, including rows with unknown state when no status is reported.

Changes

Shared coding-agent discovery

Layer / File(s)Summary
Catalogue and process-table discovery
core/src/agent_work/catalogue.rs, core/src/agent_work.rs
The shared catalogue defines agent commands, aliases, matching clues and service exclusions. Process discovery uses catalogue classification, recognises shell wrappers and adds bounded searches around or below a PID.
Agent-activity collection and display
core/src/agent_work/logs.rs, widgets/src/widgets/agent-activity/*, README.md
Agent-activity collects catalogue agents and child-shell work. It reads logs for Claude, Codex and OpenCode, and distinguishes agents without a log reader.
Shared mux configuration and Rex matching
widgets/src/widgets/mux-activity/settings.json, config.example.json, widgets/src/widgets/mux-activity/CONFIGURE.md, widgets/src/widgets/mux-activity/README.md, widgets/src/widgets/mux-activity/main.rs, widgets/src/widgets/mux-activity/rex.rs, widgets/src/widgets/mux-activity/rex_parse.rs
Shared defaults and configuration guidance cover Rex, Herdr and Luvus. Rex uses shared defaults and matching functions. Tests cover catalogue detection and unknown-state rows.
Herdr catalogue-promoted agents
widgets/src/widgets/mux-activity/herdr.rs, widgets/src/widgets/mux-activity/help.txt, widgets/src/widgets/mux-activity/README.md
Herdr polling adds configured or catalogue agents that Herdr did not report. The rows include unknown state, process work and catalogue notes.
Luvus catalogue-promoted agents
widgets/src/widgets/mux-activity/luvus.rs, widgets/src/widgets/mux-activity/help.txt, widgets/src/widgets/mux-activity/README.md
Luvus polling adds panes matched by the catalogue or configured names. Rows identify whether process or command evidence matched.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant HerdrPoll
  participant ProcessTable
  participant AgentCatalogue
  participant AgentRows
  HerdrPoll->>ProcessTable: Probe pane foreground and shell PID
  HerdrPoll->>AgentCatalogue: Classify configured or catalogue process
  AgentCatalogue-->>HerdrPoll: Return matched agent kind
  HerdrPoll->>AgentRows: Add agent with unknown state and process work

Possibly related issues

  • stealth-factory/opscope#614: This change extends agent-activity process discovery to catalogue agents and child shells, while retaining session-log reads for the supported agents.

Possibly related PRs

  • stealth-factory/opscope#615: This change extends the agent-activity process discovery introduced by that PR.
  • stealth-factory/opscope#618: Both changes address how catalogue-promoted Herdr and Luvus rows interact with background-job rows and reported state.
  • stealth-factory/opscope#612: This change retains the session-reader scope established by that PR and uses the shared readers for supported agents.

Suggested reviewers: greptile-apps

Merge Risk: Moderate · previous review dd294

The change broadens agent discovery across the activity widgets and multiplexer clients. Several classification and display edge cases remain open. In Herdr, a pane whose agent is replaced by a matching background job can no longer be focused with Enter. In Luvus, a promoted agent can show another project's session work. These should be addressed or explicitly accepted before merge.

Security architecture risk: Minimal · up to dd294

The inspected changes broaden discovery while retaining separate controls for supported log readers, local-process access, and reported job state. No introduced or worsened security, ownership, rollback, or failure-containment risk was established.

Retained concerns No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — Process discovery scans machine-wide metadata exposed by ps, rather than a tenant-specific inventory. Rex retains a separate locality boundary: local enrichment runs only for a local server, and remote panes are excluded from local process and log association.

Security Findings and Attack Paths

  • inferred — A process able to choose matching names, arguments, or paths can influence heuristic discovery. In the inspected consumers, that leads to display and work/log association, not a new grant to execute that process or obtain credentials. The comparison did not establish a newly introduced or worsened security attack path.

Trust Boundaries and Controls

  • observed — Rex checks live process identity and any reported owner before associating logs. Its shared acquisition helper obtains the identified process's cwd rather than a foreground child's directory. Claude binding checks PID/session consistency and available process-start evidence, while retaining a labelled cwd-based fallback when binding is unavailable; discovery is not authentication.

Resilience and Maintainability Implications

  • observed — Successful polls publish reconciled rows under a mutex. Rex clears its board when acquisition fails, and Luvus clears session-derived readings when the server becomes unavailable. Herdr retains its prior snapshot with an error on agent-list failure; that behavior is present in both base and head rather than introduced by promotion.
Pre-merge checks: 4

Check nameStatusExplanation
Title checkThe title names the main change: a single coding-agent catalogue shared by mux-activity and agent-activity. The changeset adds the shared catalogue in core/src/agent_work/catalogue.rs and switches Rex…
Description checkThe description is detailed and directly describes the changeset. It covers the shared catalogue in core/src/agent_work/catalogue.rs, Group 1 and Group 2 entries, the mux-activity (Rex, Herdr, Luvus) …
Linked Issues check[#668] Shared catalogue: core/src/agent_work/catalogue.rs at the reviewed head defines CATALOGUE with 24 Group 1 entries (second_clues and session_args empty). Each entry has a note that nam…
Out of Scope Changes checkThe changes stay within #668 and OPS-300. core/src/agent_work/catalogue.rs and core/src/agent_work.rs implement the shared catalogue and its matching helpers. The mux-activity and `agent-activit…
Full details: Title check

Explanation

The title names the main change: a single coding-agent catalogue shared by mux-activity and agent-activity. The changeset adds the shared catalogue in core/src/agent_work/catalogue.rs and switches Rex, Herdr, Luvus and agent-activity to it, so the title matches the primary change.

Full details: Description check

Explanation

The description is detailed and directly describes the changeset. It covers the shared catalogue in core/src/agent_work/catalogue.rs, Group 1 and Group 2 entries, the mux-activity (Rex, Herdr, Luvus) and agent-activity changes, settings and docs updates, and test results.

Full details: Linked Issues check

Explanation

[#668] Shared catalogue: core/src/agent_work/catalogue.rs at the reviewed head defines CATALOGUE with 24 Group 1 entries (second_clues and session_args empty). Each entry has a note that names its confirmation source. [#668] Group 2 entries (forgecode, cursor-agent via agent, continue via cn, vibe) require a path or script clue. The catalogue tests cover the negative cases, per the PR description. [#668] Hermes is not in the catalogue. Amp is excluded, and the catalogue comment gives the reason. Goose uses a disambiguated entry with path or argument clues, not plain Group 1 matching. The PR states this deviation and the reason, which the issue allows for unconfirmed or ambiguous names. [#668] Rex reads DEFAULT_AGENTS, so an agy pane renders as an agent row with unknown state, per the PR description and the previous assessment. [#668] Herdr and Luvus promote unreported catalogue or configured panes as unknown, and resolve antigravity-cli to agy and kiro to kiro-cli. [#668] agent-activity iterates catalogue_agents(), so agy, pi and gemini appear with child shells. Session-log reads stay limited to Claude Code, Codex and OpenCode through has_log_reader. [#668] The agents setting applies under all three multiplexers, and config.example.json and settings.json are updated. Limits: I could not read the incremental diff from the previous reviewed heads, because the changed blobs are missing from the checkout. The Herdr and Luvus background-job hunks (commit-message follow-up) therefore rest on the summary only. I did not run tests at the reviewed head. The 2621-pass result is the author's report at e8e955f.

Full details: Out of Scope Changes check

Explanation

The changes stay within #668 and OPS-300. core/src/agent_work/catalogue.rs and core/src/agent_work.rs implement the shared catalogue and its matching helpers. The mux-activity and agent-activity edits implement the Rex, Herdr, Luvus and agent-activity requirements. The settings.json, config.example.json, README, CONFIGURE and help changes fall within the issue's listed documentation and configuration scope. The core/src/agent_work/logs.rs change adds case-insensitive matching and the claude-cli and codex-cli aliases to the existing Claude and Codex readers. It adds no reader for a new agent, so it stays within the issue's exclusions. No change adds Hermes or another excluded agent. Limit: the incremental hunks since e8e955f and e3ccb7f were not readable, so this verdict relies on the summarised scope for those hunks.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the process trail,
Finds agents by command and name.
The child shells join the board,
While unknown states stay unknown.
Three readers scan their session logs,
And Rex, Herdr, Luvus share the list.

linear-code[bot]10d ago
chatgpt-codex-connector[bot]10d ago
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
📝 Code Review✅ Completed 2026-11-18T15:04:45.389024Z066a751Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chatgpt-codex-connector[bot]reviewed10d ago
chatgpt-codex-connector[bot]10d ago

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e8e955f25d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

chatgpt-codex-connector[bot]reviewed10d ago
coderabbitai[bot]reviewed10d ago
coderabbitai[bot]reviewed10d ago
coderabbitai[bot]reviewed10d ago
wiiiimmreviewed10d ago
wiiiimmreviewed10d ago
wiiiimmreviewed10d ago
wiiiimmreviewed10d ago
wiiiimmreviewed10d ago
wiiiimmreviewed10d ago
wiiiimmreviewed10d ago
wiiiimmreviewed10d ago
wiiiimm10d ago

@codex review

chatgpt-codex-connector[bot]10d ago

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 066a7511a1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".