Skip to content

Two prompts being generated. #17314

Closed as not planned
Closed as not planned

Description

@Spaceballs3000

Description

Running with local LM Studio, 1.2.25 will generate two prompts to run at the same time, the first seems to never finish +7k tokens.

Plugins

default install.

OpenCode version

1.2.25

Steps to reproduce

Install defaults, edit opencode.json to point to local LLM. Launch opencode and enter "Hi". On LM Studio you will set two prompts generated, one will just keep ticking up (I think I stopped it at ~8k tokens) . Other one finished correctly and reply's back normally.

Screenshot and/or share link

Image

Operating System

Ubuntu

Terminal

Wezterm

Activity

  1. added
    bug
    on Mar 13, 2026
  2. added
    core
    on Mar 13, 2026
  3. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

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

    If either of these covers your issue, consider adding a comment there instead.

  4. NikolaKrstic94 commented on Apr 1, 2026

    @NikolaKrstic94

    I'm in the same boat, constantly getting a duplicated prompt, any resolution? I'm using local qwen models (35b and 27b) and qwen coder next, it happens on all of them, it started a few weeks ago.

    Edit: I think I found out what it is, it's an additional request to generate the session title for opencode, someone please confirm or correct.

  5. lobanov-coder commented on Apr 23, 2026

    @lobanov-coder

    Fix for "Phantom" / Double Prompts in OpenCode + LM Studio
    The Issue:
    When you send your first message in a session, OpenCode sends a hidden background request to the LLM with a system prompt like You are a title generator. On local models (especially large ones like Qwen 35B), this "phantom" request consumes GPU resources, eats up tokens, and delays the actual response to your query.
    The Solution:
    You need to explicitly disable the internal title agent in your OpenCode configuration.
    Open your global config file (usually located at ~/.config/opencode/opencode.json).
    Add the "agent" block with the "title": { "disable": true } parameter to the root of the JSON:

    {
    "$schema": "https://opencode.ai",
    "agent": {
    "title": {
    "disable": true
    }
    },
    "provider": {
    "lmstudio": {
    "npm": "@ai-sdk/openai-compatible",
    "name": "LM Studio (local)",
    "options": {
    "baseURL": "http://127.0.0"
    }
    }
    }
    }

    Optional: If phantom requests persist (for summarization or other tasks), add "smallModel": null to the root of the config.
    Restart your OpenCode session.
    This prevents the CLI from trying to automatically name the thread, which stops the extra load on your local LM Studio server.

  6. removed
    bug
    core
    on May 3, 2026
  7. github-actions commented on Jul 3, 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