Skip to content

[FEATURE]: Inherit or regenerate session title when forking #10105

Closed

Description

@rcdailey

Describe the enhancement you want to request

When forking a session, the new session is given a generic name like "New session - 2026-01-22T..." instead of something meaningful derived from the original session.

Current behavior:

  • Fork a session with title "Refactor authentication module"
  • New forked session gets title "New session - 2026-01-22T14:30:00.000Z"
  • User must manually rename via /rename

Desired behavior (either option):

  1. Inherit original title with prefix (similar to PR feat: add /branch command to create new session with compacted context #7824's /branch command):

    • Forked session gets title like "Fork: Refactor authentication module"
  2. Trigger AI title regeneration:

    • After fork completes, run ensureTitle to generate a contextual name based on the copied conversation

Why this matters:

  • Forked sessions are often used to explore alternative approaches to the same problem
  • A meaningful title helps users navigate between the original and forked sessions
  • Currently requires manual renaming which is tedious

Technical context:

  • fork function in packages/opencode/src/session/index.ts:148-184 creates sessions via createNext without passing a title
  • ensureTitle in prompt.ts doesn't trigger because forked sessions already have messages (fails "isFirst" check)
  • PR feat: add /branch command to create new session with compacted context #7824 demonstrates the "prefix + original title" pattern with /branch command

Activity

  1. 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.

  2. ariane-emory commented on Jan 24, 2026

    @ariane-emory
    Contributor

    I've noticed this in the past and it has annoyed me a little bit too. Doing something about it does seem like a good idea to me.

    Option 1, inheriting the session's title, is probably a whole lot simpler.

    Perhaps with a number talked on, so forking a session names foo bar results in foo bar #2 (and with logic so that subsequently forking foo bar #2 results in foo bar #3)?

  3. rcdailey commented on Jan 24, 2026

    @rcdailey
    Author

    I agree and would be absolutely happy with that. The only thing I can't recall (but would be good to make sure of) is that the session titles do not get truncated in the TUI (Session List) so we can see the number at the end.

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

Metadata

Metadata

Assignees

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