Skip to content

[FEATURE]: Make title-generation attachments opt-in to reduce privacy, token, and latency costs #50654

Closed as not planned

Description

@JustinKeltner

Problem

OpenCode generates a second model request for the first real user message to create a session title. The title request currently receives the first user message through normal model-message conversion, including supported file and image attachments.

This sends PII to the title model, duplicates local inference work and latency, and can charge substantially duplicated uncached input on providers without cache discounts. Large attachments can make the otherwise small title request expensive or slow.

This is related to #46115 (title generation bypasses plugin redaction hooks) and #23114 (unintended context reaching the title model), but this request is specifically about attachment handling and the default cost/privacy behavior.

Proposed behavior

By default, title generation should receive text only and omit all file/image attachment parts. The title should still be generated from the textual portion of the first user message.

Add an opt-in config field, for example:

{
  "agent": {
    "title": {
      "options": {
        "include_attachments": true
      }
    }
  }
}

The exact configuration shape is flexible; the important properties are:

  • attachment inclusion is opt-in, not default;
  • title generation does not transmit attachments unless explicitly enabled;
  • the behavior is documented so users can reason about token cost, latency, and privacy.

A separate title-specific redaction hook would also be useful, but should not be required for the safe default.

Activity

  1. alt2019 commented on Oct 12, 2026

    @alt2019

    How to disable autogeneration of the session title? Neither of
    "mimo-v2.6-pro": {
    "options": {
    "skip-title": true,
    }
    },

    "agent": {
    "title": {
    "disabled": true
    },
    },
    "small_model": "fake/title-model",

    worked, and the title is still generated with the same model used in request. Such a waste of money.

  2. opencodejr commented on Oct 28, 2026

    @opencodejr

    Thanks for the detailed write-up!

    The behaviour you describe matches OpenCode v1 (0.x/1.x; #46115, which you linked, was reported on 1.18.20). v1 now only gets fixes for critical bugs such as data loss, security problems or crashes with no workaround, so this change is unlikely to land there. Until then you can turn title generation off completely with {"agent": {"title": {"disable": true}}}.

    OpenCode v2 (2.x, the @opencode/cli package) already does what you're asking for by default. It builds the title request from the text of the first user message only, and never sends file or image attachments to the title model. When it regenerates the title for an ongoing session it also uses text only, with length limits. Upgrading to v2 should fix the attachment cost, latency and privacy problem.

    Related:

    If you see attachments reaching the title model on v2, or you think this is critical on v1, please reply with your opencode --version and how you checked (for example, a request trace), and we'll take another look.

  3. opencodejr commented on Oct 29, 2026

    @opencodejr

    Closing this as not planned, since we haven't heard back. The behaviour described here is v1's, and v1 only gets critical fixes. OpenCode v2 already generates titles from the text of the first message only and never sends file or image attachments to the title model. On v1 you can turn title generation off with {"agent": {"title": {"disable": true}}}.

    If you see attachments reaching the title model on v2, please comment with your opencode --version and how you checked (for example, a request trace), and we'll reopen it. Thanks again for the detailed report!

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions