Skip to content

Add ability to regenerate session title using small model #11988

Closed

Description

@bobthearsonist

Summary

Currently, session titles are only generated automatically on the first user message. There's no way to:

  1. Regenerate a title if the auto-generated one is poor
  2. Generate a title for sessions that were created before the title feature existed
  3. Use the small model to suggest a better title mid-conversation

Proposed Solution

Add a "Generate title" option that uses the small_model (or falls back to the title agent's configured model) to create a new title based on the conversation history.

Features

  1. API Endpoint: POST /session/:id/generate-title

    • Optionally accepts a custom prompt/hint as a body parameter
    • Returns the generated title
  2. UI Integration:

    • Add "Generate title" item to the session dropdown menu (between Rename and Archive)
    • Show in both webapp and TUI
  3. Slash Command: /retitle [hint]

    • No argument: generates title from conversation
    • With argument: uses the hint to influence title generation (e.g., /retitle focus on the auth refactoring)

Implementation Notes

  • Reuse the existing title agent and PROMPT_TITLE
  • Extract title generation logic from ensureTitle() in prompt.ts into a reusable function
  • Remove the guards that prevent regeneration (isFirst, isDefaultTitle checks)

Use Cases

  • User wants a more descriptive title after conversation has evolved
  • Auto-generated title was too generic or missed the main topic
  • User imported/continued an old session that never got a title

Activity

  1. github-actions commented on Feb 3, 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. Crystora commented on Feb 4, 2026

    @Crystora

    @thdxr Can I try to implement this function and raise a PR?

  3. github-actions commented on Apr 5, 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

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions