[BUG] Desktop app: files inside the opened project (git repo) are not syntax-highlighted, while files outside the project are

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 25, 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?

In the Claude Code macOS desktop app, source files opened in the "Files" panel are shown in plain monochrome (no syntax highlighting) when they live inside the opened project (a git repository).

The exact same file content, placed OUTSIDE the project, is highlighted correctly. The only difference is the file's location — the bug reproduces only for files inside the project.

Things I ruled out (confirmed NOT the cause):

  • File being new vs existing, extension, and first-line style (<?php ... exit(...)): irrelevant (highlighted fine)
  • File size / line count (500–600+ lines): irrelevant (highlighted fine)
  • Encoding / BOM / line endings: clean UTF-8, no BOM, LF — fine
  • How the file is opened (edit card vs. clicking a path link in chat): irrelevant (same file highlights both ways)
  • Reproduces both inside a git submodule and at the root repo directory
  • The ONLY differentiator is whether the file is inside the opened project; files outside the project are highlighted

Possibly related but different: #66440 (C# highlighting flashes then disappears / JS works) is language-based, whereas this reproduces based on the file's location. PHP is highlighted fine when the file is outside the project.

What Should Happen?

Files inside the project should be syntax-highlighted in the Files panel, just like files outside the project.

Error Messages/Logs

N/A — no error is shown; the code just renders without syntax highlighting.

Steps to Reproduce

  1. Open any git repository as the project in the desktop app.
  2. Inside the project, create a file foo.php:

```php
<?php
class Foo {
const BAR = 1;
public function greet(string $name): string {
return "hello {$name}";
}
}

  1. Open foo.php in the Files panel → shown in monochrome, no syntax highlighting.
  2. Copy the same file to a location OUTSIDE the project (e.g. /tmp/foo.php) and open it → syntax highlighting works correctly.

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

Claude 1.34493.1 (255293) 2026-08-21T02:05:20.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗