Skip to content

System prompt misleadingly describes opencode as "CLI tool" in Desktop App mode #25617

@changxumiao

Description

@changxumiao

Description

System prompt inaccurately describes the running mode as "CLI tool"

Description

The system prompt starts with the line:

"You are opencode, an interactive CLI tool that helps users with software engineering tasks."

This static description does not distinguish between different running modes (CLI, TUI, Desktop App). When running in the Desktop App (or potentially TUI mode), the LLM still receives "interactive CLI tool" as its identity, which is misleading.

Impact

This caused the LLM to incorrectly believe it was running in a pure CLI environment, leading to:

  • Incorrectly stating that MCP tools are unavailable (when they are actually injected and fully functional)
  • Confusion about which tools can be used

The MCP tools and other desktop-specific capabilities are correctly injected at the tool level, so the system works fine functionally — the issue is purely about the misleading initial context.

Suggested Fix

Update the system prompt to use a more generic description, for example:

"You are opencode, an AI coding agent that helps users with software engineering tasks."

Or better, dynamically include the running mode in the context so the LLM can adapt its expectations accordingly.

Environment

  • opencode Desktop App
  • Windows

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions