Skip to content

[Feature] Mirror parent session name to child sessions #5579

@fglogan

Description

@fglogan

Summary

When a session is renamed, child sessions should reflect the parent session name with a suffix (e.g., genesis-analyzer parent spawns genesis-analyzer|cs-1, genesis-analyzer|cs-2, etc.).

Problem

Currently, child sessions spawned by the Task tool have generic or auto-generated names that don't indicate which parent session they belong to. This makes it difficult to:

  1. Identify which child sessions relate to which work context
  2. Navigate between related sessions
  3. Understand session hierarchy at a glance

Proposed Solution

Naming Convention

When a parent session is named <session-name>, child sessions should be named:

  • <session-name>|cs-1
  • <session-name>|cs-2
  • etc.

Or alternatively:

  • <session-name> [1]
  • <session-name> [2]

Behavior

  1. On parent rename: All existing child sessions update their names to reflect the new parent name
  2. On child spawn: New child session automatically inherits parent name with incremented suffix
  3. Session list display: Show hierarchy clearly, perhaps with indentation:
    genesis-analyzer
      ├─ genesis-analyzer|cs-1 (completed)
      ├─ genesis-analyzer|cs-2 (running)
      └─ genesis-analyzer|cs-3 (pending)
    

Use Case

When working on multiple projects simultaneously, users may have:

  • genesis-analyzer session with 3 child tasks
  • opencode-plugin session with 2 child tasks

Without name mirroring, it's unclear which child sessions belong to which context.

Additional Context

This improves the UX when using agents heavily, as the Task tool spawns many child sessions that currently lack clear association with their parent context.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions