[BUG] no line numbers in VS Code plugin for modified files

Status Open
Reported on v2.1.84
Maintainer reply None cached
Activity 7 comments · opened Mar 26, 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 plugin for VS Code, when files are modified there are no line numbers displayed but instead as a little square or "tofu".

<img width="604" height="400" alt="Image" src="https://github.com/user-attachments/assets/a4b918aa-8cd5-47f8-a4ab-47ba0a47d0cc" />

What Should Happen?

Line numbers should be rendered. If the line numbers were clickable and it would open (or use an existing editor) to navigate to the line that would be amazing.

If the intention is to NOT show line numbers then remove the tofus or replace them with a renderable glyph.

Error Messages/Logs

Steps to Reproduce

  1. in VS Code: ask Claude Code to make a change to a file
  2. observe the modified lines have little squares where line numbers typically are

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.84

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

7 Comments

momala454 · 4 months ago

don't close this. Isn't this important ? And also being able to see more context

nzaquini · 4 months ago

Same bug on:

Claude Code Version
2.1.121

mifrey00 · 3 months ago

Still reproducing on version 2.1.143

harshitakukreja · 3 months ago

Still showing up on version 2.1.145

bsauvage1 · 3 months ago

Still in 2.1.158
Please help look into this, this is quite the distraction

momala454 · 2 months ago

sharing a working local patch for this, in case it helps others until it's fixed upstream: https://github.com/momala454/claude-code-vscode-ui-fixes

Root cause (from reverse-engineering the webview bundle): the inline diff component only receives the changed hunk (old_string/new_string), never the file's content or its position — so it literally can't render real line numbers or surrounding context. Turning Monaco's lineNumbers on just shows 1,2,3… relative to the hunk, which is misleading (the "tofu" squares are the font fallback for the disabled gutter).

What the patch does instead, reusing machinery the extension already ships:

  • Clicking the diff opens VS Code's native diff via the existing open_diff RPC (vscode.diff) → real file context + real line numbers. Falls back to the original inline diff if the edit is already applied.
  • Clicking the filename jumps to the changed line.

That's exactly the "clickable / navigate to the line / see more context" behaviour requested in this issue. It's anchor-based and all-or-nothing (won't leave a half-patched bundle), Linux/WSL for now. Not affiliated with Anthropic — it patches your own local bundle and ships none of their code.

RYJASM · 2 months ago

Still seeing this and have been for as long as I can remember. Wish I could see which line numbers were being edited by claude code in the chat area.

I guess this is the same issue? The recommended fix by momala454 did nothing for the chat window where it also shows the changes and has missing line numbers.

<img width="1304" height="558" alt="Image" src="https://github.com/user-attachments/assets/72e15746-424d-48be-8b17-ed44b8bb88d5" />