GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Why the Session title Fails to Auto-Update for Vertex Models on OpenCode Desktop · Issue #31879 · anomalyco/opencode

Why the Session title Fails to Auto-Update for Vertex Models on OpenCode Desktop #31879

New issue
Copy link
New issue
Copy link
Closed
#33926
Closed
Why the Session title Fails to Auto-Update for Vertex Models on OpenCode Desktop#31879
#33926
Copy link
Assignees
rekram1-node

Description

@saadev0
saadev0
opened on Jun 11, 2026
Issue body actions

Description

Why the Title Fails to Auto-Update for Vertex Models
The issue lies in a specific quirk of how OpenCode constructs the prompt for title generation compared to how Google's Vertex / Gemini API expects to receive messages.

Here is exactly what happens:

The Hardcoded Title Prompt: Inside OpenCode's source code, the function responsible for auto-generating titles (SessionPrompt.ensureTitle) constructs the background API request like this:
messages: [
{ role: "user", content: "Generate a title for this conversation:\n" },
...msgs // <-- This is your actual chat history
]
Consecutive User Messages: Because your chat history (...msgs) also starts with your initial user prompt, OpenCode ends up sending an array that starts with two consecutive user messages in a row.
The API Difference:
Providers like OpenAI and Anthropic are completely fine with receiving multiple user messages back-to-back. They just process them sequentially, which is why title generation works flawlessly for them.
However, Google's Vertex AI (Gemini) API strictly enforces alternating roles. It requires the sequence to be exactly user → model → user → model.
The Silent Failure: When the Vertex API receives the two consecutive user messages from OpenCode, it instantly rejects the request with a 400 Bad Request / Invalid Argument error. Because this happens in an asynchronous background task, OpenCode simply swallows the error, aborts the title generation, and leaves your session stuck on the default "New session - [Timestamp]" title.

Plugins

NA

OpenCode version

OpenCode Desktop Version 1.16.2 (1.16.2)

Steps to reproduce

  1. Launch OpenCode Desktop.
  2. Click on New Session.
  3. Select Provider 'Vertex' (API key) - not Vertex (Anthropic).
  4. Select and model (example Gemini 3.5 Flash).
  5. Send the agent a prompt/chat message.
  6. Look above on the Session Summary or in the workspace session history, it will remain 'New session' and not use the title generation.
  7. Works perfectly fine in new sessions when using any other provider.

Screenshot and/or share link

Image

Operating System

Mac OS 26.5.1 (25F80)

Terminal

OpenCode Desktop Version 1.16.2 (1.16.2)

Activity

  1. github-actions
    assigned
    rekram1-node
    on Jun 11, 2026
  2. github-actions commented on Jun 11, 2026

    @github-actions
    github-actionsBot
    on Jun 11, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • Session title no longer auto update #31592: Same symptom (session title not auto-updating, v1.16.2) — may be the same underlying issue
    • Session title generation silently fails with no fallback or logging #29734: Session title generation silently fails — describes the same silent error-swallowing behavior that causes this symptom

    If the root cause (Vertex AI rejecting consecutive user messages) is distinct from those issues, please clarify in your issue to help maintainers distinguish it.

  3. saadev0
    changed the title [-]Why the Title Fails to Auto-Update for Vertex Models[/-] [+]Why the Session Tttle Fails to Auto-Update for Vertex Models[/+] on Jun 11, 2026
  4. saadev0 commented on Jun 11, 2026

    @saadev0
    saadev0
    on Jun 11, 2026
    Author
    More actions

    The provider and model itself works perfectly fine, the issue is with the Session title generation (I have to manually rename the session when using Vertex models in OpenCode Desktop) which is irritating as I sometimes forget and end up with multiple 'new session' list entries.

  5. saadev0
    changed the title [-]Why the Session Tttle Fails to Auto-Update for Vertex Models[/-] [+]Why the Session title Fails to Auto-Update for Vertex Models on OpenCode Desktop[/+] on Jun 11, 2026
  6. rekram1-node commented on Jun 26, 2026

    @rekram1-node
    rekram1-node
    on Jun 26, 2026
    Member
    More actions

    i think it's due to model selection, not the 400 thing ur citing. I tested vertex myself it works fine as is as but i think for u it's selecting haiku as title gen model

  7. rekram1-node
    closed this as completedin #33926on Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.