Skip to content

[FEATURE]: improved visual position indicator for subagent sessions #9989

Closed

Description

@jakob1379

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem
The header component facilitates navigation between subagent sessions but lacks visual context regarding the user's current position and the total number of sessions. Users cannot identify which specific subagent is active relative to others in the stack.

Proposed Solution
Enhance the header to include a position indicator and adjacent session metadata. This provides immediate orientation within the navigation cycle (Parent → Child 1 → Child 2 → Parent).

Technical Requirements
Modify the header component to derive the following state from existing session data:

  • Current Index: children().findIndex(s => s.id === route.sessionID) + 1
  • Total Count: children().length
  • Adjacent Metadata: Retrieve names for children[index - 1] and children[index + 1] to provide context for navigation buttons.

UI Specifications

  1. Indicator: Insert a "Current/Total" (e.g., "2 / 5") text element or a horizontal dot-based indicator.
  2. Placement: Position the indicator between the "Subagent session" label and the navigation buttons.
  3. Contextual Labels: Display the names of the previous and next agents near the navigation controls to clarify the destination of the "back" and "forward" actions.

Implementation Logic

const sessions = children();
const currentIndex = sessions.findIndex((s) => s.id === route.sessionID);
const total = sessions.length;

const prevAgent = currentIndex > 0 ? sessions[currentIndex - 1] : null;
const nextAgent = currentIndex < total - 1 ? sessions[currentIndex + 1] : null;

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 22, 2026
  2. github-actions commented on Jan 22, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. added a commit that references this issue on Feb 13, 2026
    a059669
  4. adamcbrewer commented on Feb 13, 2026

    @adamcbrewer

    I've implemented this for the TUI here:
    https://github.com/adamcbrewer/opencode/tree/feat/9989-subagent-session-pagination. However I'm pretty new to opensource contributions and need a bit of hand holding submitting my first one to this project. Should my PR target the branch from my fork to this project's dev ?

  5. github-actions commented on Apr 15, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions