Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Where does the bug appear?
Agents Window → Files panel (Glass viewer)
Environment
- macOS
- Cursor Pro, local agent (“This Mac”)
- Multi-root workspace with 3 repositories
- Cursor Version: 3.17.21
Description
When viewing .tf (Terraform) files in Agents Window → Files, syntax highlighting is unreliable. Sometimes colors appear correctly; other times the same file is unstyled or looks completely different from the IDE. Behavior seems intermittent within the same session, as if extension grammars load once and then stop working (e.g. after switching tabs, reopening a file, or returning to the agent). No clear trigger yet.
This happens in a .code-workspace with 3 repos. Not sure if multi-root is related, but worth noting.
In the IDE, the same files always render correctly with the HashiCorp Terraform extension (Cmd+Shift+P → Open IDE).
This looks related to extension-provided grammars not loading consistently in the Glass file viewer. A prior forum thread on Agents Window syntax highlighting is closed, so opening a fresh report.
Workaround
Open IDE for file review when highlighting breaks.
Impact
Hard to review Terraform changes in Agents Window when highlighting drops mid-session.
Steps to Reproduce
- Open a multi-root workspace (
.code-workspace) with 3 repositories that contain.tffiles. - Open Agents Window with local agent (“This Mac”).
- From Agents Window → Files, open a
.tffile from one of the repos. - Confirm syntax highlighting looks correct (HashiCorp Terraform colors).
- Continue in the same session: switch agent tabs, reopen the file, open a
.tffrom another repo in the workspace, or return from diff/review. - Reopen the same
.tffile in Files. - Observe: highlighting is missing, wrong, or different from step 4.
- Cmd+Shift+P → Open IDE → open the same
.tffile. - Observe: highlighting is always correct in the IDE.
Expected Behavior
Stable, IDE-consistent syntax highlighting in Agents Window Files, including extension-provided grammars, in single- and multi-root workspaces.
Screenshots / Screen Recordings
Operating System
MacOS
Version Information
Version: 3.17.21
VS Code Extension API: 1.128.0
Commit: 8f2a112cb2845a97b75fd932ea5c470579ca4060
Date: 2026-08-25T01:05:08.089Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 25.6.0
Does this stop you from using Cursor
No - Cursor works, but with this issue
