Skip to content

Session context persistence: link sessions to branches and PRs #18308

@jerop

Description

@jerop

Problem

Developers might start a feature in one session, switch to another feature in another, and then return to the first feature days later. Currently, the "memory" of why decisions were made and what happened in that first session is buried in a list of generic timestamps or requires manually searching through the session browser to find the right context. Developers often end up creating new sessions and providing context all over again, killing productivity gains of parallel sessions.

Solution

Automatically associate Gemini CLI sessions with the git branches and Pull Requests (PRs) they create, transforming session logs into persistent, context-aware workspaces.

  • Resumption: You can resume session for by a PR number or branch name. You don't need to remember the date or session ID or key words or the terminal tab.
  • Productivity: Parallel work becomes manageable. You can hop between multiple branches/sessions, and the context (decisions, history, reasoning) is always attached to the code.
  • Trail: The session becomes the narrative history of the PR. When you merge, you have the full "making of" story attached to the code changes.

User Experience

  • Resumption: gemini --resume --branch feature/login-page or gemini --resume --pr 123.
  • Discovery: gemini --list-sessions --branch feature/login-page or gemini --list-sessions --pr 123.
  • Visibility: The CLI status bar will display the created PR numbers (e.g., PR: #42, #43) alongside the current branch.
  • Browser: The interactive /resume command will be updated to display branch and PR information in the session table, and allow searching by branch name or PR number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalitystatus/need-triageIssues that need to be triaged by the triage automation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions