Skip to content

Expose subagent kind and parent_id on the meta record - #43

Closed
subomi wants to merge 1 commit into
letta-ai:mainfrom
subomi:feat/subagent-meta-identity
Closed

Expose subagent kind and parent_id on the meta record#43
subomi wants to merge 1 commit into
letta-ai:mainfrom
subomi:feat/subagent-meta-identity

Conversation

@subomi

@subomi subomi commented Aug 16, 2026

Copy link
Copy Markdown

Summary

  • Closes Expose subagent identity (kind + parent_id) on the meta record #42 by adding optional kind: "subagent" and parent_id on the trajectory-v1 meta record so consumers can distinguish delegated runs from human sessions without re-implementing per-harness path heuristics.
  • Claude Code already detects standalone sidechains (standaloneSidechain + unique sessionId); those now copy through to meta. Missing or ambiguous parent session ids omit parent_id rather than failing.
  • Cursor has no content-based signal — identity lives entirely in the local store path (~/.cursor/projects/<slug>/agent-transcripts/<parent-uuid>/subagents/<child-uuid>.jsonl). Listing plus an optional sourceContext.locator (parsed, never read) is how the format stays token-lean without teaching every consumer that layout.
  • ATIF v1.7 (trajectory_id, subagent_trajectories, SubagentTrajectoryRef) is the verbose prior art; this is the token-lean equivalent: a kind flag plus a parent pointer on meta.

No CANONICAL_SCHEMA_VERSION or package version bump. No new TrajectoryListing fields — listing path already distinguishes Cursor children. normalizeTranscript() stays filesystem-free.

Test plan

  • bun run check — 172 pass, 7 skip, 0 fail
  • Claude golden fixture + parent / missing / ambiguous session-id tests
  • Cursor locator (POSIX and Windows) + listing collapse-to-newest
  • Canonical Claude subagent + Cursor locator cases
  • Local aggregate (counts only): claude-code 210 listed / 153 kind+parent_id; cursor 774 listed / 225 kind+parent_id

Claude Code already detects standalone sidechains; Cursor identity lives
only in the agent-transcripts path, so listing plus an optional locator
keeps the format token-lean without teaching every consumer the layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@subomi
subomi marked this pull request as draft August 16, 2026 00:56
@subomi subomi closed this Aug 18, 2026
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.

Expose subagent identity (kind + parent_id) on the meta record

1 participant