Skip to content

[FEATURE]: Option to show project/directory name in session tabs (horizontal and vertical) #56749

Open

Description

@callmeusdt

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

With tabs.scope set to global, sessions from several working directories share one tab strip, and the only label on a tab is the session title. Titles come from the first message, so two sessions in different repos often read the same ("Fix login bug"). I can't tell which directory a tab belongs to until I switch to it. This is the main reason I used to run one instance per directory inside tmux.

I saw that vertical tabs already have a second line with the project name (sessionTabDetail). I'd like something like that to be available as a setting that works in both layouts:

  • A cli.json option under tabs (name is up to you, e.g. tabs.label) that adds the project or directory name to the tab.
  • It applies to horizontal tabs as well as vertical ones. Horizontal tabs have no detail line, so a name: title style prefix would probably be the simplest form there.
  • Display only. The stored session title stays untouched.
  • Whether it's on by default is your call. I'd just like to be able to turn it on.

Name vs. full path (or ~-shortened) could be a second value if that's cheap, since two directories with the same basename are still ambiguous.

For now I'm using a small local plugin that renames the session to dir:title on session.created / session.renamed. It works, but it writes the prefix into the session data, so it also shows up in the session list, exports and the API. A display-level option in the tab strip would avoid that, and a plugin can't do it today because there is no slot for tab titles.

Related: #50228, #51759.

Activity

  1. opencode-agent commented on Oct 18, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed request, @callmeusdt!

    To restate it: you'd like a tabs option in cli.json that adds the project or directory name to session tab labels. It would work in both layouts (a name: title prefix in horizontal tabs, and the existing detail line in vertical ones) and leave the stored session title alone. A full or ~-shortened path could be a second value. That makes sense: with tabs.scope: global, sessions in different directories with the same title are hard to tell apart.

    You're right that a plugin can't do this cleanly today. The TUI plugin API has no slot for tab titles, so renaming the session is the only workaround, and that changes the stored data. I've noted that gap for the maintainers. They will consider the request, but I can't promise if or when it will be added.

    Related issues:

  2. SKar-2007 commented on Oct 18, 2026

    @SKar-2007

    Happy to take this one. Plan: a tabs.label option (title | project | path, default title) in cli.json:

    • horizontal tabs prefix the title with the project detail (name: title, or name⎇ branch: title for worktree sessions — the same text the vertical detail line shows),
    • vertical tabs keep their existing detail line, and in path mode the detail shows the ~-shortened directory instead of the bare project name,
    • display-only; the stored session title is untouched.

    Will open a PR against dev.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions