Skip to content

bug(undo-close): a restored parent's live orchestration children keep the dead parent id #1373

Description

@Juliusolsson05

Problem

When a parent pane P that has live orchestration children is closed and then restored with Undo Close, the restored pane gets a new session id P′. Its live children keep orchestrationParentId: P.

restoreSessionEntry / restoreTabEntry remap lineage only within the restored entry and the undo stack, never in other sessions' pointers. Replace and Reload Agents do rewrite those pointers, through remapSessionsRelationships. The renderer's visibility gate (orchestrationMcp.ts:306-319) compares ids for equality, so P′'s list_agents / read_agent / send_prompt cannot see or reach its own surviving live children. They also render as top-level rows.

Evidence

Likely fix

Apply remapSessionsRelationships(sessions, successors) at the Undo Close commit, as the replace path does, so live children follow the pane. Main's carry is already wired by #1369.

🤖 Generated with Claude Code

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

    class:C2-identityIdentity/ownership across reload, replace, restore, wakesev:P3Minortype:bugSomething works wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions