Skip to content

[FEATURE]: Support configurable auto-rename of session after N messages #29002

Closed as not planned

Description

@YoungJurry

Describe the enhancement you want to request

Currently, OpenCode auto-generates session titles based only on the first message of the conversation. As the conversation evolves, the title often becomes misleading or irrelevant, making it hard to find and resume sessions via /sessions.

I propose adding a configurable auto-rename feature that re-generates the session title based on recent context after a user-defined number of messages.

Example config in opencode.json:

{
  "session": {
    "autoRename": {
      "enabled": true,
      "interval": 10  // Re-generate title every N messages
    }
  }
}

How it would work:

  • After every N messages (configurable), the AI re-evaluates the conversation context and generates a concise, descriptive session title.
  • The user can also trigger manual rename via /rename as before.
  • The feature should be opt-in (disabled by default to avoid unexpected behavior).

Why this helps:

  • Sessions with long conversations stay accurately labeled.
  • /sessions and /resume become far more useful when titles reflect current context, not just the starting topic.
  • Users working on multiple parallel sessions benefit greatly from meaningful session names.

Alternatives considered:

  • Manual /rename — works but requires user to remember and interrupt flow.
  • Plugin opencode-session-renamer — only renames based on first message, same limitation.

Activity

  1. github-actions commented on May 23, 2026

    @github-actions
    Contributor

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

    Please review these issues and consider whether your request is already covered. If you believe your proposal adds something distinct, please clarify the difference.

  2. YoungJurry commented on May 23, 2026

    @YoungJurry
    Author

    I built a plugin that implements this feature: opencode-session-auto-rename 📦

    👉 https://github.com/smithyyang/opencode-session-auto-rename
    👉 npmjs.com/package/opencode-session-auto-rename

    Install with one line in opencode.json:

    "plugin": ["opencode-session-auto-rename"]

    Supports custom interval (every N messages), configurable model, and title length — all via an optional config file ~/.config/opencode/session-auto-rename.jsonc.

    This plugin was entirely written using OpenCode itself. 😄

  3. github-actions commented on Jul 23, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 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