Skip to content

Extension re-implements the CLI session engine (parallel session stack + partial agent registry) #741

Description

@muqsitnawaz

Problem

The swarmify extension carries a full parallel session stack that duplicates the CLI's session engine, so every CLI change silently drifts the extension.

  • core/session.activity.ts re-parses raw JSONL for activity/throughput/waiting — the CLI already ships activity/preview/awaitingReason (apps/cli/src/lib/session/active.ts:63, state.ts:200).
  • vscode/sessions.vscode.ts:390 + monitor/sessionParse.ts:124 re-walk ~/.claude|.codex|.gemini on disk — CLI has discoverSessions() / getAgentSessionDirs() (apps/cli/src/lib/session/discover.ts:165,403).
  • core/agents.ts:25 + swarmifyConfig.ts:7 keep a partial 8-agent registry vs the CLI's 14-harness AGENTS table (apps/cli/src/lib/types.ts:12).

Why this is architectural

This is the single largest structural rot: two implementations of one contract. Divergences already shipped (see the per-host mapCloudStatus and gemini sessions vs tmp path bugs). Left alone it keeps generating drift bugs on every CLI release.

Fix

Make the Factory Floor consume CLI session JSON exclusively (agents sessions --json, agents sessions <id> --json); delete the extension's format parsers and BUILT_IN_AGENTS/VALID_AGENT_IDS. Where the CLI JSON lacks a field, add it to the CLI (see the plan-text gap issue) rather than re-parsing.

Source: rot-audit swarm, cross-repo track (read-only, file:line verified).


Linear: RUSH-1503

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important competitive gapenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions