Skip to content

Pane IDs Are Not Stable Renumbering When Panes Close #569

Description

@Tibart

Is this a reproducible bug?

  • I confirm this is a reproducible bug, not a feature request, idea, question, contribution proposal, or direction check.

Current behavior

Herdr's public pane IDs are unstable and renumber when any pane closes. This breaks agent coordination workflows where parent agents need to reliably identify child panes using IDs obtained from pane split or pane list responses.

Example:

  • Split 3 panes: w653bd239a39073-1, w653bd239a39073-2, w653bd239a39073-3
  • Close pane 3
  • Pane 2 becomes w653bd239a39073-2 (unchanged)
  • But other references to "pane 3" are now invalid

Real Impact: An agent spawning a child agent in a pane, then waiting for output/status from that pane fails when sibling panes are closed, because the pane ID changes.

Expected behavior

Pane ID stay's the same so parent agent can monitor siblings even when other panes close.

Reproduction

  1. Parent agent spawns child agent in a new pane:

    NEW_PANE=$(herdr pane split 1-2 --direction right --no-focus | jq '.result.pane.pane_id')
    # Returns: "w653bd239a39073-3"
    herdr pane run "$NEW_PANE" "pi"
  2. Parent agent waits for child agent status:

    herdr wait agent-status "$NEW_PANE" --status done --timeout 120000
  3. Meanwhile: User closes another pane (e.g., a logging pane at w653bd239a39073-2)

  4. Result:

    • Pane 3 is internally still pane 3 (internal PaneId hasn't changed)
    • But public_pane_number for that pane gets decremented to 2
    • herdr wait agent-status "w653bd239a39073-3" fails because pane 3 no longer exists
    • Parent agent assumes child is done (timeout) or never started

Impact

Because the connection between agent and pane is lost, agent orchestration fails and parent agent get partial or no data from sibling agent. This disrupts the workflow and outcome.

Environment

  • Herdr version: herdr 0.6.9
  • Update channel (stable or preview): stable
  • Operating system: Arch (WSL2)
  • Terminal: WezTerm
  • Shell, if relevant: bash
  • Relevant config, if any:

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