[BUG] Model self-identifies as "CLI" when Claude Code runs inside Desktop app — blocks use of Desktop-only tools (preview) and produces incorrect capability claims

Resolved 💬 3 comments Opened Apr 18, 2026 by toddjhayden Closed Apr 22, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Environment

  • Claude Code: Opus 4.7 (1M context), hosted inside Claude Desktop (Windows 11)
  • System prompt begins: "You are Claude Code, Anthropic's official CLI for Claude."

Observed behavior
The model's system prompt identifies it as "CLI" even when the session is
running inside the Desktop app's Code panel. When the user asks the model to
use a Desktop-only feature (e.g., preview), the model:

  1. Searches its exposed toolset, finds no preview_* tool
  2. Concludes "I'm CLI, no preview available"
  3. Recommends workarounds (browser-use CLI, chrome-devtools MCP)

— instead of recognizing it is hosted inside Desktop where preview exists as
a UI feature / should be wired as a tool.
The user had to screenshot the Desktop UI to convince the model of its own
host surface. That is a bad default.
Impact

  • Users lose Desktop features silently because the model doesn't know to offer them
  • Wasted turns in conversations explaining the model's own environment to it
  • Trust erosion: "why is the model wrong about what it can do?"

Related but distinct: #39543, #48466, #50004

What Should Happen?

The model should know what host it's actually running in. Either:

(a) The system prompt reflects the real host surface — distinct strings
for "Claude Code CLI", "Claude Code in Desktop (Code panel)",
"remote-control", "claude.ai/code", and IDE extensions — so the
model can reason correctly about its own capabilities.

(b) The Desktop host always exposes its surface-specific tools
(preview_start, preview_screenshot, etc.) to the model, so the
capability question is answered by the toolset itself rather than
by the model's self-description.

Ideally both. Today the model confidently tells Desktop users "I don't
have preview" because its system prompt says "CLI" and no preview tool
was wired into the session — two failures that combine to produce a
wrong answer the user has to correct manually.

Error Messages/Logs

Steps to Reproduce

  1. Launch Claude Code inside the Claude Desktop app on Windows (Code panel,

not standalone CLI terminal).

  1. Start a new session on any project.
  2. Ask the model: "Do you have preview?" or "Can you open a browser to

view localhost:3000?"

  1. Observe the model:
  • Reads its system prompt ("You are Claude Code, Anthropic's official

CLI for Claude")

  • Searches its exposed toolset, finds no preview_* tool
  • Replies that it's "CLI" and no preview is available, recommending

workarounds like browser-use CLI or installing chrome-devtools MCP

  1. Show the model a screenshot of the Desktop UI.
  2. Observe the model acknowledge it is in fact hosted inside Desktop —

which it should have known from the start.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.114 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗