Skip to content

(remote): mirror subagent .meta.json so remote subagents show their type instead of SUB #244

Description

@devsuitup

Symptom

In the sidebar, subagents of a remote (ssh-mirrored) session are labelled SUB, while local subagents show their agent type (general-purpose, reviewer, ...).

Root cause

The type comes from a sidecar agent-<id>.meta.json written by the CLI next to the subagent transcript, read by readSubagentMeta() (read-session-file.js:25-32, consumed at lines 256 and 572). It is never derived from the parent transcript.

The remote inventory only lists transcripts: LIST_COMMAND in remote-transport.js:26 is find ... -name '*.jsonl'. remote-mirror.js never mentions meta.json. The sidecar is therefore never mirrored, readSubagentMeta() returns null silently, and the renderer falls back to 'sub' (public/sidebar.js:293, uppercased by style.css:1864-1870).

Indexing itself is shared between local and mirrored roots (workers/scan-projects.js), so this is an inventory gap, not a rendering or indexing bug.

Fix

Extend the inventory and the mirror to include *.meta.json alongside *.jsonl. Check MAX_CYCLE_FILES / MAX_CYCLE_BYTES (#238) still make sense once sidecars count.

Acceptance

  • A mirrored subagent whose .meta.json exists on the host shows its type in the sidebar.
  • A test on the inventory parser proves a .meta.json entry is listed and mirrored; a mutation restoring the *.jsonl-only pattern makes it red.
  • A subagent without a sidecar on the host still renders SUB, not an error.

Part of the indicator alignment audit (see the domain-layer issue).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions